# Kodi cant start after upgrade to bullseye

**URL:** https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688
**Category:** Troubleshooting
**Created:** [25 April 2023 00:05 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688 "2023-04-25T00:05:06Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [25 April 2023 00:05 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/1 "2023-04-25T00:05:06Z")

</div>

### Creating a bug report/issue

#### Required Information

- DietPi version | `cat /boot/dietpi/.version`

```auto
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 →

- Bug report ID | `echo $G_HW_UUID`  
Kodi crashlog:  
[kodi\_crashlog-20230425\_012844.log](https://dietpi.com/forum/uploads/short-url/jyTzagdAvD0ApDqPRlKN6TAyEqP.log) (26,0 KB)

#### Steps to reproduce

1. start kodi
2. 

#### 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 😃

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [25 April 2023 07:44 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/2 "2023-04-25T07:44:01Z")

</div>

> [@Adanel](#):
>
> - 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

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.

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

```

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [25 April 2023 08:19 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/3 "2023-04-25T08:19:31Z")

</div>

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](https://dietpi.com/forum/uploads/short-url/89dFThxcK7G29Onw0NaRVFhm4mg.log) (21,6 KB)

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [25 April 2023 20:46 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/4 "2023-04-25T20:46:16Z")

</div>

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](https://dietpi.com/forum/uploads/short-url/ytDEWxOQkvueOIVKNfPvZ4ANmgI.log) (26,7 KB)

Once again the system info:

- DietPi version | `cat /boot/dietpi/.version`

```auto
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

```auto
bullseye 0

```

- Kernel version | `uname -a`

```auto
Linux mediapi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

```

- Architecture | `dpkg --print-architecture`

```auto
arm64

```

- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)

```auto
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](https://dietpi.com/forum/t/nextcloud-calender-contact-backup-script/5911/8)

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [25 April 2023 20:59 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/5 "2023-04-25T20:59:05Z")

</div>

which user you are using to start Kodi?

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [25 April 2023 21:05 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/6 "2023-04-25T21:05:00Z")

</div>

Root and dietpi  
Same results

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [26 April 2023 07:15 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/7 "2023-04-26T07:15:42Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [27 April 2023 20:07 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/8 "2023-04-27T20:07:58Z")

</div>

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

```sh
dietpi-software reinstall 31

```

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

> **[DietPi - How to upgrade to "Bullseye" - DietPi blog](https://dietpi.com/blog/?p=811#2.2.4-software-migrations)**
>
> Debian 11 (aka Debian Bullseye) has been released on August 14, 2021. This description gives the how to upgrade a system and why you should do it.

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [2 May 2023 15:49 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/9 "2023-05-02T15:49:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [2 May 2023 17:37 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/10 "2023-05-02T17:37:31Z")

</div>

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 🤔.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [2 May 2023 17:49 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/11 "2023-05-02T17:49:33Z")

</div>

@MichaIng I guess it is real 64bit now

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [2 May 2023 18:07 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/12 "2023-05-02T18:07:03Z")

</div>

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

```auto
eglSwapBuffers failed (EGL_BAD_ALLOC)

```

?

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

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [2 May 2023 21:05 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/13 "2023-05-02T21:05:58Z")

</div>

Yes it is the same eglSwapBuffers failed error.

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

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [2 May 2023 21:38 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/14 "2023-05-02T21:38:19Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [3 May 2023 06:19 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/15 "2023-05-03T06:19:46Z")

</div>

[config.txt](https://dietpi.com/forum/uploads/short-url/vN7ze9i70Nqn5tC3emwm2x3etx3.txt) (3,0 KB)

Attached the requested `/boot/config.txt`

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [6 May 2023 18:46 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/16 "2023-05-06T18:46:19Z")

</div>

Any Updates?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [6 May 2023 19:25 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/17 "2023-05-06T19:25:38Z")

</div>

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?

```sh
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.

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [6 May 2023 20:09 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/18 "2023-05-06T20:09:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [6 May 2023 20:25 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/19 "2023-05-06T20:25:57Z")

</div>

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?

> [@Adanel](#):
>
> 76MB was not an option here

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.

---

<div class="post-metadata">

### Author: ![Adanel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@Adanel](https://dietpi.com/forum/u/Adanel)
#### Post date: [6 May 2023 22:08 UTC](https://dietpi.com/forum/t/kodi-cant-start-after-upgrade-to-bullseye/16688/20 "2023-05-06T22:08:42Z")

</div>

> [@MichaIng](#):
>
> How much RAM does your RPi 4 has overall?

I have the 4GB model
