jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 1:31 pm

Hello. Had a google around and searched on here and the kodi forums, but couldn’t find anything specific to this. I have Kodi installed on my 3B+ running the latest 32-bit Raspberry Pi OS (Buster). I installed Kodi using the standard apt install command, so it’s from the Raspbian repos.

I just did a apt update and apt upgrade and saw that the firmware and kernel was updated. I’m now running the 5.4 kernel. But now Kodi is broken.

It’s much slower to startup, sometimes not starting up at all. Other times it does start up but the screen tears before I’ve even done anything. The furthest I’ve been able to do is navigate through a few menus, but I can’t get far before it just stops responding. The funny thing is is that apparently it isn’t crashing, or at least, there are now kodi crash logs being placed in the home folder. It simply stops responding.

This has come about since I did the apt upgrade today so it must have something to do with that. Is anyone else having this issue?

LTolledo
Posts: 3744
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 2:14 pm

just did an update and full-upgrade on my RPi3BP1, a few short minutes prior to writing this post

Code: Select all

pi@RPi3BP1:~ $ uname -a
Linux RPi3BP1 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
Kodi still starts as expected, no delays whatsoever....

so how did you get "5.4"?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 2:30 pm

Like I said, I used the normal apt command.

Code: Select all

sudo apt update && sudo apt upgrade
I can even see it in my bash history. I also restarted afyer the upgrade. Did you do a reboot? My uname -a gives 5.4.51-v7+ as the kernel version.

fruitoftheloom
Posts: 23802
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 2:43 pm

jimbojones wrote:
Mon Jul 20, 2020 2:30 pm
Like I said, I used the normal apt command.

Code: Select all

sudo apt update && sudo apt upgrade
I can even see it in my bash history. I also restarted afyer the upgrade. Did you do a reboot? My uname -a gives 5.4.51-v7+ as the kernel version.

Please use full-upgrade as per:

https://www.raspberrypi.org/documentati ... pdating.md
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 2:49 pm

Just finished updating here on RPi 3 and one RPi 4 via apt, got kernel 5.4, and Kodi works just fine on both.

trejan
Posts: 2327
Joined: Tue Jul 02, 2019 2:28 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 2:50 pm

LTolledo wrote:
Mon Jul 20, 2020 2:14 pm
so how did you get "5.4"?
The raspberrypi-kernel package was changed from 4.19 to 5.4.

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 3:00 pm

Rascas wrote:
Mon Jul 20, 2020 2:49 pm
Just finished updating here on RPi 3 and one RPi 4 via apt, got kernel 5.4, and Kodi works just fine on both.
Interesting. Do you have kodi installed from the raspbian repo? Do you have any non-standard config settings? Which video driver do you use?

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 3:06 pm

jimbojones wrote:
Mon Jul 20, 2020 3:00 pm
Rascas wrote:
Mon Jul 20, 2020 2:49 pm
Just finished updating here on RPi 3 and one RPi 4 via apt, got kernel 5.4, and Kodi works just fine on both.
Interesting. Do you have kodi installed from the raspbian repo? Do you have any non-standard config settings? Which video driver do you use?
Yes, Kodi 18.7, latest version from Raspbian Repo. Standard config.txt. FKMS on RPi 4 and Legacy/proprietary video drivers on RPi 3. That is the recommend stuff.

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 3:53 pm

Rascas wrote:
Mon Jul 20, 2020 3:06 pm
jimbojones wrote:
Mon Jul 20, 2020 3:00 pm
Rascas wrote:
Mon Jul 20, 2020 2:49 pm
Just finished updating here on RPi 3 and one RPi 4 via apt, got kernel 5.4, and Kodi works just fine on both.
Interesting. Do you have kodi installed from the raspbian repo? Do you have any non-standard config settings? Which video driver do you use?
Yes, Kodi 18.7, latest version from Raspbian Repo. Standard config.txt. FKMS on RPi 4 and Legacy/proprietary video drivers on RPi 3. That is the recommend stuff.
Ok, strange, same as my setup. Do you have any overclocking in your setup? I wanted to get back to as standard a config as I possible, so I took away all non-standard configs from my config.txt, which were all overclocking options, and now Kodi seems to be working ok. All these overclocking options were working fine on the 4.19 branch. If these are the cause of the issue it’s interesting that 5.4 caused instability with the exact same options.

EDIT: Sorry - I see you already said standard config.txt. I’m guessing that if Kodi continues to be stable on my 3B+ now, then it must be the overclocking options that are causing the instability on 5.4, as that’s the only thing I’ve changed.

User avatar
DougieLawson
Posts: 39539
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 4:13 pm

Open an issue at https://github.com/hexxeh/rpi-firmware or if you can narrow it down to a specific piece of the kernel then open an issue at https://github.com/raspberrypi/linux.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 5:09 pm

Ok, I think I have narrowed this down the gpu_freq config. I had this set to 500

Code: Select all

gpu_freq=500
in config.txt. On the 4.19 branch of kernel this was never an issue. On 5.4 it seems to be causing the freezes and lockups that I mentioned. I will open a case on github like DougieLawson recommends. In the meantime, it would be great if anyone with a 3B+ on the 5.4 branch wouldn’t mind trying to add gpu_freq=500 to their config.txt and check if that also causes instability in Kodi for them.

my-pi-x
Posts: 23
Joined: Thu May 28, 2020 8:22 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 5:29 pm

PI4
runlevel
N 3
uname -a
5.4.51-v8+ #1326 SMP PREEMPT Fri Jul 17 10:58:13 BST 2020 aarch64 GNU/Linux
no problem

who
xbmc tty1 2020-07-20 17:39

xbmc is the default user for kodi
xbmc can't use sudo because "sudo" was purged!

Never use kodi with sudo and without password!!!

Since there is a problem under raspbian and kodi with the access rights i deleted the x-server and changed from runlevel 5 to runlevel 3!

Kodi is working fine in runlevel 3 on my PI4 under
5.4.51-v8+ #1326 SMP PREEMPT Fri Jul 17 10:58:13 BST 2020 aarch64 GNU/Linux
also under
5.4.51-v8+ #1325 SMP PREEMPT Mon Jul 13 13:54:12 BST 2020 aarch64 GNU/Linux
Now i changed in the /boot/config.txt

arm_64bit=1
to
#arm_64bit=1

and rebooted
uname -a
5.4.51-v7l+ #1326 SMP Fri Jul 17 10:51:18 BST 2020 armv7l GNU/Linux
Kodi is still running/working

So, never ever use kodi with root-rights!

-->

https://forum.kodi.tv/showthread.php?tid=352991


btw.:
kernel 5.4.51 is outdated.
kernel 5.4.52 is up-to-date but missing for raspberry ... fixed ath9 problem!

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 5:49 pm

my-pi-x wrote:
Mon Jul 20, 2020 5:29 pm
PI4
runlevel
N 3
uname -a
5.4.51-v8+ #1326 SMP PREEMPT Fri Jul 17 10:58:13 BST 2020 aarch64 GNU/Linux
no problem

who
xbmc tty1 2020-07-20 17:39

xbmc is the default user for kodi
xbmc can't use sudo because "sudo" was purged!

Never use kodi with sudo and without password!!!

Since there is a problem under raspbian and kodi with the access rights i deleted the x-server and changed from runlevel 5 to runlevel 3!

Kodi is working fine in runlevel 3 on my PI4 under
5.4.51-v8+ #1326 SMP PREEMPT Fri Jul 17 10:58:13 BST 2020 aarch64 GNU/Linux
also under
5.4.51-v8+ #1325 SMP PREEMPT Mon Jul 13 13:54:12 BST 2020 aarch64 GNU/Linux
Now i changed in the /boot/config.txt

arm_64bit=1
to
#arm_64bit=1

and rebooted
uname -a
5.4.51-v7l+ #1326 SMP Fri Jul 17 10:51:18 BST 2020 armv7l GNU/Linux
Kodi is still running/working

So, never ever use kodi with root-rights!

-->

https://forum.kodi.tv/showthread.php?tid=352991


btw.:
kernel 5.4.51 is outdated.
kernel 5.4.52 is up-to-date but missing for raspberry ... fixed ath9 problem!
Kodi itself doesn't need sudo or runs as root. Kodi by default, at least on Debian based OSs, either ARM or x86, by default runs as the user who start it.
This was explained here on this forum and Kodi forum (for example in the link you posted) but here it goes again:
Kodi on Raspbian and most other OSs for the Raspberry Pi is compiled with GBM instead of X11 for better performance, but it has its limitations. One of them is that if you are running a Desktop Environment (anything than runs on X server) for Kodi to run, it needs to change Virtual Terminal (any other which isn't running anything that requires X) otherwise it won't work. And for changing Virtual Terminal in Linux, the user needs to have super user permissions or to be root. But Kodi itself doesn't run as root. You can check by running, for example "top", via ssh when Kodi is running. You can also check Kodi launch script in /usr/bin/kodi which has the code to start Kodi.

PS: this unrelated to OPs problem, just an apart.

my-pi-x
Posts: 23
Joined: Thu May 28, 2020 8:22 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 6:26 pm

Try it by yourself:
Kodi itself doesn't need sudo or runs as root.
sudo -i
passwd
create a password for root

aptitude purge sudo
apt purge sudo

Then try to start kodi.
PS: this unrelated to OPs problem, just an apart.
For sure, the OP made a mistake.

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 7:03 pm

my-pi-x wrote:
Mon Jul 20, 2020 6:26 pm
Try it by yourself:
Kodi itself doesn't need sudo or runs as root.
sudo -i
passwd
create a password for root

aptitude purge sudo
apt purge sudo

Then try to start kodi.
PS: this unrelated to OPs problem, just an apart.
For sure, the OP made a mistake.
Looks like you didn't understood much of what I said.
Yes, I and everybody can run Kodi without sudo or with sudo completly removed from the system just fine, if I start it from a Virtual Terminal that isn't running Xorg Server.

OPs problem is the overclocking.

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 10:44 pm

@my-pi-x I'm not sure if you are talking about the same issue I am having. I am not running Kodi as sudo. I am running Kodi as the pi user, launching Kodi from the Desktop logged in as user pi.

As for my issue, I believe I have narrowed this down further to two specific overclock settings, with h264_freq and v3d_freq being the problematic settings, although h264_freq is the much more consistently problematic.

Turning off all other overclock settings but leaving

Code: Select all

h264_freq=500
results in Kodi freezing upon startup. Having all other overclock options on, except for h264_freq results in Kodi operating fine (except with occasional issues with

Code: Select all

v3d_freq=500
). Can anyone else reproduce this issue?

I have opened a github ticket here https://github.com/Hexxeh/rpi-firmware/issues/233 if anyone wishes to add to this.

User avatar
dickon
Posts: 1652
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 10:49 pm

Your occasional reminder: *over*clocking is running the system outside its specified parameters. You cannot guarantee that anything will work with an overclocked system or subsystem.

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 11:04 pm

dickon wrote:
Mon Jul 20, 2020 10:49 pm
Your occasional reminder: *over*clocking is running the system outside its specified parameters. You cannot guarantee that anything will work with an overclocked system or subsystem.
That's true. For example, the Raspberry Pi 3 (not the 3B+) that I tested this today, I cannot overclock gpu_freq=500, even on 4.19 kernels because it causes graphical problems. Not all chips, even on the same RPi version, are exactly the same. It may depend on the batch (manufactoring), some may overclock better than others. That's the same for every processor manufactoring process, not only the RPies.
And anyway, overcloking h264 hardware decoder doesn't make a diference, the default setting plays pretty much anything, overclocking it will only cause more heat. And v3d is almost the same, I don't believe it will benefit anything on Kodi.

jimbojones
Posts: 28
Joined: Sun Apr 15, 2018 2:33 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Mon Jul 20, 2020 11:17 pm

Rascas wrote:
Mon Jul 20, 2020 11:04 pm
dickon wrote:
Mon Jul 20, 2020 10:49 pm
Your occasional reminder: *over*clocking is running the system outside its specified parameters. You cannot guarantee that anything will work with an overclocked system or subsystem.
That's true. For example, the Raspberry Pi 3 (not the 3B+) that I tested this today, I cannot overclock gpu_freq=500, even on 4.19 kernels because it causes graphical problems. Not all chips, even on the same RPi version, are exactly the same. It may depend on the batch (manufactoring), some may overclock better than others. That's the same for every processor manufactoring process, not only the RPies.
And anyway, overcloking h264 hardware decoder doesn't make a diference, the default setting plays pretty much anything, overclocking it will only cause more heat. And v3d is almost the same, I don't believe it will benefit anything on Kodi.
Yeah, I do get that it might not be doing it the official way, but I do think that overclocking is sufficiently covered in the official pi documentation to make it mainstream enough that an update to a new kernel branch that breaks it should be reported. I thought I should report this as I thought it was interesting that it was the update to the 5.4 kernel branch that broke this. Before now, on the 4.19 branch, the exact same overclock settings were working consistently perfectly.

Personally, I have a pretty chunky heatsink and fan with thermal paste on my 3B+, and so have enjoyed getting the extra power out of my pi that overclocking has afforded, to use it as almost my main desktop, with occasional media centre use through Kodi. Overclocking is certainly pretty much necessary if you want smooth playback of Netlfix on Kodi.

Having said that, you’re right, the h264_freq doesn’t do much, so I’m fine with having that on standard, although I would prefer being able to overclock v3d without having to switch it off and restart my pi every time I start Kodi.

User avatar
DougieLawson
Posts: 39539
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Tue Jul 21, 2020 12:10 am

jimbojones wrote:
Mon Jul 20, 2020 11:17 pm

Yeah, I do get that it might not be doing it the official way, but I do think that overclocking is sufficiently covered in the official pi documentation to make it mainstream enough that an update to a new kernel branch that breaks it should be reported. I thought I should report this as I thought it was interesting that it was the update to the 5.4 kernel branch that broke this. Before now, on the 4.19 branch, the exact same overclock settings were working consistently perfectly.
You're running an unsupported configuration. It is documented with a caveat "this may not work and the RPi4 will be different".
https://www.raspberrypi.org/documentati ... locking.md
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Tue Jul 21, 2020 12:32 am

jimbojones wrote:
Mon Jul 20, 2020 11:17 pm
Rascas wrote:
Mon Jul 20, 2020 11:04 pm
dickon wrote:
Mon Jul 20, 2020 10:49 pm
Your occasional reminder: *over*clocking is running the system outside its specified parameters. You cannot guarantee that anything will work with an overclocked system or subsystem.
That's true. For example, the Raspberry Pi 3 (not the 3B+) that I tested this today, I cannot overclock gpu_freq=500, even on 4.19 kernels because it causes graphical problems. Not all chips, even on the same RPi version, are exactly the same. It may depend on the batch (manufactoring), some may overclock better than others. That's the same for every processor manufactoring process, not only the RPies.
And anyway, overcloking h264 hardware decoder doesn't make a diference, the default setting plays pretty much anything, overclocking it will only cause more heat. And v3d is almost the same, I don't believe it will benefit anything on Kodi.
Yeah, I do get that it might not be doing it the official way, but I do think that overclocking is sufficiently covered in the official pi documentation to make it mainstream enough that an update to a new kernel branch that breaks it should be reported. I thought I should report this as I thought it was interesting that it was the update to the 5.4 kernel branch that broke this. Before now, on the 4.19 branch, the exact same overclock settings were working consistently perfectly.

Personally, I have a pretty chunky heatsink and fan with thermal paste on my 3B+, and so have enjoyed getting the extra power out of my pi that overclocking has afforded, to use it as almost my main desktop, with occasional media centre use through Kodi. Overclocking is certainly pretty much necessary if you want smooth playback of Netlfix on Kodi.

Having said that, you’re right, the h264_freq doesn’t do much, so I’m fine with having that on standard, although I would prefer being able to overclock v3d without having to switch it off and restart my pi every time I start Kodi.
Yeah sure you can always report your problems but since it is an overclocking issue, and so, running out of spec, I don't believe it will get any attention. You should at least provide your Kodi debug log and also dmesg output reproducing the problem, to make things easier to debug.

sismeiro
Posts: 10
Joined: Mon Jun 01, 2020 4:56 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Tue Jul 21, 2020 7:27 pm

Hi All,

I just updated the Raspberry pi OS on my RPI4 and after the reboot when I started Kodi it stated to make clicking noises on my tv. To stop the noises I had to change the "Audio outpud device" from "PI: HDMI" to on of the Alsa entries with HDMI. Is this somehow a problem? Can it be fixed?

Thank you,
Luis Sismeiro

Rascas
Posts: 697
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Tue Jul 21, 2020 9:25 pm

sismeiro wrote:
Tue Jul 21, 2020 7:27 pm
Hi All,

I just updated the Raspberry pi OS on my RPI4 and after the reboot when I started Kodi it stated to make clicking noises on my tv. To stop the noises I had to change the "Audio outpud device" from "PI: HDMI" to on of the Alsa entries with HDMI. Is this somehow a problem? Can it be fixed?

Thank you,
Luis Sismeiro
Hmmm that doesn't happen on mine. Please reproduce your problem and post your Kodi debug log:
https://kodi.wiki/view/Log_file

sismeiro
Posts: 10
Joined: Mon Jun 01, 2020 4:56 pm

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Tue Jul 21, 2020 10:10 pm

Rascas wrote:
Tue Jul 21, 2020 9:25 pm
Hmmm that doesn't happen on mine. Please reproduce your problem and post your Kodi debug log:
https://kodi.wiki/view/Log_file
Hi, just now I rolled back to the previous 4.19 kernel, restarted the rpi4 (8GB), put the same audio configuration on kodi as before and I don't have the clicking noises. Since I made more than one restart of the rpi and kodi, I don't have the log when the problem happened. If it happens again I will remember to save the log. Thank you.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5572
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: 5.4 update has broken Kodi (Raspberry Pi OS)

Thu Jul 23, 2020 12:40 pm

sismeiro wrote:
Tue Jul 21, 2020 10:10 pm
Hi, just now I rolled back to the previous 4.19 kernel, restarted the rpi4 (8GB), put the same audio configuration on kodi as before and I don't have the clicking noises. Since I made more than one restart of the rpi and kodi, I don't have the log when the problem happened. If it happens again I will remember to save the log. Thank you.
Could you try updating with rpi-update and confirm if the issue is still present?
There has been a fix for corrupt video, but the actual cause was when buffers were in the top 4GB of an 8GB pi,
were sent to the gpu. That could affect audio too, so may be the cause of your issue.

Return to “General discussion”