Kodi cant start after upgrade to bullseye

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=16
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'

echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 1

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bullseye 1

  • Kernel version | uname -a
    Linux mediapi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | dpkg --print-architecture
    armhf

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    RPi 4 Model B (aarch64)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
    Kodi
  • Was the software title installed freshly or updated/migrated?
    Kodi worked before, i reinstalled it and also uninstall + new install
  • Can this issue be replicated on a fresh installation of DietPi?
    Dunno

ā† If you sent a ā€œdietpi-bugreportā€, please paste the ID here ā†’

Steps to reproduce

  1. start kodi

Expected behaviour

Kodi should start just fine like before the upgrade.

Actual behaviour

Kodi cant start.

Extra details

  • After the upgrade on the boot a line appears:
    dietpi reserved mem failed to allocate memory cma,linux
    This is new just like the error when starting codie.

Im kinda a linux noob so maybe im missing something completely obvious.
Please help. Iā€™ve just made to update so i can run netflix from kodi :smiley:

ok, on new Raspbian kernel 6.1 a feature become available to force kernel on RPi4 SBC into 64bit mode, even if your system is 32bit armhf still. Not sure if this has any influence but we could switch kernel back to 32bit. Pls add following into /boot/config.txt and reboot your system.

#disable 64bit mode on 32bit system
arm_64bit=0

Ok, did what you told:

$ uname -a
Linux mediapi 6.1.21-v7l+ #1642 SMP Mon Apr 3 17:22:30 BST 2023 armv7l GNU/Linux

But same:
kodi_crashlog-20230425_100726.log (21,6 KB)

Ok, I reinstalled dietpi on a new sd card so that I have a clean start.
Unfortunately I keep getting the same error.

kodi_crashlog-20230425_222905.log (26,7 KB)

Once again the system info:

  • DietPi version | cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=16
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'

*echo $G_DISTRO_NAME $G_RASPBIAN

bullseye 0
  • Kernel version | uname -a
Linux mediapi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | dpkg --print-architecture
arm64
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
RPi 4 Model B (aarch64)

Iā€™ve tried both vc4-kms-v3d (which gives the above error) and vc4-fkms-v3d with this error:

ERROR: Unable to create GUI. Exiting

PS:
Thanks to you guys I was able to backup my nextcloud database and restore it on the new installation. Thanks a lot for the effort. Maybe out this on the nextcloud docs?
https://dietpi.com/forum/t/nextcloud-calender-contact-backup-script/5911/8

which user you are using to start Kodi?

Root and dietpi
Same results

just checked Kodi installation on my RPi4B 64bit test system and Kodi is starting fine after reboot.

@MichaIng could you have a look what the issue might be?

Full KMS needs to be enabled, and some further features make sense on RPi 4. At best just reinstall it:

dietpi-software reinstall 31

Hmm, actually this is already part of the guide, did you do the reinstall from here?

Sorry for the delayed reply, I was on a short holiday trip this weekend.

And yes, Iā€™ve followed the blog post.
But i have already done a new image with a completely new sd card (extreme pro 64gig) and i get the same error as before. I can only thing of whats changed compared to the original working setup is bulleye from buster and 64bit from 32bit.

Did you try to again apply arm_64bit=0 (and reboot)?

And please show your /boot/config.txt.

If this was a general issue, e.g. since Linux 6.1 or so, Iā€™d expect more reports, since Kodi is widely used :thinking:.

@MichaIng I guess it is real 64bit now

1 Like

Ah right makes sense. The crash look look the same, the last error as well is

eglSwapBuffers failed (EGL_BAD_ALLOC)

?

How did you start Kodi? From desktop session or plain console? With which command exactly?

Yes it is the same eglSwapBuffers failed error.

I tried using the startkodi command and kodi as root.
And im using plain console.

Please show your /boot/config.txt.

This error gives a huge number of search results for various different reasons, so that alone doesnā€™t help much to find out what it is about.

We need to try to replicate it. Iā€™ll find time for time tomorrow evening.

config.txt (3,0 KB)

Attached the requested /boot/config.txt

Any Updates?

You can revert to default 76 MiB GPU memory btw, 512 MiB is complete overkill with recent kernel and just reduces the available system memory.

This doesnā€™t change something, does it?

sed -i -e '/rpivid-v4l2/d' -e 's/,cma-512$//' /boot/config.txt
reboot

On my RPi 2, Kodi starts up fine with startkodi from plain console, so at least on 32-bit I cannot replicate it either.

I tried this, but got the same error.

I then changed the GPU memory to 96 via dietpi-config (76MB was not an option here) and finally it worked again!

Did a bit of testing:

  • 256MB ā†’ Kodi starts fine
  • changed it back to 512 ā†’ kodi crashed with the same error
  • 384MB ā†’ Kodi starts fine

So 512MB is indeed the problem here.

Great that it works now. I wouldnā€™t have guessed that too much GPU memory breaks things, as long as you still have sufficient system memory. How much RAM does your RPi 4 has overall?

Ah right, we need to rework this to have the default value as option, which is 64 MiB on <1 GiB RAM RPi models and 76 MiB on all models with 1 GiB or more (so all RPi 2/3/4 anyway). With KMS and CMA on latest kernel, according to RPi devs and others, more is nearly never required. From Bullseye on the dietpi-config menu should reflect this fact.

I have the 4GB model