User Tools

Site Tools


doc:appunti:hardware:raspberrypi_nas_kodi

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
doc:appunti:hardware:raspberrypi_nas_kodi [2022/05/28 16:55] – [RaspiOS 11 Bullseye] niccolodoc:appunti:hardware:raspberrypi_nas_kodi [2023/06/10 17:24] (current) – [RaspiOS 11 Bullseye] niccolo
Line 1: Line 1:
-====== Raspberry Pi NAS: Kodi and multimedia ======+====== Kodi on a Raspberry Pi NAS ======
  
 This page is about configuring **[[wp>Kodi_(software)|Kodi]]** on a Raspberry Pi installed with RaspiOS, to be used as NAS and mediacenter. See the main index at **[[raspberrypi_nas]]**. This page is about configuring **[[wp>Kodi_(software)|Kodi]]** on a Raspberry Pi installed with RaspiOS, to be used as NAS and mediacenter. See the main index at **[[raspberrypi_nas]]**.
Line 5: Line 5:
 ===== RaspiOS 11 Bullseye ===== ===== RaspiOS 11 Bullseye =====
  
-Default installation on the **Raspberry Pi 4** of the Raspberry Pi OS based on **Debian 11 Bullseye** is rather satisfactory in terms of optimization; no special settings are required in **raspi-config** nor tweaking of **/boot/cmdline.txt** or **/boot/config.txt**.+**Debian 11 Bullseye** includes Kodi 19.1 or [[https://packages.debian.org/bullseye-backports/kodi|Kodi 19.4 as a backport]]; the derivative **RaspiOS** includes Kodi 19.4 natively instead. Default installation on the **Raspberry Pi 4** of the Raspberry Pi OS based on **Debian 11 Bullseye** is rather satisfactory in terms of optimization; no special settings are required in **raspi-config** nor tweaking of **/boot/cmdline.txt** or **/boot/config.txt**.
  
 If your system has undergone some software upgrades, it is recommended to check the content of **config.txt** for obsolete or wrong settings. This is the default content after a vanilla installation: If your system has undergone some software upgrades, it is recommended to check the content of **config.txt** for obsolete or wrong settings. This is the default content after a vanilla installation:
Line 26: Line 26:
 The **vc4-kms-v3d** overlay is particularly important. The GPU of the **Pi 4** is a **VideoCore VI** capable of **OpenGL ES 3.2**, this requires a specific driver, different from the one required e.g. by the Raspberry Pi 3, which has a VideoCore IV GPU capable only of OpenGL ES 2.0. The codename of the driver is **VC4** for the old GPU and **V3D** for the newer one. Loading the **vc4-kms-v3d** overlay, the device tree sorts out which exact node is enabled, be it VC4 or VC6. They both get aliased to "v3d", therefore the overlay will enable the right variant for the board. The **vc4-kms-v3d** overlay is particularly important. The GPU of the **Pi 4** is a **VideoCore VI** capable of **OpenGL ES 3.2**, this requires a specific driver, different from the one required e.g. by the Raspberry Pi 3, which has a VideoCore IV GPU capable only of OpenGL ES 2.0. The codename of the driver is **VC4** for the old GPU and **V3D** for the newer one. Loading the **vc4-kms-v3d** overlay, the device tree sorts out which exact node is enabled, be it VC4 or VC6. They both get aliased to "v3d", therefore the overlay will enable the right variant for the board.
  
-The **legacy KMS driver** developed for the Raspberry up to version 3 does not work with the newer Pi 4, because video hardware acceleration support was dropped (the Pi4 is powerfull enough to do 3D video and OpenGL in software). Operating system before Debian 10 Buster required the now obsolete **vc4-fkms-v3d** overlay on the **Raspberry Pi 4**, i.e. the //Fake Kernel Mode Setting//, because at that time it was the best option. Now we should go with the **vc4-kms-v3d**.+The **legacy KMS driver** developed for the Raspberry up to version 3 does not work with the newer Pi 4, because video acceleration support was removed from the hardware (the Pi4 is powerfull enough to do 3D video and OpenGL in software). Operating system before Debian 10 Buster required the now obsolete **vc4-fkms-v3d** overlay on the **Raspberry Pi 4**, i.e. the //Fake Kernel Mode Setting// (a software driver based on the now obsoleted DispmanX Broadcom API), because at that time it was the best option. Now we should go with the Linux standard APIs **vc4-kms-v3d**.
  
 Another usefull option is **arm_boost=1**, which works only on some more recent Raspberry Pi 4: it enable the increase of the clock rate from 1.5 GHz to 1.8 GHz. Not all the Pi 4 are able to swith to 1.8 GHz, only the ones witht the three components highlighted into the **{{.:raspberrypi:raspberry-pi-white-ring-500x592.png?linkonly|this picture}}**. Another usefull option is **arm_boost=1**, which works only on some more recent Raspberry Pi 4: it enable the increase of the clock rate from 1.5 GHz to 1.8 GHz. Not all the Pi 4 are able to swith to 1.8 GHz, only the ones witht the three components highlighted into the **{{.:raspberrypi:raspberry-pi-white-ring-500x592.png?linkonly|this picture}}**.
  
 +Check for other unnecessary configuration options in **[[https://www.raspberrypi.com/documentation/computers/config_txt.html|/boot/config.txt]]**, like **start_x=1** needed on the Pi 3 to play VP6, VP8, Theora and alike encoded files. Kernel options added into **/boot/cmdline.txt** may be obsolete too, e.g. the **elevator=deadline** was suggested as an alternative to the //cfq// scheduler when minimizing I/O latency is more important than maximizing I/O throughput, but it does not exist in recent Linux kernels in Bullseye.
 +
 +==== Swap file ====
 +
 +The default RaspiOS installation will enable a swap file to support system memory. Using the **free** command you can see that a 100 Mb swap file was enabled:
 +
 +<code>
 +               total        used        free      shared  buff/cache   available
 +Mem:         3931052      274392       55828      105748     3600832     3397328
 +Swap:         102396      102396           0
 +</code>
 +
 +The swap file is **/var/swap** and unfortunately it is on the very slow **SD card**. Having 4 Gb of RAM it is preferable to disable the swap file at all, just using the systemd **dphys-swapfile** service:
 +
 +<code>
 +systemctl stop dphys-swapfile.service
 +systemctl disable dphys-swapfile.service
 +</code>
 +
 +==== Web References ====
 +
 +  * **[[https://forums.raspberrypi.com/viewtopic.php?t=323303|Kodi on Bullseye RPiOS]]**
 +  * **[[https://forums.raspberrypi.com/viewtopic.php?f=66&t=251645|Kodi on Raspberry Pi OS / Raspbian Buster]]** (not Bullseye!)
   * **[[https://forums.raspberrypi.com/viewtopic.php?t=255478|Full KMS vs Fake KMS vs Legacy driver]]**   * **[[https://forums.raspberrypi.com/viewtopic.php?t=255478|Full KMS vs Fake KMS vs Legacy driver]]**
   * **[[https://forums.raspberrypi.com/viewtopic.php?t=325836|arm_boost]]**   * **[[https://forums.raspberrypi.com/viewtopic.php?t=325836|arm_boost]]**
doc/appunti/hardware/raspberrypi_nas_kodi.1653749755.txt.gz · Last modified: 2022/05/28 16:55 by niccolo