[{ALLOW view All}] [{ALLOW edit Markus}] 24.03.2024 [Squeezebox Server] [{TableOfContents }] [Getting started with Raspberry PI5 8GB|https://www.raspberrypi.com/documentation/computers/getting-started.html] !! Case and PCIe Update 02.10.2024 I bought the [Argon NEO 5 M.2 NVMe PCIE|https://botland.de/gehause-fur-raspberry-pi-5/24397-argon-neo-5-m2-nvme-pcie-gehause-fur-raspberry-pi-5-mit-lufter-und-kuhlkorper-aluminium-schwarz-860011360056.html] case, which has an integrated PWM fan. This box is perfect for th PI5 and has a adapter for a PCIe m.2 NVMe (not m.2 SATA!). OLD: ''I used the case "Raspberry PI5 Case Acryl with FAN" from mindfactory. There seems to be many different "acryl cases" in the market, e.g. you cannot expect to get the same everywhere. My fan in this package had a two pin adapter only, which you can apply to the [GPIO pins 4+5|https://www.raspberrypi.com/documentation/computers/raspberry-pi.html] but then the fans runs always, which is too loud. You should use the official 4 pin fan connector, e.g. buy a package with a proper fan! I guess with the 4 pins it is with PWM signal that allows the computer to change the speed of the fan.\\ Finally I disabled the fan as I have only max 60°C only (see Temparature below).'' !! Storage !What is fastest? [{Table style='width:auto' ||Component||Speed |USB 3.0 (5Gbps)|625 MB/s |PCIe 2.0 x1|250 MB/s |Gigabit Ethernet|125 MB/s }] As my case offers a PCIe M.2 NVMe slot I added a SSD 4TB Lexar NM790 M.2 2280 PCIe. This had frequently "input/output error", which could be resolved via reboot only. There seesm to be an issue at the kernel, see [here|https://forum.proxmox.com/threads/lexar-nm790-2tb.134293/] Anyway, I returned this device and bought a "4TB Samsung 990 PRO M.2 2280 PCIe 4.0 x4 3D-NAND TLC (MZ-V9P4T0BW)". !Format {{{ list devices > lsblk -f nvme0n1 > sudo fdisk /dev/nvme0n1 delete partition > d create GPT partition table > g create partition > n (use defaults) write changes > w create ext4 filesystem sudo mkfs -t ext4 /dev/nvme0n1p1 }}} !Secure purge {{{ > sudo shred -vzu -n0 /dev/nvme0n1 }}} {{{ > sudo apt install nvme-cli > nvme format --help > sudo nvme list > sudo nvme format -s2 /dev/nvme0n1 }}} !Mount {{{ create folder as mountpoint > sudo mkdir /mnt/m2 get device ids (you can use also the name in fstab) > sudo blkid add entry in fstab > sudo vi /etc/fstab add line # file_system mount_point type options dump pass /dev/nvme0n1p1 /mnt/m2 ext4 defaults,auto,users,nofail 0 2 /dev/sda1 /mnt/usb auto defaults,nofail 0 2 reload and check > sudo systemctl daemon-reload > sudo mount -a > df -h > fdisk --list > lsblk -o PATH,FSTYPE,MOUNTPOINT /dev/nvme0n1p1 }}} If you add an USB drive in fstab, make sure to use option __nofail__, because system will enter emergency mode (leave with Ctrl+D) if USB drive is turned off otherwise! ! OS and update I installed Raspberry PI 5 / Raspberry PI OS 64bit on 128GB microSD via Imager Software\\ Note: Settings has three tabs ! * name = raspberrypi5 * Enable SSH ! * Enable WLAN Update: {{{ sudo apt-get update sudo apt-get upgrade sudo reboot sudo raspi-config ??? sudo apt install apt-transport-https <- no need for https ??? }}} The Squeezebox Radio needs an IP address (see below), so I activated in FritzBox to give the same IP always to "raspberrypi5". !Samba Add samba service to share with windows {{{ >sudo apt-get install samba # Samba user, same password: > sudo smbpasswd -a <user> > sudo mkdir /var/log/samba }} > sudo vi /etc/samba/smb.conf add something like: [global] workgroup = WORKGROUP # MARKUS ADDED netbios name = LINUXSERVER lanman auth = no ntlm auth = yes client lanman auth = no wins support = yes local master = yes preferred master = yes # MARKUS ADDED [Musik] comment=Raspberry Pi Share path = /media browseable = yes writeable = yes read only = no only guest = no create mask = 0775 directory mask = 0755 public = no force user = markus }}} Write permissions on windows are shared on Linux level: {{{ > sudo chmod a+rwx /media }}} Linux Commands\\ note: you see the shares used only if some user uses currently, otherwise check config {{{ > sudo service smbd restart > sudo smbcontrol all reload-config > samba --version => Version 4.17.12-Debian > systemctl status smbd > sudo smbstatus > sudo smbstatus --shares > sudo pdbedit -L -v > cat /var/log/samba/log.smbd }}} In Windows use\\ ~\\raspberrypi5\Musik => Anmelden !Temperature and Power __Power__\\ You cannot properly messure power consumption in PI, app "powertop" cannot be used due to missing batterie.\\ {{{ > vcgencmd measure_volts => volt = 0,7200V }}} I used a smart power adapter from Gosund to check: * 3,0 - 3,4W while idle/streaming * 3,6 - 3,9W while copying files via Samba __Temperature__\\ You can use Linux for checking that:\\ {{{ > sudo cat /sys/class/thermal/thermal_zone0/temp }}} Some Linux background about temperatures:\\ see folder /sys/class/thermal/ \\ => zones, PI5 has one only = thermal_zone0\\ note: values like 60050 = 60,05°C ||file||description||value |type|Type of the thermal zone|cpu-thermal |temp|Current temperature|__56,0 - 60,5 °C__ without fan in arcyl case (sdCard side open) |mode|Working mode of the thermal zone|enabled |policy|Thermal governor used for this zone|step_wise |available_policies|Available thermal governors for this zone|step_wise |trip_points|temp=temperature/type=type/hyst=Hysteresis value for this trip point|0 critical / 110 °C / 0 | | |1 active / 50 °C / 5 | | |2 active / 60 °C / 5 | | |3 active / 67,5 / 5 | | |4 active / 75 °C / 5 |slope|Slope constant applied as linear extrapolation|-550 |sustainable_power|Sustainable dissipatable power|0 |k_po|Proportional term during temperature overshoot|0 |k_pu|Proportional term during temperature undershoot|0 |k_i|PID's integral term in the power allocator gov|0 |k_d|PID's derivative term in the power allocator|0 |integral_cutoff|Offset above which errors are accumulated|0 |offset|Offset constant applied as linear extrapolation|450000 __Current CPU frequency__ {{{ > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq => 15000000 > vcgencmd measure_clock arm => frequency(0)=1500004352 }}} !!Logitech Squeezebox Radio !Logitech The public media server at www.mysqueezebox.com was retired early 2024. You need to have your own one for the Radio now.\\ It is pretty easy to install the [Logitech Media Server||https://lms-community.github.io/lms-server-repository/] / [Lyrion Musik Server|https://lyrion.org/lms-server-repository/]\\ See also [forum1|https://forums.slimdevices.com/forum/user-forums/deutsch/1668931-mysqueezebox-com-und-uesmartradio-com-infrastruktur] | [forum2|https://forums.slimdevices.com/forum/user-forums/general-discussion/1668327-uesmartradio-com-and-mysqueezebox-com-servers] | [LMS Getting Started|https://lms-community.github.io/getting-started/]\\ I followed more or less [StepByStep Instructions by Harald Kreuzer|https://www.haraldkreuzer.net/aktuelles/logitech-media-server-auf-dem-raspberry-pi-4b-mit-5-zoll-display-installieren] to install on my PI5 Disable swap file {{{ sudo service dphys-swapfile stop sudo systemctl disable dphys-swapfile sudo apt-get purge dphys-swapfile sudo apt autoremove sudo vi /boot/firmware/cmdline.txt ADD at the end of line >noswap< console=[...] noswap sudo vi /etc/fstab ADD: # Log to RAM tmpfs /tmp tmpfs defaults,noatime,nosuid,mode=1777,size=256m 0 0 tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=128m 0 0 tmpfs /var/tmp tmpfs defaults,noatime,nosuid,mode=0755,size=128m 0 0 }}} ! Install LMS for music (only) {{{ sudo apt-get install libsox-fmt-all libflac-dev libfaad2 sudo apt-get install libio-socket-ssl-perl sudo apt-get install libcrypt-openssl-bignum-perl sudo apt-get install libcrypt-openssl-random-perl sudo apt-get install libcrypt-openssl-rsa-perl # download ARM version Debian ! wget https://downloads.slimdevices.com/LogitechMediaServer_v8.5.0/logitechmediaserver_8.5.0_arm.deb (note: NOT the ARM tgz = .tar.gz => tar xvf *.tgz) sudo dpkg -i logitechmediaserver_8.5.0_arm.deb # to test at window you need lame too sudo apt-get -y install lame }}} [LMS Commands|https://mystupidnotes.com/common-logitech-media-server-lms-commands/] {{{ sudo service logitechmediaserver start sudo service logitechmediaserver stop sudo service logitechmediaserver restart }}} WebGUI: [http://raspberrypi5:9000/] You can listen to selected stream with [http://raspberrypi5:9000/stream.mp3] Enable at radio\\ Settings in radio see [https://lms-community.github.io/getting-started/migrate-from-uesr-de/] Note: if you have issues with DHCP or DNS or that the radio looses connection to LMS frequently (especially after sleep mode) then do a factory reset and reconnect! UPNP/DLNA => Settings > Plugins verwalten > enable "UPnP/DLNA Media Interface (v1.0) !Custom URL Note: WebGUI > Radio > URL laden - does not save the URL # Create m3u file like format: {{{ #EXTM3U <= must be first line #EXTINF:<seconds>,<track title> }}} examples: {{{ #EXTM3U #EXTINF:295,Starlight Express - AC/DC MyCDs\Starlight Express - Starlight Express, Bochum 1991\Starlight Express - 05 ACDC.mp3 }}} {{{ #EXTM3U #EXTINF:0,Radio BOB http://streams.radiobob.de/bob-national/mp3-192/mediaplayer }}} 2. copy in the folder which is configured in settings > Grundeinstellungen > Wiedergabenlisten-Ordner\\ 3. After changes: Settings > "Durchsuchen starten" (auch für Wiedergabelisten)\\ 4. At radio you can choose Eigene Musik > Wiedergabelisten; you can even save that as favorite\\ ! UPnP/DLNA Streaming Server - [minidlna|https://help.ubuntu.com/community/MiniDLNA] Notes * This is for all media, musik is already available with LMS. * KODI etc is running as app, e.g. you need to connect HDMI from Raspberry to TV ! {{{ sudo apt install minidlna sudo service minidlna restart }}} Standard share is at {{{/var/lib/minidlna/}}}\\ config {{{ vi /etc/default/minidlna vi /etc/minidlna.conf }}} !!Software / Use Cases ! [Backup] with Syncthing ! Image viewer feh {{{ > sudo apt-get install feh > feh -g 640x480 -d -S filename /path/to/directory > feh --start-at ./foo.jpg /path/to/directory }}} [Shortcuts|https://man.finalrewind.org/1/feh/]\\ You can reset/overwride with file ~/.config/feh/keys\\ Use feh: * in terminal, navigate to folder with fotos and > feh * run for dedicated folder: [man feh|https://linux.die.net/man/1/feh] {{{ -Z =auto zoom -x = borderless -F = fullscreen -S name =sorting > feh -ZxF -S name --start-at /mnt/m2/photos }}} !Monitoring with RPi Monitor [help1|https://www.raspberry-pi-geek.de/ausgaben/rpg/2020/02/ressourcen-ueberwachen-auf-dem-raspberry-pi/] | [help2|https://www.google.com/search?client=firefox-b-d&q=raspberry+rpi+monitor#fpstate=ive&vld=cid:89142cc0,vid:b_hauVq17zc,st:0]\\ {{{ > gpg --no-default-keyring --keyserver keyserver.ubuntu.com --recv-keys 2C0D3C0F > sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F > sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list > sudo apt update && sudo apt install rpimonitor > sudo /etc/init.d/rpimonitor install_auto_package_status_update > sudo /etc/init.d/rpimonitor restart }}} Note: you can customize/add network and service monitoring for example at files * /etc/rpimonitor/daemon.conf * /etc/rpimonitor/template/network.conf\\ * ... Web GUI at [http://raspberrypi5:8888] Note: you can also use your own web server {{{ #daemon.noserver=1 }}} !! wifi / wlan If you connect via cable, you do not need wlan\\ Check WLAN {{{ > ifconfig > find "wlan0" > dmesg > find "WLAN Adapter" (sudo dmesg -c clear messages) > sudo iwconfig <========= find "Mode:Managed Access Point" > sudo iwgetid > sudo apt-get install iw > iwconfig find "IEEE 802.11bgn" > iwlist chan > iw list }}} Disable wlan {{{ > sudo vi /boot/firmware/config.txt add after [all] dtoverlay=disable-wifi }}} {{{ > rfkill > rfkill block wifi > rfkill unblock wifi > sudo ip link set wlan0 down }}} !!Issues !No sound over HDMI (Browser Streaming) Solution at [tecchannel|https://www.tecchannel.de/a/raspberry-pi-die-8-haeufigsten-probleme-einfach-loesen,3281367,4] sudo vi /boot/firmware/config.txt {{{ # added Markus EDIT for HDMI sound output in browser on TV hdmi_drive=2 hdmi_force_hotplug=2 }}} ! Error message "Cannot open access to console, the root acccount is locked" Solution at [github|https://gist.github.com/gnh1201/ef8fd8b7aa7ba1f76708d2e701ae25a5]\\ => turn on external harddisk while booting, you can turn off afterwards again !Raspberry not accessible now and then Unsolved, please check {{{ journalctl }}} Error monitor.c:222: warn: WARNING: [Inotify|https://www.suse.com/de-de/support/kb/doc/?id=000020048] max_user_watches [[63376] is low or close to the number of used watches [[29] and I do not have permission to increase this limit. Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches. {{{ sudo sysctl fs.inotify.max_user_instances=8192 sudo sysctl fs.inotify.max_user_watches=524288 sudo sysctl -p }}}