User Tools

Site Tools


linux64

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux64 [2024/10/12 08:15] – [minecraft server] bengtlinux64 [2026/11/07 19:26] (current) – [Using pi.dev as ai harness] bengt
Line 49: Line 49:
 Standard users https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-users.html and groups https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-groups.html which seems to be lacking. Maybe because I did a workstation installation. Standard users https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-users.html and groups https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-groups.html which seems to be lacking. Maybe because I did a workstation installation.
  
-==== TBS 6280 PCIe DVB-T2 ==== 
- 
-A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, which means that you have to recompile it on kernel update. Official linux drivers can be downloaded at http://www.tbsdtv.com/download/ and open source at https://github.com/ljalves/linux_media/wiki/Installating. Visit https://www.tbsdtv.com/forum/viewtopic.php?f=87&t=25422 and http://www.tbsdtv.com/forum/viewforum.php?f=49 for a forum. 
- 
-You will need to disable secure boot in bios for uefi boot to load 3rd party drivers. Maybe solved by selecting "Other OS" instead of "Windows" in the boot options. 
- 
-Roughly following https://www.linuxtv.org/wiki/index.php/TBS_driver_installation#Installing_drivers I did like this as root top build and install official drivers (old): 
-  dnf install kernel-headers kernel-devel 
-  mkdir tbs 
-  cd tbs 
-  wget http://www.tbsiptv.com/download/common/tbs-linux-drivers_v170330.zip 
-  unzip tbs-linux-drivers_v170330.zip 
-  tar xvjf linux-tbs-drivers.tar.bz2 
-  cd linux-tbs-drivers/ 
-  ./v4l/tbs-x86_64.sh # For 64bit and ./v4l/tbs-x86_r3.sh for 32bit, see docs for other kernels. 
-  make -j6 
-  mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Will fix some issues like symbol mismatches and in my case a driver crash in dmesg registering SAA716x dvb adapter. 
-  make install 
-  reboot 
-  dmesg | grep DVB 
-The cards should be possible to configure in mythtvsetup now. After kernel upgrades you will need to remove the "linux-tbs-drivers" folder and unpack again, make clean does not seem to work. 
- 
-Nowadays it seems like like using the open source drivers at https://github.com/tbsdtv/linux_media/wiki is the model to keep up with kernel changes: 
-  dnf install perl-Proc-ProcessTable patchutils 
-  mkdir tbs && cd tbs 
-  git clone https://github.com/tbsdtv/media_build.git 
-  git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media 
-  cd media_build 
-  make dir DIR=../media 
-  make distclean 
-  make -j6 
-  mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Maybe still needed to fix install mismatch issues? 
-  make install 
-  reboot 
- 
-Install firmware: 
-  wget http://www.tbsdtv.com/download/document/linux/tbs-tuner-firmwares_v1.0.tar.bz2 
-  tar jxvf tbs-tuner-firmwares_v1.0.tar.bz2 -C /lib/firmware/ 
- 
-Update using: (Does not work anymore since kernel 5.7.15) 
-  cd tbs/media 
-  git remote update && git pull 
-  git clean -ffdx 
-  cd ../media_build 
-  git remote update && git pull 
-  git clean -ffdx 
-  make dir DIR=../media 
-  make distclean 
-  echo -e "#define NEED_FWNODE_GETNAME 1" > ./v4l/config-mycompat.h # Fix undefined fwnode_get_name on kernel 5.6 fedora 30 
-  sed -i '/VIDEO_OV9650/d' ./v4l/versions.txt && sed -i '/9.255.255/a VIDEO_OV9650' ./v4l/versions.txt # Fix undefined __devm_regmap_init_sccb on kernel 5.6/5.7 fedora 30/31 by skipping OV9650 build 
-  make -j6 # I actually tried compiling without disabling OV9650, then I had to run "make distclean" and "make -j6" again to make it work. Needed? 
-  sudo mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Still needed to fix install mismatch issues!? 
-  sudo make install 
-  sudo reboot 
- 
-I've really had issues with kernel 5.7, in the forum they suggest to download precompiled files instead which does not work either. Failed the same way as the compilation for 5.7.15 did. Therefor I eventually decided to try: 
  
 ==== Hauppauge WinTV Dual HD ==== ==== Hauppauge WinTV Dual HD ====
Line 120: Line 64:
  
 Then I deleted the cards and sources and recreated them because EIT data did not get updated. Still had issues with low SVT1/2/B/K but I think this was because EIT for these overwrote the ones in use. Only enable EIT for channels in use. See MythTV EIT Issues below. Then I deleted the cards and sources and recreated them because EIT data did not get updated. Still had issues with low SVT1/2/B/K but I think this was because EIT for these overwrote the ones in use. Only enable EIT for channels in use. See MythTV EIT Issues below.
 +
 +==== Moving boot disk from sata to m.2 ====
 +
 +Updating boot drive from sata to m.2 turned out to be a real hassle on my MSI Tomahawk Max B450. Just putting the m.2 drive in and it stopped booting from the old sata boot drive. It turns out that m.2 disables sata ports 5 and 6. After rearranging cables and adding default,nofail to data drives it boots again. Also, if I want to use my future graphics card for LLM:s I need to boot with UEFI for ReBar but without secure boot for nvidia drivers to load.
 +
 +Then I need to boot from a live usb stick (press Fn+F11 during boot and do not use the topmost slow usb ports) and then use dd to clone:
 +  # dd if=/dev/sda of=/dev/nvme0n1 bs=64K status=progress conv=fsync
 +
 +Then it still hangs on boot when systemd is trying to mount my vfat /boot partition with uuid F71B-C42F. Apparently this is for lacking drivers in the boot image. Had to remove the m.2 disk and boot fedora 43 again to prepare with support for nvme on on sata disk:
 +  # echo 'hostonly="no"' | tee /etc/dracut.conf.d/generic.conf
 +  # dracut --regenerate-all --force
 +Ran out of disk space in /boot here. The fun never ends.
 +
 +Removed a kernel and tried this instead:
 +  # echo -e 'add_drivers+=" nvme ahci libata sd_mod "' | tee /etc/dracut.conf.d/generic.conf
 +  # dracut --force
 +Then clone again. Remove sata and boot from nvme to check that it works. This time it did. Then boot livecd again, install gparted and use this to expand /boot and move and expand / putting the swap at the end as well. Reboot
 +
 +Also took the time to get new rescue images as my old ones were from 2016, remove old vmlinuz/initramfs for rescue first:
 +  # /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)"
 +
 +
  
 ==== grub2 boot config ==== ==== grub2 boot config ====
Line 142: Line 108:
 Eventually I found https://www.reddit.com/r/Fedora/comments/186amfb/kernels_6510_does_not_install_properly_in_fedora/ and https://discussion.fedoraproject.org/t/f39-kernels-fail-to-install-when-boot-efi-machineid-is-present/96086 which apparently was a fedora 39 problem when upgrading since forever. The solution was: Eventually I found https://www.reddit.com/r/Fedora/comments/186amfb/kernels_6510_does_not_install_properly_in_fedora/ and https://discussion.fedoraproject.org/t/f39-kernels-fail-to-install-when-boot-efi-machineid-is-present/96086 which apparently was a fedora 39 problem when upgrading since forever. The solution was:
   # mv "/boot/efi/$(cat /etc/machine-id)" "/boot/efi/$(cat /etc/machine-id)_disabled"   # mv "/boot/efi/$(cat /etc/machine-id)" "/boot/efi/$(cat /etc/machine-id)_disabled"
 +I deleted the _disabled folder later to get back some disk storage. Seemed to boot fine, but it was the rescue stuff that was taking disk space.
      
 ==== efi partition to fat32 ==== ==== efi partition to fat32 ====
Line 199: Line 166:
 More info on rpmfusion drivers: More info on rpmfusion drivers:
 https://rpmfusion.org/Howto/NVIDIA https://rpmfusion.org/Howto/NVIDIA
 +
 +==== TBS 6280 PCIe DVB-T2 [old] ====
 +
 +A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, which means that you have to recompile it on kernel update. Official linux drivers can be downloaded at http://www.tbsdtv.com/download/ and open source at https://github.com/ljalves/linux_media/wiki/Installating. Visit https://www.tbsdtv.com/forum/viewtopic.php?f=87&t=25422 and http://www.tbsdtv.com/forum/viewforum.php?f=49 for a forum.
 +
 +You will need to disable secure boot in bios for uefi boot to load 3rd party drivers. Maybe solved by selecting "Other OS" instead of "Windows" in the boot options.
 +
 +Roughly following https://www.linuxtv.org/wiki/index.php/TBS_driver_installation#Installing_drivers I did like this as root top build and install official drivers (old):
 +  dnf install kernel-headers kernel-devel
 +  mkdir tbs
 +  cd tbs
 +  wget http://www.tbsiptv.com/download/common/tbs-linux-drivers_v170330.zip
 +  unzip tbs-linux-drivers_v170330.zip
 +  tar xvjf linux-tbs-drivers.tar.bz2
 +  cd linux-tbs-drivers/
 +  ./v4l/tbs-x86_64.sh # For 64bit and ./v4l/tbs-x86_r3.sh for 32bit, see docs for other kernels.
 +  make -j6
 +  mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Will fix some issues like symbol mismatches and in my case a driver crash in dmesg registering SAA716x dvb adapter.
 +  make install
 +  reboot
 +  dmesg | grep DVB
 +The cards should be possible to configure in mythtvsetup now. After kernel upgrades you will need to remove the "linux-tbs-drivers" folder and unpack again, make clean does not seem to work.
 +
 +Nowadays it seems like like using the open source drivers at https://github.com/tbsdtv/linux_media/wiki is the model to keep up with kernel changes:
 +  dnf install perl-Proc-ProcessTable patchutils
 +  mkdir tbs && cd tbs
 +  git clone https://github.com/tbsdtv/media_build.git
 +  git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media
 +  cd media_build
 +  make dir DIR=../media
 +  make distclean
 +  make -j6
 +  mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Maybe still needed to fix install mismatch issues?
 +  make install
 +  reboot
 +
 +Install firmware:
 +  wget http://www.tbsdtv.com/download/document/linux/tbs-tuner-firmwares_v1.0.tar.bz2
 +  tar jxvf tbs-tuner-firmwares_v1.0.tar.bz2 -C /lib/firmware/
 +
 +Update using: (Does not work anymore since kernel 5.7.15)
 +  cd tbs/media
 +  git remote update && git pull
 +  git clean -ffdx
 +  cd ../media_build
 +  git remote update && git pull
 +  git clean -ffdx
 +  make dir DIR=../media
 +  make distclean
 +  echo -e "#define NEED_FWNODE_GETNAME 1" > ./v4l/config-mycompat.h # Fix undefined fwnode_get_name on kernel 5.6 fedora 30
 +  sed -i '/VIDEO_OV9650/d' ./v4l/versions.txt && sed -i '/9.255.255/a VIDEO_OV9650' ./v4l/versions.txt # Fix undefined __devm_regmap_init_sccb on kernel 5.6/5.7 fedora 30/31 by skipping OV9650 build
 +  make -j6 # I actually tried compiling without disabling OV9650, then I had to run "make distclean" and "make -j6" again to make it work. Needed?
 +  sudo mv /lib/modules/$(uname -r)/kernel/drivers/media/ ~/media_$(uname -r) # Still needed to fix install mismatch issues!?
 +  sudo make install
 +  sudo reboot
 +
 +I've really had issues with kernel 5.7, in the forum they suggest to download precompiled files instead which does not work either. Failed the same way as the compilation for 5.7.15 did. Therefor I eventually decided to try usb instead. See above.
 +
 ===== Services ===== ===== Services =====
  
Line 456: Line 481:
  
 See misc below for scanning tv channels... See misc below for scanning tv channels...
-==== squeezebox for music ====+==== squeezebox/lyrion music server ====
  
-I found out that there is a spotify-plugin for squeezebox and decided to try a Boom in the kitchen and after a number of years I now have 9 squeezeboxes. Nowadays they aren't manufactured anymore but it is possible to use a chromecast as a squeezebox using a plugin in the server. Squeezebox on the server is a very nice solution to get access to your music files, spotify, internet radio and more. Instructions for fedora here:\\+I found out that there is a spotify-plugin for squeezebox and decided to try a Boom in the kitchen and after a number of years I now have 9 squeezeboxes. Nowadays they aren't manufactured anymore but it is possible to use a chromecast as a squeezebox using a plugin in the server. Squeezebox on the server is a very nice solution to get access to your music files, spotify, internet radio and more.Instructions for fedora here:\\
 http://wiki.slimdevices.com/index.php http://wiki.slimdevices.com/index.php
 +
 +Note that it is called lyrionmusicserver nowadays and some instructions below may need an update...
  
 There was a period when the community squeeze project had a fedora repo available. This is no longer the case, but there are still some nice guys updating the server: There was a period when the community squeeze project had a fedora repo available. This is no longer the case, but there are still some nice guys updating the server:
Line 472: Line 499:
   # vi /etc/group0   # vi /etc/group0
   squeezeboxserver:x:319:   squeezeboxserver:x:319:
-  # wget http://downloads-origin.slimdevices.com/nightly/8.3/lms/8e014fb139b7e75bf19d7750ce70efd6959e2d43/logitechmediaserver-8.3.1-0.1.1672158254.noarch.rpm +  # wget https://downloads.lms-community.org/LyrionMusicServer_v9.1.0/lyrionmusicserver-9.1.0-1.noarch.rpm 
-  # dnf install logitechmediaserver-8.3.1-0.1.1672158254.noarch.rpm +  # dnf install lyrionmusicserver-9.1.0-1.noarch.rpm # Moving config from /var/lib/squeezeboxserver to /etc/sysconfig/lyrionmusicserver and needs changes to scripts accordingly
-  # wget https://downloads.lms-community.org/LogitechMediaServer_v8.5.2/logitechmediaserver-8.5.2-1.noarch.rpm +
-  # dnf install logitechmediaserver-8.5.2-1.noarch.rpm+
   # ln -s /usr/lib/perl5/vendor_perl/Slim /usr/lib64/perl5/vendor_perl/Slim # Fix for 64bit OS   # ln -s /usr/lib/perl5/vendor_perl/Slim /usr/lib64/perl5/vendor_perl/Slim # Fix for 64bit OS
   # firewall-config # Open port 9000 TCP for http, 3483 TCP&UDP, 9005 TCP&UDP for spotify, 49152-49215 TCP for 3x chromecast bridge and 9090 TCP for cli. Note that cc bridge port is dynamic, tick "Use LMS interface and start from port" and set base port 49152.   # firewall-config # Open port 9000 TCP for http, 3483 TCP&UDP, 9005 TCP&UDP for spotify, 49152-49215 TCP for 3x chromecast bridge and 9090 TCP for cli. Note that cc bridge port is dynamic, tick "Use LMS interface and start from port" and set base port 49152.
-  # systemctl enable squeezeboxserver && systemctl start squeezeboxserver +  # systemctl enable lyrionmusicserver.service && systemctl start lyrionmusicserver.service 
-Check logs with something like "**journalctl -u squeezeboxserver.service**" or "systemctl status -n1000 squeezeboxserver.service".+  # cd /etc/lyrionmusicserver/ # Check rpmsave files and likely replace old conf-files. Can fix cpan module issues. 
 +Check logs with something like "**journalctl -u lyrionmusicserver.service**" or "systemctl status -n1000 lyrionmusicserver.service". 
 + 
 +If you get issues with lacking modules in status, like Proc::Background, then the problem may actually be that you need to copy /etc/lyrionmusicserver/modules.conf.rpmnew to /etc/lyrionmusicserver/modules.conf.
  
-For example after upgrade to fedora 35 the "EV YAML::XS" module failed to load according to "journalctl -u squeezeboxserver.service". Found https://forums.slimdevices.com/showthread.php?115928-Updating-from-8-0-1-to-8-3-0 and I decided to upgrade to latest 8.2 nightly http://downloads-origin.slimdevices.com/nightly/?ver=8.2 to be sure to get an updated version. This worked; remember to start by upgrading rpm when facing issues after fedora upgrade.+Another example after upgrade to fedora 35 the "EV YAML::XS" module failed to load according to "journalctl -u squeezeboxserver.service". Found https://forums.slimdevices.com/showthread.php?115928-Updating-from-8-0-1-to-8-3-0 and I decided to upgrade to latest 8.2 nightly http://downloads-origin.slimdevices.com/nightly/?ver=8.2 to be sure to get an updated version. This worked; remember to start by upgrading rpm when facing issues after fedora upgrade.
  
 The web server is then available for configuration: \\ The web server is then available for configuration: \\
Line 494: Line 522:
   $ sed 's#/data/music/#Y:/music/#g' Bengts.m3u > BengtsWin.m3u   $ sed 's#/data/music/#Y:/music/#g' Bengts.m3u > BengtsWin.m3u
  
 +There is an issue with loosing connection with radios on modern wifis. Maybe playing a mad song when using the radio as an alarm clock. The community firmware could be the solution: https://forums.lyrion.org/forum/user-forums/3rd-party-software/1699666-how-and-why-to-install-the-community-firmware-step-by-step
 ==== samba network shares ==== ==== samba network shares ====
  
Line 768: Line 797:
   ## NameCheap DynDNS   ## NameCheap DynDNS
   ##   ##
-  use=web, web=dynamicdns.park-your-domain.com/getip+  #use=web, web=dynamicdns.park-your-domain.com/getip # Stopped working 20250321, got 1.1.0.1 as ip 
 +  use=web, web=http://ipv4.nsupdate.info/myip
      
   protocol=namecheap   protocol=namecheap
Line 803: Line 833:
  
  
 +==== OpenWebRX+ for radio ====
 +
 +I buought an rtl sdr dongle that I later realized would be nice to pair with a leftover pi 4: \\
 +https://fms.komkon.org/OWRX/ \\
 +https://luarvique.github.io/ppa/ \\
 +
 +Use the the official raspberry image to enable and set ssh username/password: \\
 +https://github.com/luarvique/openwebrx/releases/ \\
 +https://www.raspberrypi.com/software/ \\
 +
 +SSH into the machine and follow the instructions to add a user: \\
 +sudo openwebrx admin adduser <USERNAME>
 +
 +You may want to install extra drivers, see note on home page: \\
 +sudo install-softmbe.sh
 +
 +Some comments about antenna length:
 +https://www.rtl-sdr.com/using-our-new-dipole-antenna-kit/
 +
 +==== ollama in podman for ai ====
 +
 +Using rootless podman as a separate user (starting with cpu only):
 +  # dnf install
 +  # useradd ollama
 +  # visudo
 +  ALL ALL=(ollama) NOPASSWD: /home/ollama/start.sh
 +  # firewall-config # Add tcp 11434 to be able to access it from hass
 +  # su - ollama
 +  $ mkdir ollama
 +  $ vi start.sh
 +  #!/bin/bash -x
 +  cd $HOME
 +  loginctl enable-linger ollama
 +  podman run -d --rm -v /home/ollama/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama # See below for flags when using gpu
 +  $ chmod u+x start.sh
 +Then setup a start.sh-script containing the startup command line and maybe start this using "lxterminal -t ollama -e sudo -u ollama /home/ollama/start.sh". Replace "-d" with "-it" in the podman command line to see the output if starting this way.
 +
 +Test it as the ollama user:
 +  # su - ollama
 +  $ podman exec -it ollama bash
 +  $ ollama run llama3.2
 +
 +Backup images and update:
 +  # su - ollama
 +  $ podman save ollama/ollama > image_backup.tar
 +  $ podman pull ollama/ollama
 +  Restart container...
 +
 +You can add the ollama integration to home assistant. On issues check your firewall config. Be sure to have "conversation:" "assist_pipeline:" in configuration.yaml if you do not use the default config before trying to setup assist pipelines.
 +
 +After buying a 5060 16GB ti for AI to have next to my 1660 ti super used for the console I needed to switch to nvidia drivers and configure podman. I already have rpmfusion-nonfree repo enabled so I just did this:
 +  # dnf update # To avoid issues below. Reboot if new kernel.
 +  # dnf install -y akmod-nvidia xorg-x11-drv-nvidia-cuda
 +  # akmods --force
 +  Wait for akmod to complete building drivers before rebooting. Check with top?
 +Note that I lost audio after this for the new kernel that got installed at the same time. Turns out that those modules were not installed as they were not needed to compile the nvidia driver. Update and reboot before or install lacking kernel-modules and kernel-modules-extra. This should also work "dnf install kernel-$(uname -r)".
 +
 +Configure podman:
 +  # dnf install nvidia-container-toolkit
 +  # nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml # Needs to be rerun after nvidia driver updates and when switching hdmi port between cards
 +  # nvidia-ctk cdi list
 +  # podman run --rm --security-opt label=disable --device nvidia.com/gpu=1 ubuntu nvidia-smi # Check gpu index to the one you want to use
 +  # vi start.sh
 +  Add "--security-opt label=disable --device nvidia.com/gpu=1" with the index of the wanted gpu or all to use the 1660 ti for some layers in my case. Doubled the performance compared to spilling over to the cpu. But models splits early.
 +  # nvidia-smi # Check ram usage for gpus. Watch out for too large context windows spilling over as it will spread not prioritizing the 5060 ti.
 +
 +In the end I bought a second 5060 ti to not have to create custom modelfiles and fiddle around that much. This is how I run the ollama container with qwen3.8:27b:
 +  # Large model on dual 5060 ti. 131072 qwen3.8 splits evenly in nvidia-smi with ~40t/s but 196608 or 262144 slows down to ~22t/s. Check your context size and split.
 +  podman run -it --rm --security-opt label=disable --device nvidia.com/gpu=all -v /home/ollama/ollama:/root/.ollama -p 11434:11434 --name ollama -e OLLAMA_CONTEXT_LENGTH=131072 -e OLLAMA_KEEP_ALIVE=-1 -e OLLAMA_FLASH_ATTENTION=1 -e OLLAMA_KV_CACHE_TYPE=q8_0 ollama/ollama:${tag}
 +
 +==== vllm in podman for fast qwen3.8:27b ai ====
 +
 +I found https://www.reddit.com/r/LocalLLM/comments/1wnapgs/qwen_38_27b_on_dual_rtx_5060_ti_130_toks_full/ and https://github.com/skrodahl/qwen38-27B-dual-rtx5060 which claims much higher token/s than I get with ollama due to using mtp prediction. With this setup using nvfp4 for model and kv cache and 94% of VRAM I get: GPU KV cache size: 463,166 tokens, Maximum concurrency for 262,144 tokens per request: 1.77x
 +
 +So I translated that recipe to a podman line to use with my startup script serving on the ollama port so I do not have to reconfigure clients using the openai interface:
 +<code>
 +tag=v0.32.0
 +port=11434
 +
 +cd $HOME
 +loginctl enable-linger $USER
 +
 +# vllm according to https://github.com/skrodahl/qwen38-27B-dual-rtx5060
 +podman run -it --rm --name vllm \
 +  --ipc=host --security-opt label=disable \
 +  --device nvidia.com/gpu=all \
 +  -v /home/ollama/vllm_cache:/root/.cache \
 +  -v /home/ollama/ai/models/gittensor-NVFP4:/model \
 +  -p ${port}:8000 \
 +  -e NCCL_P2P_DISABLE=1 \
 +  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
 +  -e VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \
 +  -e VLLM_FLASHINFER_WORKSPACE_BUFFER_SIZE=67108864 \
 +  docker.io/vllm/vllm-openai:${tag} \
 +  --model /model \
 +  --served-model-name qwen3.8:27b \
 +  --tensor-parallel-size 2 \
 +  --no-enable-flashinfer-autotune \
 +  --disable_custom_all_reduce \
 +  --api-key none \
 +  --trust-remote-code \
 +  --kv-cache-dtype nvfp4 \
 +  --max-model-len 262144 \
 +  --max-num-seqs 2 \
 +  --compilation-config '{"cudagraph_mode": "PIECEWISE"}' \
 +  --mamba-cache-dtype bfloat16 \
 +  --mamba-ssm-cache-dtype bfloat16 \
 +  --gpu_memory_utilization 0.94 \
 +  --max-num-batched-tokens 4096 \
 +  --enable-prefix-caching \
 +  --enable-chunked-prefill \
 +  --limit-mm-per-prompt '{"video": 0}' \
 +  --mm-processor-kwargs '{"max_pixels": 1000000}' \
 +  --speculative-config '{"method": "mtp", "num_speculative_tokens": 4}' \
 +  --reasoning-parser qwen3 \
 +  --tool-call-parser qwen3_xml \
 +  --enable-auto-tool-choice \
 +  --default-chat-template-kwargs '{"preserve_thinking": true}'
 +</code>
 +
 +It failed to let vllm download the model trying to divide by 0 but when I dowloaded the model using the wget method from the github page it worked! Also reduced "--max-model-len 262144" and "--gpu_memory_utilization 0.95" to avoid running out of VRAM. It allocates RAM outside of those 95% and it could run out during compaction.
 +
 +<code>
 +REPO=gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090
 +REV=0cc27958cefbbe231782ec8511de8c4eb5233348
 +mkdir -p ~/ai/models/gittensor-NVFP4 && cd ~/ai/models/gittensor-NVFP4
 +for f in config.json generation_config.json hf_quant_config.json \
 +         model.safetensors.index.json model-00001-of-00003.safetensors \
 +         model-00002-of-00003.safetensors model-00003-of-00003.safetensors \
 +         tokenizer.json tokenizer_config.json vocab.json merges.txt \
 +         chat_template.jinja preprocessor_config.json processor_config.json \
 +         video_preprocessor_config.json; do
 +  wget -c "https://huggingface.co/$REPO/resolve/$REV/$f"
 +done
 +</code>
 +
 +This is right on the edge for what my anker c300x ups can handle. I may need to get a new ups. You can tell the cards to use less max power with "nvidia-smi -pl 150" as root. I added "ollama ALL=(ALL) NOPASSWD: /usr/bin/nvidia-smi" with visudo to be able to set this with sudo in the LLM start script.
 +
 +==== Using pi.dev as ai harness ====
 +
 +Switched to pi.dev to be able to configure qwen3.8:27b to use medium instead of xhigh thinking:
 +<code>
 +$ cat ~/.pi/agent/models.json
 +{
 +  "providers": {
 +    "ollama": {
 +      "baseUrl": "http://192.168.0.10:11434/v1",
 +      "api": "openai-completions",
 +      "apiKey": "none",
 +      "models": [
 +        {
 +          "id": "qwen3.8:27b",
 +          "input": ["text", "image"],
 +          "reasoning": true,
 +          "contextWindow": 240000,
 +          "maxTokens": 65536,
 +          "compat": {
 +            "supportsDeveloperRole": false,
 +            "thinkingFormat": "qwen-chat-template"
 +          }
 +        }
 +      ]
 +    }
 +  }
 +}
 +</code>
 +In this https://github.com/earendil-works/pi/issues/2020 thinkingFormat changes to qwen or maybe qwen-chat-template.
 +
 +A also did the following to make pi behave:
 +  - Install a cpu compactor "pi install npm:@sting8k/pi-vcc" (plain npm:pi-vcc is abandoned and buggy). This means that I can use the full server side context window client side.
 +  - Use "/settings" in pi and configure "HTTP idle timeout" to disabled. For local models with long output this can aovid "Error: Terminated".
 +  - You can also configure theme in "/settings" to match your terminal colors.
 +  - It is possible to control if all pre-entered steering prompts should be sent at once with "/settings " and "Steering mode" all. 
 +
 +Editing the system promt was also suggested to control output better:
 +<code>
 +$ cat ~/.pi/agent/APPEND_SYSTEM.md
 +## House rules
 +
 +- **Keep documentation and code comments brief and concise:** State intent and the non-obvious "why" in one or two lines. Do not restate what the code already says.
 +- **Short commit messages:** 
 +  - Subject: A normal Git subject line is 50 characters or fewer, hard limit 72. Create a commit-msg hook to enforce subject length <72 if not already in place.
 +  - Body: A few lines of intent only (what + why).
 +- Always **respond and output** exclusively in the language of the user's latest message (normally English or Swedish and never Chinese).
 +</code>
 +
 +
 +==== Partially isolated pi.dev in wsl2 on windows ====
 +
 +Start by running powershell as admin and run this to setup ubuntu:
 +  > wsl --install
 +  Reboot when told to. Requires virtualization support enabled in bios.
 +  The terminal window that popped up after reboot hung at 0% for me so i did this:
 +  > wsl --shutdown
 +  > wsl --update --web-download
 +  > wsl --install -d Ubuntu --web-download
 +  These also hung, but after reboot this finally worked:
 +  > wsl --install -d Ubuntu
 +In wsl settings I set 8 CPUs, 8G RAM, 2G swap and a 32G drive size. I want to keep the LLM contained.
 +
 +Then in the prompt i added my user and password:
 +  > sudo nano /etc/wsl.conf # Append this:
 +  [automount]
 +  enabled = false
 +  
 +  [interop]
 +  enabled = false
 +  appendWindowsPath = false
 +Starta om genom att ta "sudo reboot". In order to paste you may have top use right click. To enable Ctrl+Shift+V/C you need to right click the windows title bar and enable these shortcuts in options.
 +
 +Nu är det dags att uppdatera os:et och installera pi:
 +  > wsl
 +  $ sudo apt update
 +  $ sudo apt install -y nodejs npm build-essential
 +  $ sudo apt full-upgrade -y
 +  $ sudo reboot
 +  > wsl
 +  $ sudo npm install -g --ignore-scripts @earendil-works/pi-coding-agent
 +  $ pi
 +  /quit
 +  $ nano  ~/.pi/agent/models.json
 +  <paste models.json contents from the earlier chapter>
 +  $ pi # Use /settings and change theme to dark to make it work with powershell
 +To access your ubuntu files from windows use Win+R and "\\wsl.localhost\Ubuntu". You may want to create a new shortcut to reach something like "\\wsl.localhost\Ubuntu\home\<user>" easily.
 +  
 ===== Software ===== ===== Software =====
  
Line 1036: Line 1291:
   # systemctl stop firewalld.service   # systemctl stop firewalld.service
   # iptables --flush   # iptables --flush
-  + 
 +Calculate sha256 of all files in folder and store in text file that can be used to check for bit rot later or when replacing disk and checking rsync: 
 +  $ find movies/ -type f -exec sha256sum {} \; >checksum.txt; sort -k2 -o checksum.txt checksum.txt 
 +  or 
 +  $ find movies/ -type f | sort | xargs -d'\n' sha256sum >checksum.txt 
 +File checksum mismatch after copying files to a new disk can be due to memory issues. It can even vary checksumming the same file on the same disk. You can use "memtester" live in linux or reboot into memtest in the grub menu. In my case one of the two pairs/kits were faulty I eventually found out after removing/swapping pairs.
 ==== Picade ===== ==== Picade =====
  
Line 1159: Line 1419:
  
  
-=== Disk full and mariadb recovery ===+==== Disk full and mariadb recovery ====
  
 The rocksdb part of mariadb filled my root partition, solution: The rocksdb part of mariadb filled my root partition, solution:
Line 1192: Line 1452:
 Seems ok. Had to do this later for "events" as well. Do not forget to remove the recovery setting and restart mariadb so that home assistant can connect. Moved away from remote mariadb hass database to the default sqlite implementation with a database on an ssd. Set up a nightly backup through an automation to to avoid all these issues. Seems quicker as well. Seems ok. Had to do this later for "events" as well. Do not forget to remove the recovery setting and restart mariadb so that home assistant can connect. Moved away from remote mariadb hass database to the default sqlite implementation with a database on an ssd. Set up a nightly backup through an automation to to avoid all these issues. Seems quicker as well.
  
-==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 ====+==== MythTV MariaDB cannot be null issue ==== 
 + 
 +The MythTV scheduler crashes or fails during reschedules, throwing the specific error: Scheduler AddHistory fails with "Column 'starttime' cannot be null" 
 +https://github.com/MythTV/mythtv/issues/1402 
 + 
 +Could be fixed now: 
 +https://forum.mythtv.org/viewtopic.php?p=31030 
 + 
 +Do this for now until they fix it upstream: 
 +  # dnf upgrade --exclude=mariadb-connector-c* 
 + 
 + 
 +==== Kernel 7.2.5 boot issues ==== 
 + 
 +This is the likely issue, root= disappearing from the kernel line triggering auto-detection: 
 +https://discussion.fedoraproject.org/t/error-at-boot-with-kernel-6-17-12-300-fc43-x86-64/177533 
 + 
 +It also suggested adding the root UUID to the kernel paremeters, the others have it: 
 +  # grep -E -R 'title|options' /boot/loader/entries/ 
 +  # grubby --update-kernel=/boot/vmlinuz-7.2.5-100.fc43.x86_64 --args="root=UUID=7cbb7c6a-5996-48d4-8378-4ba59e5f1f52 ro rhgb quiet" 
 +It turns out this is lacking from the new boot entry.   
 + 
 +Possible permanent fix: 
 +  # echo "root=UUID=7cbb7c6a-5996-48d4-8378-4ba59e5f1f52 ro rhgb quiet rd.driver.blacklist=nouveau,nova_core modprobe.blacklist=nouveau,nova_core" > /etc/kernel/cmdline 
 +Or just remove that file and trust modern grubenv kernel-install handling:\ 
 +If /etc/kernel/cmdline does not exist, the installer automatically falls back to reading the kernelopts line straight out of your grubenv file to build new kernel configurations.If /etc/kernel/cmdline does exist, the modern BLS (Boot Loader Specification) standard dictates that it takes absolute priority. The script reads only /etc/kernel/cmdline and completely ignores the grubenv file. 
 + 
 +I have done that and the kernel command line came up right out-of-the-box. 
 +==== Update the OS packages ==== 
 + 
 +Run this to update but do not reboot until the nvidia driver is built and installed if there is a kernel in the upgrade: 
 +  # dnf upgrade 
 +  Run this to check if the nvidia akmods rpm is built and installed: 
 +  # rpm -qa --last | head 
 +  If kmod-nvidia fore the new kernel is first in the list: 
 +  # reboot 
 +  After reboot you will need to update this for llm:s to work properly: 
 +  # nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml 
 + 
 + 
 +==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 -> 40 -> 41 -> 42 -> 43 ====
  
 Following the instructions on https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ and https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/ Following the instructions on https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ and https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
Line 1204: Line 1504:
   # dnf remove gnomebaker php-recode --noautoremove # For fedora 32   # dnf remove gnomebaker php-recode --noautoremove # For fedora 32
   # dnf remove compat-ffmpeg28 # For fedora 39   # dnf remove compat-ffmpeg28 # For fedora 39
-  # dnf system-upgrade download --releasever=39 # Did not work on Saturdays due to 404 for lacking rpmfusion files, waiting for mirroring and retrying on Sunday worked.+  # dnf remove python3-iso-639 # For fedora 40 
 +  # dnf remove python2-pillow # For fedora 41 
 +  # dnf remove scala # For fedora 43 
 +  # dnf system-upgrade download --releasever=43 # Did not work on Saturdays due to 404 for lacking rpmfusion files, waiting for mirroring and retrying on Sunday worked.
 You may need the "--allowerasing" flag or possibly force uninstall of some packages using "rpm -e --nodeps <package>" to get this to pass. You may need the "--allowerasing" flag or possibly force uninstall of some packages using "rpm -e --nodeps <package>" to get this to pass.
  
 Then reboot this way to do the actual upgrade: Then reboot this way to do the actual upgrade:
-  # sudo dnf system-upgrade reboot+  # dnf5 offline reboot 
 +  (# sudo dnf system-upgrade reboot)
  You may need to upgrade the squeezeboxserver rpm. Maybe update java version used for minecraft. See those chapters. (Old, running nouveau with modern gfx-card nowadays: You may need to uninstall and install nvidia drivers again, at least uninstall the newly created kmod-nvidia and rebuild it using akmods.)  You may need to upgrade the squeezeboxserver rpm. Maybe update java version used for minecraft. See those chapters. (Old, running nouveau with modern gfx-card nowadays: You may need to uninstall and install nvidia drivers again, at least uninstall the newly created kmod-nvidia and rebuild it using akmods.)
  
Line 1217: Line 1521:
   - Had to upgrade to squeezeboxserver 7.9.3 and build tbs with workarounds for kernel 5.7. Later I replaced tbs with a hauppauge dongle.    - Had to upgrade to squeezeboxserver 7.9.3 and build tbs with workarounds for kernel 5.7. Later I replaced tbs with a hauppauge dongle. 
   - New samba 4.11 disables smbv1 by default which does not work with my tablet used as a photo frame. See samba section above for how to fix.   - New samba 4.11 disables smbv1 by default which does not work with my tablet used as a photo frame. See samba section above for how to fix.
-  - Autologin had to be reconfigured in /etc/lxdm/lxdm.conf for fedora 37.+  - Autologin had to be reconfigured in /etc/lxdm/lxdm.conf for at least fedora 37, 40, 42, 43. Just add back the autologin line, see the .rpmsave file. 
 +  - The mailserver got disabled for fedora 42, run "systemctl start postfix && systemctl enable postfix".
   - Maybe clean up old unmaintained packages using "remove-retired-packages 36" or similar. You may also use "dnf repoquery --unsatisfied" and "dnf repoquery --duplicates" to check for broken/duplicates. See fedora upgrade docs for more info.   - Maybe clean up old unmaintained packages using "remove-retired-packages 36" or similar. You may also use "dnf repoquery --unsatisfied" and "dnf repoquery --duplicates" to check for broken/duplicates. See fedora upgrade docs for more info.
  
  
linux64.1728720902.txt.gz · Last modified: by bengt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki