User Tools

Site Tools


doc:appunti:hardware:raspberrypi_3

This is an old revision of the document!


Kodi on the Raspberry Pi 3

Running Kodi 19.4 on the Raspberry Pi 3 Model B Plus Rev 1.3 with Raspberry Pi OS based on Debian 11.9, I experienced some weird crash of the Kodi interface: sometimes the Kodi process suddendly restart while I'm browsing a folder with about 200 video items.

The error messages are revealed by the dmesg output:

[  848.225919] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from GEM DMA helper:
[  848.226063] vc4-drm soc:gpu: [drm]                            V3D: 210408kb BOs (1132)
[  848.226074] vc4-drm soc:gpu: [drm]                     V3D shader:     56kb BOs (14)
[  848.226081] vc4-drm soc:gpu: [drm]                           dumb:   2040kb BOs (1)
[  848.226088] vc4-drm soc:gpu: [drm]                         binner:  16384kb BOs (1)
[  848.226095] vc4-drm soc:gpu: [drm]                total purged BO:   1028kb BOs (2)

As you can see the V3D used 210408 kb of the DRM memory, where the default size reserved is 262144 kb. You can see it into dmesg output to:

With the default settings you can read the following using dmesg:

[    0.000000] Reserved memory: created CMA memory pool at 0x1ec00000, size 256 MiB

To reserve more memory for the CMA, add the following line into /boot/config.txt

# Default cma reserved memory is 256 Mb, use 480 instead.
dtoverlay=cma,cma-size=503316480

Because the total memory is limited to 1 Gb, it is advisable to reserve less memory for the GPU; in /boot/config.txt put also:

gpu_mem=128

At next reboot I verified that the new setting is in place, checking the dmesg output:

[    0.000000] Reserved memory: created CMA memory pool at 0x13c00000, size 432 MiB
[    0.000000] Memory: 317648K/786432K available (10240K kernel code, 1452K rwdata,
               2900K rodata, 1024K init, 613K bss, 26416K reserved, 442368K cma-reserved)

Verify also that the system has enough free memory once the Kodi program is started, use the free commando to get:



doc/appunti/hardware/raspberrypi_3.1711058112.txt.gz · Last modified: 2024/03/21 22:55 by niccolo