Kodi Community Forum

Full Version: 4k playback stutters on kaby lake with high bandwidth files, 4x 100% cpu load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
test files:
about 50 MBit/s: bad_2160p.UHD.BluRay.REMUX.HDR.HEVC.DTS-X.mkv 
about 15 MBit/s: less_bad_2160p_x265_10bit.mkv
about 5 MBit/s: good_2160p.x265.10bit.mkv (plays ok, but still has kodi at about 170 to 250% cpu load)

here's the debug stuff:
Code:

root@kodi:~# dpkg -l |grep mesa | gist-paste -d 'dpkg mesa'
https://gist.github.com/1f9b1b685d959b9e...80984470a0
root@kodi:~# cat kodi_4k_test.log | gist-paste -d 'kodi.log'
https://gist.github.com/d4f02f3db1c45dad...8b0671c89b
root@kodi:~# dmesg | gist-paste -d 'dmesg'
https://gist.github.com/26eabb19766eea66...0595342a3e
root@kodi:~# su - kodi
kodi@kodi:~$ XDG_RUNTIME_DIR=. DISPLAY=:0 vainfo 2>&1 |gist-paste -d vainfo
https://gist.github.com/2ad3a4ab5f3aefe9...f0fcfa7e17
kodi@kodi:~$ id 
uid=1000(kodi) gid=1000(kodi) groups=1000(kodi),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),106(netdev),109(bluetooth),113(lpadmin),114(scanner)
kodi@kodi:~$ amixer |gist-paste -d amixer
https://gist.github.com/426b3c55973bf062...02416674a2
kodi@kodi:~$ apt show kodi
Package: kodi
Version: 2:17.6+dfsg1-1
...

base system is a debian testing

so... any suggestions?
the recommended hardware wiki page said that a kaby lake cpu will be sufficient for 4k playback so I bought hardware accordingly.
(cubi silent 3 S)

1080p files in h264 work fine without any noticeable cpu load.
Apparently, GPU hardware decoding is not kicking in with hevc and/or 10bit videos. That said, Debian is known to have their own peculiar way of packaging Kodi, ffmpeg, and other components.
Try a LibreELEC on a bootable usb stick to testdrive Kodi on your Cubi Silent.
Quote:23:24:31.659 T:140493689229248  NOTICE: Starting Kodi from Debian (17.6 Debian package version: 2:17.6+dfsg1-1). Platform: Linux x86 64-bit
23:24:31.660 T:140493689229248  NOTICE: Using Release Kodi from Debian x64 build

4K 10 bit works with Version 18.0 nightlies only. Please install them from the ppa.
there is no ppa for debian
(2018-04-22, 08:51)wsnipex Wrote: [ -> ]there is no ppa for debian
 The happy source building.
(2018-04-22, 08:51)wsnipex Wrote: [ -> ]there is no ppa for debian
meh.
any chance, that the ubuntu ppas work in debian? they sometimes do. depends on how intertwined the desired packages are with ubuntu specific stuff.

for now.. libreELEC it is then.
libreELEC can handle btrfs right? 

will try tonight if time allows.

how stable is kodi 18?
will it work for day to day use for just watching local (incl. network fs) videos? no fancy stuff like skins, plugins and stuff.

and thanks for all of your answers so far!
I'll report back as soon as I have tried out everything there is to try.
@fritsch @wsnipex big thanks for your help!
I built kodi 18 from git on the existing debian and now all of my test videos play without any stuttering and the CPU is mostly idle. even htop uses more CPU time sometimes.
additionally, I have more visualization plugins than just "spectrum". none of them however work. I can select them in the settings mut there isn't anything fancy going on then. I'll check the logs, perhaps I can fix that myself.

building kodi was way easier than I had expected considering the size of the code-base and the wide variety of supported architectures.
Have you built the visualization addons from source or do you use the distro ones?
The distro ones are for Kodi v17 and are not compatible with v18.
I compiled them using section 4.4 of
https://github.com/xbmc/xbmc/blob/master...ADME.linux
as a guide.

only the spectrum came with the distro.
others were not available before.

additionally the same problem appears when switching to another screensaver.
'dim' works, but 'matrix' ends up with a black screen with a mouse pointer in the center.
it moves but there's no way to get back to kodi.

I haven't had the time yet to read the logs properly.
Maybe they aren't compatible with OpenGL 3.2 yet.