No hardware acceleration (100% CPU load) with Kodi v19 on ubuntu server 22.04 LTS
#1
Hi,

I’ve been using kodi for years (around 10) on different devices (mainly Raspberry Pi).

Recently I decided to upgrade my Raspberry Pi 4 to a little more powerful Intel J4105 device (Dell Wyse 5070) because wat started as a small media player in the living room with the raspberry pi 1 took over more an more task over the year. As a holiday project I wanted to replace the RP4 by the Dell Thin client.
Yes, I could have split up the task between different devices but I want to keep the power consumption low.

Anyway, all my other services are running in the meantime but Kodi giving me headache.
I got it installed without any problems on Ubuntu 22.04 LTS following an instruction I found on the web for Ubuntu server. I was happy and set up all the other stuff. Yesterday – I was really close to finishing the project and physical replacing the RP4 – I tried to play a video and it ran for around 5sec before the playback freezes with 100% CPU load. Kodi is still responsive but the playback hangs.

I expected hardware acceleration wasn’T working, checked the web but couldn’t find a good/working solution. I ran into this one as well and tried some stuff mentioned there.
As I’m not totally new to Linux but far from being an expert installing the correct driver and setting them up isn’t that easy for me. Also, I’m not sure if this is really about the drivers. I followed some guides for installing the Intel drivers and the VA-API.
Not sure if this is setup correct and if this is driver problem or an Kodi (configuration) issue.

Logfile is provided, I started the playback around 2023-01-04 19:39:00.771, local file to ruled network issues out.

Code:
cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Code:
apt policy kodi
kodi:
  Installiert:           6:19.5+git20221224.1006-f8fdeb6b1b-0~jammy
  Installationskandidat: 6:19.5+git20221224.1006-f8fdeb6b1b-0~jammy
  Versionstabelle:
 *** 6:19.5+git20221224.1006-f8fdeb6b1b-0~jammy 500
        500 https://ppa.launchpadcontent.net/team-xbmc/ppa/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     2:19.4+dfsg1-2 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

If anything is missing just let me know and I’ll provide additional logfiles or information.

I fear I might have chosen the wrong OS (version), the RP4 ran on Raspbian and I’m used to Ubuntu so for me ubuntu server was the first choice. I’d like to avoid setting up the system again, this would be my last choice.

Any ideas/suggestions?
Reply
#2
Depends on the codecs used on the Video
Intel® Celeron® J4105 Processor has built in Intel® UHD Graphics 600 which can handle H.264 and H.265 8bit upto 4K but is a hit or miss on H.264 10bit or H.265 10bit when it comes to hardware acceleration
 
Code:
https://en.wikichip.org/wiki/intel/uhd_graphics/600

The other option is to try with LibreElec instead of Ubuntu + Kodi if your intention is to use the device only for Kodi purpose. As it is a custom implementation of a linux for the sole purpose of running Kodi, will have the right drivers and may work for you better
Code:
https://libreelec.tv/downloads/generic/
Kodi 21 Windows 10 and 11 | 21 Xbox One X | 21 Linux Mint Virginia XFCE | CoreELEC NO 21 nightly S905X4 aarch64
Reply
#3
Forgot to mention this, sorry, yes, I know the the CPU/GPU is capable of this.

I even tried bootin LibreELEC from USB ('run') and played the same videos without an issue. So I'm pretty sure it's all about the driver/Kodi settings.

But LibreELEC isn't really an option, I'm running stuff like pi.hole, evcc (PV drived car charging), influx, grafana, some of my owne written programmes for home automation, some build tools and other things on this machine. And I believe libreELEC is really stripped down. That's why I went with ubuntu server in the first place.
Reply
#4
FWIW LibreElec Nightly is built on top of Debian 11 so perhaps it's a Ubuntu issue?

Worth a shot to do up a quick live usb from Debian and see if Kodi will play fine in it.

Downside would be you'll be stuck with the Debian releases of Kodi which currently is 19.1 on bullseye.

I'm on Debian 11 myself and Kodi works fine out of the box, no extra steps to get it working.
Reply
#5
Kodi keep failing to open the audio device "Default" over and over again in your log, and then it doesn't find any sound devices through ALSA. Have you tested that your sound is working?
Reply
#6
Make sure the user you are starting Kodi from has access to all needed groups: https://kodi.wiki/view/HOW-TO:Install_Ko...or_Testing
Maintainer of Kodi from Debian | Got an issue with Kodi from Debian? Report it here: Kodi from Debian - Support Thread
Reply
#7
Code:
marcel@mb-server:~$ groups kodi
kodi : kodi disk dialout cdrom audio dip video plugdev users input render

I believe this is correct, but maybe you can double check.


About the audio thing, at the moment the PC is on my desk an only connected to my PC monitor, so no sound device connected at all. So I didn't worry about it. Or should I?
Reply
#8
If you deliberately did not connect any sound device (which is unlikely because the sound chip on motherboard should be initialized!), please attach it!
However, check non-free drivers for realtek if needed to make sound work.
Maintainer of Kodi from Debian | Got an issue with Kodi from Debian? Report it here: Kodi from Debian - Support Thread
Reply
#9
Good point about the audi driver and the audio chip itself. I'll do that!

In the meantime I did a test with Debian 11 Live (Gnome) and as expected, Video playback works like a charm.

One thin I noticed right after setting up kodi in the first place on the Dell, when I enter the Settings->System menu I'm stuck for 2-3 seconds before the GUI is responsive. It also happens if I change something in the display settings. I'll check the logfile for this because this is something I didn't saw on LibeELEC or Debian. By the way, in the Debian l didn't notived any sound errors as well.
Reply
#10
(2023-01-05, 03:48)nymdbwdp Wrote: FWIW LibreElec Nightly is built on top of Debian 11 so perhaps it's a Ubuntu issue?

LibreELEC is certainly not built on Debian or on any other distro. It's a plain vanilla Linux setup with the necessary goodies.
Reply
#11
(2023-01-05, 08:38)Klojum Wrote:
(2023-01-05, 03:48)nymdbwdp Wrote: FWIW LibreElec Nightly is built on top of Debian 11 so perhaps it's a Ubuntu issue?

LibreELEC is certainly not built on Debian or on any other distro. It's a plain vanilla Linux setup with the necessary goodies.

Must be a complete fluke that the text inside /etc/issue from Libre reads "Debian GNU/Linux 11 \n \l" then... *shrug*
Reply
#12
(2023-01-05, 07:33)basilgello Wrote: If you deliberately did not connect any sound device (which is unlikely because the sound chip on motherboard should be initialized!), please attach it!
However, check non-free drivers for realtek if needed to make sound work.

Good news, playback is working now! And I was totally heading in the wrong direction trying to fix my video. Thank you basilgello for pointing me in the right direction, a simple

Code:
sudo apt install pulseaudio

fixed my issues, CPU is now at 17% and video is running. Because I tried several other things related to the video system I'm not 100% sure it was only this, but this was at least the final piece. Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
No hardware acceleration (100% CPU load) with Kodi v19 on ubuntu server 22.04 LTS0