2023-02-07, 11:26
Hi all,
I've got a raspberry pi model 4 running Buster, TV headend with the raspberry pi official DTV hat, and ZeroTier that I have not updated to Bullseye just yet. I'm located in the UK.
The last version of kodi that runs smoothly on it is v18. Inspired by a desire to keep modern add-ons that require python 3 (e.g. the BBC podcasts app in the official repository) I have tried to build my own version.
I've built several versions of kodi, and none of them work directly!
a) The latest git checkout branch (link), built with GBM support only, compiled with
This builds completely cleanly with no warnings (just a few compiler notes – e.g. note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<CHttpResponseRange*, std::vector<CHttpResponseRange> >’ changed in GCC 7.1 ) and produces a linked binary that runs cleanly, spits nothing into segfault, and dies almost immediately with the error message
The corresponding point in the log is:
This seems superficially very similar to this issue, and I have placed the line
into my /boot/config.txt accordingly. However, I do not see this taking effect if I cat /proc/cmdline:
b) Building the above with x11 (`-DCORE_PLATFORM_NAME=x11`) produces a binary that "just works" but is not hardware accelerated at all: the CPU usage is 100% on one core and it is not very responsive. It's a backup option and is currently being used .
c) I discovered the 'popcornmix' build scripts which include a wonderfully complicated and sensible looking packaging script:
Cloning with
and running the `kodi_gbm/build_rpi_debian_packages.sh` build scripts again works and produces a beautifully built binary of v20 that appears to be happy and running with gbm, with a responsive UI and hardware acceleration. I initially thought that I'd "solved" it once this happened. However, if I leave live TV playing with tvheadend, stuttering increases unbearably and the sound stops – an illustration of this build in action is here. It starts off fine, but progressively gets worse. I haven't touched tvheadend at all for any of these builds and this behaviour does not happen with the x11 build mentioned above. I've increased the cache size in
but to no avail.
At this point, I'd quite like some help. Can I build a working version of kodi v20 on a raspberry pi 4 with hardware support? Am I missing something obvious? There is nothing shown up either in dmesg, or in the logs beyond the somewhat cryptic "couldn't init gui" and in particular that stuttering bug has no error logged and takes about 20 minutes to appear.
Thoughts very welcome ;-).
I've got a raspberry pi model 4 running Buster, TV headend with the raspberry pi official DTV hat, and ZeroTier that I have not updated to Bullseye just yet. I'm located in the UK.
The last version of kodi that runs smoothly on it is v18. Inspired by a desire to keep modern add-ons that require python 3 (e.g. the BBC podcasts app in the official repository) I have tried to build my own version.
I've built several versions of kodi, and none of them work directly!
a) The latest git checkout branch (link), built with GBM support only, compiled with
Code:
cmake ../Downloads/kodi/ -DWITH_CPU=cortex-a7 -DWITH_ARCH=arm -DCORE_SYSTEM_NAME="linux" -DCMAKE_INSTALL_PREFIX=/usr/local -DAPP_RENDER_SYSTEM=gles -DCORE_PLATFORM_NAME=gbm -DVERBOSE=1 -DENABLE_OPENGL=off -DENABLE_OPENGLES=on -DENABLE_VAAPI=OFF
This builds completely cleanly with no warnings (just a few compiler notes – e.g. note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<CHttpResponseRange*, std::vector<CHttpResponseRange> >’ changed in GCC 7.1 ) and produces a linked binary that runs cleanly, spits nothing into segfault, and dies almost immediately with the error message
Code:
ERROR: Unable to create GUI. Exiting
The corresponding point in the log is:
Code:
critical <general>: CApplication::CreateGUI - unable to init windowing system
This seems superficially very similar to this issue, and I have placed the line
Code:
dtoverlay=vc4-fkms-v3d,cma-265
into my /boot/config.txt accordingly. However, I do not see this taking effect if I cat /proc/cmdline:
Code:
$ cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60i,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:88:AB:B1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=bee78e8a-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
b) Building the above with x11 (`-DCORE_PLATFORM_NAME=x11`) produces a binary that "just works" but is not hardware accelerated at all: the CPU usage is 100% on one core and it is not very responsive. It's a backup option and is currently being used .
c) I discovered the 'popcornmix' build scripts which include a wonderfully complicated and sensible looking packaging script:
Cloning with
Code:
git clone --depth 1 -b gbm_nexus https://github.com/popcornmix/xbmc.git kodi_gbm
and running the `kodi_gbm/build_rpi_debian_packages.sh` build scripts again works and produces a beautifully built binary of v20 that appears to be happy and running with gbm, with a responsive UI and hardware acceleration. I initially thought that I'd "solved" it once this happened. However, if I leave live TV playing with tvheadend, stuttering increases unbearably and the sound stops – an illustration of this build in action is here. It starts off fine, but progressively gets worse. I haven't touched tvheadend at all for any of these builds and this behaviour does not happen with the x11 build mentioned above. I've increased the cache size in
Code:
$ cat ~/.kodi/userdata/advancedsettings.xml
<advancedsettings>
<cache>
<!--- The three settings will go in this space, between the two cache tags. --->
<buffermode>1</buffermode>
<memorysize>209715200</memorysize>
<readfactor>10</readfactor>
</cache>
</advancedsettings>
but to no avail.
At this point, I'd quite like some help. Can I build a working version of kodi v20 on a raspberry pi 4 with hardware support? Am I missing something obvious? There is nothing shown up either in dmesg, or in the logs beyond the somewhat cryptic "couldn't init gui" and in particular that stuttering bug has no error logged and takes about 20 minutes to appear.
Thoughts very welcome ;-).