How to install KODI 18.7 on Bullseye? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to install KODI 18.7 on Bullseye?

Post by MichaIng »

CEC should now work as the RPi Foundation has released iibcec6 on their repository.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install KODI 18.7 on Bullseye?

Post by Joulinar »

@ISquishWorms
ok I did some testing and indeed on RPi3B+ Kodi is not starting correctly. However I found a workaround. If you have Kodi installed already, just run following as user root

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d
reboot
@MichaIng
I guess we need to adjust our install options on RPi3B
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to install KODI 18.7 on Bullseye?

Post by MichaIng »

No, the full KMS driver should definitely work, if the fake KMS driver does. So:

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-kms-v3d
reboot
should work. However, experimenting with our package isn't necessary anymore as there is now one provided via RPi repository. Please try:

Code: Select all

echo 'deb https://archive.raspberrypi.org/debian/ bullseye main untested' > /etc/apt/sources.list.d/raspi.list
apt update
apt install --reinstall --allow-downgrades kodi
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install KODI 18.7 on Bullseye?

Post by Joulinar »

@MichaIng
it was a 64bit on RPi3B+, therefore Debian package was used if I'm not mistaken. During install of Kodi, we explicitly set

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl disable
and not the KMS driver
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
ISquishWorms
Posts: 32
Joined: Thu Jan 31, 2019 2:01 am

Re: How to install KODI 18.7 on Bullseye?

Post by ISquishWorms »

@Joulinar and @MichaIng

Thank you both for helping with this.

I first tried Joulinar's suggestion of using the following command:

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d
reboot
I can report that this worked and I was happy as Kodi was able to load on boot and CEC is now working too.

I also then went on to try the command posted in a follow up post by Michalng as shown here:

Code: Select all

echo 'deb https://archive.raspberrypi.org/debian/ bullseye main untested' > /etc/apt/sources.list.d/raspi.list
apt update
apt install --reinstall --allow-downgrades kodi
I can report that after running those commands Kodi is working and so is CEC.

So both suggestions appear to resolve the issue of Kodi not loading.

Thank you both again for your time and effort. I can now finaly watch stuff again using Kodi. :)
ISquishWorms
Posts: 32
Joined: Thu Jan 31, 2019 2:01 am

Re: How to install KODI 18.7 on Bullseye?

Post by ISquishWorms »

Well I guess there is good news and bad news.

The good news is Kodi now loads and CEC is working.

The bad news is that now playback of videos are choppy, these are the same video files that used to play back fine on Kodi for Buster.

Is it that Bullseye/Kodi is just too much for the Pi 3 now? Is this something that can and will get fixed in time? If so I will hold out for the fix and just do away with not using Kodi for now. If this is something that cannot be made to work as it was when using Buster than I will probably just restore my backup of Buster and stick with that.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install KODI 18.7 on Bullseye?

Post by Joulinar »

Probably something to report to RPi Devs as we don't build the Kodi package :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to install KODI 18.7 on Bullseye?

Post by MichaIng »

First of all, indeed we apply currently the wrong graphics driver on 64-bit Bullseye RPi images for RPi 2 and 3. Since Bullseye, the KMS driver needs to be used in every case. I just fixed that: https://github.com/MichaIng/DietPi/commit/1141162
Although, now I wonder whether this works fine on 64-bit RPi 3 Buster :?, where the older Debian package without GBM support is used. But actually the framebuffer devices are available even with KMS enabled, so it should, and X should run better with KMS in general.

Generally, for Kodi do not use the "fKMS" (fake KMS) driver but the "KMS" (full KMS) driver now. This might lead also to slightly better performance:

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-kms-v3d
Next, the new Bullseye kernel/firmware does not ship with the previous video decoder libraries anymore but uses libcamera and V4L2 libraries for decoding, depending on kernel modules which were previously used for the RPi camera only. So what could be tested is to remove the blacklists for the camera modules:

Code: Select all

rm /etc/modprobe.d/dietpi-disable_rpi_camera.conf
modprobe bcm2835_codec bcm2835_v4l2 bcm2835_isp
On RPi 4 additionally for HEVC and 4k support:

Code: Select all

G_CONFIG_INJECT 'dtoverlay=rpivid-v4l2' 'dtoverlay=rpivid-v4l2' /boot/config.txt
G_CONFIG_INJECT 'dtoverlay=vc4-kms-v3d' dtoverlay=vc4-kms-v3d,cma-512' /boot/config.txt
ISquishWorms
Posts: 32
Joined: Thu Jan 31, 2019 2:01 am

Re: How to install KODI 18.7 on Bullseye?

Post by ISquishWorms »

I tried applying the fix and changing the graphics driver using the command:

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-kms-v3d
After doing so I rebooted the Pi3.

I noticed that after changing the driver that the TV does not automatically turn itself on during a reboot of the Pi3 like it does when using the fake driver. I also had no sound with the videos I tried to play. Maybe the TV not turning itself on during reboot is connected in some way with the sound no longer working?

The video files still were lagging during playback. Nothing seemed to have changed other than the TV did not auto turn itself on and the sound was missing during playback as well.

I then removed the blacklists for the camera modules as suggested, and rebooted, but this did not seem to change anything. I still had no sound; TV would not auto turn on when rebooting Pi3 and video playback was still choppy.

Finally, I reverted back to the fake driver using the command:

Code: Select all

/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d
Having done so the TV turn would turn itself on during a reboot of the Pi3 and I also had sound when playing videos although playback of them is still choppy as before.

Maybe trying to run PiHole, Unbound and Kodi on a Pi3 is too much? Though before I updated to Bullseye I was running, PiHole, cloudflared (manual install by myself which PiHole was using), Emby, Kodi.
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to install KODI 18.7 on Bullseye?

Post by MichaIng »

Pi-hole and Unbound do not cause any relevant CPU usage, and zero GPU usage, so that doesn't matter at all.

What do you mean by "TV does not automatically turn itself on", does it not turn on at all, or only not "automatically" while you can trigger it somehow "manually"?

The issue with the sound with KMS is a good point. It adds additional HDMI audio devices for reasons I do not yet understand, hence the sound card index needs to be incremented. So in /etc/asound.conf you need to increment the card index by one in every occurrence, hence e.g. card 0 must become card 1. On RPi 4 it even needs to be incremented by 2 as two additional HDMI devices are created, one for each HDMI port.
Post Reply