Diese Seite (Version-113) wurde zuletzt am 25-Apr.-2025 17:33 von Administrator geändert.

Diese Seite wurde am 24-März-2024 13:42 von Administrator erstellt.

Du bist nicht autorisiert, diese Seite umzubenennen.

Du bist nicht autorisiert, diese Seite zu löschen.

Versionsgeschichte der Seite

Version Zuletzt geändert Größe Autor Änderungen Kommentar
113 25-Apr.-2025 17:33 15 KB Administrator zur vorherigen
112 29-Dez.-2024 10:53 14 KB Administrator zur vorherigen | zur neuesten
111 29-Dez.-2024 10:50 14 KB Administrator zur vorherigen | zur neuesten DynDNS and ipv6 ==> DNS, DynDNS and ipv6
110 29-Dez.-2024 10:35 14 KB Administrator zur vorherigen | zur neuesten
109 29-Dez.-2024 10:35 14 KB Administrator zur vorherigen | zur neuesten Raspberry Security ==> DynDNS and ipv6
108 28-Dez.-2024 17:15 14 KB Administrator zur vorherigen | zur neuesten
107 23-Dez.-2024 12:43 14 KB Administrator zur vorherigen | zur neuesten
106 20-Dez.-2024 17:48 14 KB Administrator zur vorherigen | zur neuesten
105 18-Dez.-2024 19:55 14 KB Administrator zur vorherigen | zur neuesten
104 18-Dez.-2024 19:49 14 KB Administrator zur vorherigen | zur neuesten
103 18-Dez.-2024 17:06 13 KB Administrator zur vorherigen | zur neuesten
102 18-Dez.-2024 16:59 13 KB Administrator zur vorherigen | zur neuesten
101 18-Dez.-2024 16:51 13 KB Administrator zur vorherigen | zur neuesten

Links

Eingehende Links Ausgehende Links

Versionsunterschiede

Unterschiede zwischen Version und .

Zeile 3: Eine Zeile hinzugefügt.
24.03.2024
Zeile 4: 2 Zeilen geändert.
!!Raspberry PI5 8GB
[Getting Started|https://www.raspberrypi.com/documentation/computers/getting-started.html]
Extra subpage for
* [Raspberry OS on 4TB]
* [Squeezebox Server]
* [Backup] with Syncthing
* [DNS, DynDNS and ipv6]
* [Firewall with iptables]
* [Exposing Raspberry to Internet]
Zeile 7: Eine Zeile geändert.
!OS
[{TableOfContents }]
[Getting started with Raspberry PI5 8GB|https://www.raspberrypi.com/documentation/computers/getting-started.html]
!Prepare PI5
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
! OS and update
Zeile 27: 147 Zeilen hinzugefügt.
Keep updated, for a major update (debian) you need to reinstall
{{{
> sudo apt update
> sudo apt -y full-upgrade
> sudo apt -y clean
> sudo apt -y autoremove
}}}
Automatic updates, see [elektronik-kompendium.de|https://www.elektronik-kompendium.de/sites/raspberry-pi/2002101.htm]
{{{
> sudo apt-get install unattended-upgrades # installation
> sudo vi /etc/apt/apt.conf.d/20auto-upgrades # created at installation
"1" means daily
> sudo vi /etc/apt/apt.conf.d/50unattended-upgrades # created at installation
uncommend: "origin=Debian,codename=${distro_codename}-updates";
> sudo dpkg-reconfigure -plow unattended-upgrades # activate with Yes
> sudo unattended-upgrades --dry-run # simulate
> sudo vi /var/log/unattended-upgrades/unattended-upgrades.log # log file
}}}
!Display / Lite to Desktop
Change Raspberry OS lite to [desktop|https://raspberrytips.com/upgrade-raspbian-lite-to-desktop/]. \\
If you need just a console via HDMI, install default desktop for raspberry.\\
This uses wayland for debaian bookworm and PIXEL for older versions.
{{{
> sudo apt install raspberrypi-ui-mods
> sudo raspi-config > System Options > S5 Boot / Auto Login > B3 or B4 to use desktop #use to switch to desktp mode
}}}
The console display is controlled via [cmdline.txt|https://www.raspberrypi.com/documentation/computers/configuration.html#set-the-kms-display-mode].\\
Notes:
* the cmdline.txt must have ONE line only, keep what is in there and append with SPACE as separator
* you can have "video=" only on the first HDMI port (does not work on second)
{{{
> kmsprint | grep Connector # find out which hdmi port is used, you need HDMI-A-1
> sudo vi /boot/firmware/cmdline.txt # edit as ONE line !
append in first line " video=HDMI-A-1:1920x1080M@60,rotate=90" # rotation happens anti-clockwise
}}}
!! 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||Default Max Speed
|USB 3.0 (5Gbps)|625 MB/s
|PCIe 1.0 x1|250 MB/s
|PCIe 2.0 x1|500 MB/s <= default on PI5
|PCIe 3.0 x1|970 MB/s <= can be enabled
|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 seems 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)", which worked flawlessly.
!Drive Speed / Performance Test
see [1|https://forums.raspberrypi.com/viewtopic.php?t=75125] and [2|https://en.wikipedia.org/wiki/GNOME_Disks]\\
{{{
sudo apt-get install gnome-disk-utility
}}}
After that you have following at your desktop: \\
Menu > Zubehör > Laufwerke > Pick One > Three Dots > Leistungstest > Enable Write / Keep Defaults > Start
My results:
[{Table style='width:auto'
||Device||Read MB/s||Write MB/s||Access ms
|USB Seagate Expansion Desk 5TB|134,7-135,4|44,8|16,22-17,05
|USB IcyBox 366-C31 2TB|36,4|30,2|14,61
|m2 Samsung SSD 990 Pro 4TB|471,1|339,6|0,09|PCI 2
|m2 Samsung SSD 990 Pro 4TB|923,1|430,5|0,06|PCI 3
}]
Alternative:
{{{
> sudo apt-get install hdparm
> sudo hdparm -Tt /dev/nvme0n1
/dev/nvme0n1:
Timing cached reads: 5433.18 MB/sec
Timing buffered disk reads: 884.73 MB/s
}}}
!Drive Info
{{{
> sudo blkid # get PARTUUID
> lsblk -f # list devices
> df -h # check size
> fdisk --list # list all devices
> cat /sys/class/block/sdb/device/{model,vendor} # show model+vendor
> lsblk -S # show models of sd*
> lsusb # usb devices info
> usb-devices # detailed usb devices info
change label for ext4:
> sudo e2label /dev/sda1 seagate
> sudo e2label /dev/sdb1 icybox
}}}
!Format
{{{
> 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
mount via PARTUUID (blkid) or /dev/xxx, note: multiple USB device may switch at /dev/xxx after restart, e.g. better to use UUID !!!
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
}}}
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!
Zeile 179: 2 Zeilen hinzugefügt.
sudo raspi-config
??? sudo apt install apt-transport-https <- no need for https ???
Zeile 23: Eine Zeile geändert.
Samba
!Samba
Zeile 76: Eine Zeile geändert.
\\raspberrypi5\Musik => Anmelden
~\\raspberrypi5\Musik => Anmelden\\
or just the device to see all shares\\
~\\raspberrypi5
Zeile 242: 9 Zeilen hinzugefügt.
!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
Zeile 79: 2 Zeilen geändert.
!Logitech Squeezebox Radio
See [mysqueezebox|https://www.mysqueezebox.com/index/Home] | [forum|https://forums.slimdevices.com/forum/user-forums/deutsch/1668931-mysqueezebox-com-und-uesmartradio-com-infrastruktur] | [LMS (Logitech Media Server) Downloads|https://lms-community.github.io/lms-server-repository/]\\
__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
Zeile 82: Eine Zeile geändert.
I followed [StepByStep Instructions by Harald Kreuzer|https://www.haraldkreuzer.net/aktuelles/logitech-media-server-auf-dem-raspberry-pi-4b-mit-5-zoll-display-installieren].
__Current CPU frequency__
{{{
> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq => 15000000
> vcgencmd measure_clock arm => frequency(0)=1500004352
}}}
Zeile 84: Eine Zeile geändert.
Disable swap file
!!Software / Use Cases
! 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 !
* though >wide_links=yes< should allow symbolic links, it is NOT working with minidlna !
* Standard share is media_dir=/var/lib/minidlna, you may want to change at /etc/minidlna.conf
Zeile 86: 4 Zeilen geändert.
sudo service dphys-swapfile stop
sudo systemctl disable dphys-swapfile
sudo apt-get purge dphys-swapfile
sudo apt autoremove
sudo apt install minidlna
sudo service minidlna restart
> minidlnad -h
> sudo minidlnad -R
> sudo service minidlna restart
> sudo rm /var/cache/minidlna/files.db # purge media database
> sudo netstat -ntpl # check port 8200
}}}
Zeile 91: 3 Zeilen geändert.
sudo vi /boot/firmware/cmdline.txt
ADD at the end of line >noswap<
console=[...] noswap
config
{{{
vi /etc/default/minidlna
vi /etc/minidlna.conf # <= edit here
}}}
Zeile 95: 6 Zeilen geändert.
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
! Access Desktop Remotely / VNC
see [remote-access|https://www.raspberrypi.com/documentation/computers/remote-access.html]
VNC - Virtual Network Computing (Remote Framebuffer Protocol)\\
Raspberry comes with realvncserver by default (alternative tightvncserver)
Enable WayVNC
{{{
> sudo raspi-config > Interface options > VNC > Enable
On Windows install [TigerVNC|https://github.com/TigerVNC/tigervnc/releases] > Binary Relases > tigervnc64-1.14.1.exe
Run "TigerVNC Viewer"
Options > Input > Enable "Show dot when no cursor"
Enter IP address > Connect
Zeile 327: 19 Zeilen hinzugefügt.
! 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
}}}
Zeile 347: 19 Zeilen hinzugefügt.
!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
}}}
Zeile 367: 26 Zeilen hinzugefügt.
!! 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
}}}
Zeile 107: Eine Zeile geändert.
Change settings in radio see [https://lms-community.github.io/getting-started/migrate-from-uesr-de/]
!!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
}}}
! Login loop after installing VNC
Error "Unable to drop root (we shouldn't be able to restore it after setuid), refusing to start"
My desktop user was assigned to group "root".\\
=> assign another [primary group|User]
!minidlna does not stream
Do not use symbolic links in your media drive, content there will be listed, but not displayed!
! no diskspace on mmcblk0p2 (SD Card extension partition, e.g. not the boot one)
{{{
> sudo lsblk -f # check partition usage
> df # check where partition is used
> sudo du -h -d 1 # check all folder's usage in current folder
}}}
Solution: with du I could identify that minidlna log captured everything at /var/log/minidlna