Kodi Community Forum
Linux Xorg - High CPU usage on 4K output - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Xorg - High CPU usage on 4K output (/showthread.php?tid=305583)

Pages: 1 2


Xorg - High CPU usage on 4K output - User 29008 - 2017-02-02

Hey guys,

I recently switched to a 4K TV and also upgraded my HTPC with a current Nvidia card. My HW looks like this:

Intel Core i3-3240T
Nvidia GTX 1050
8 GByte Ram
250 GB SSD

Kudubuntu, BaseOS upgraded to 16.04.1, Kodi 17 RC3.

After switching to the new hardware and outputting Kodi in 4K resolution to my TV (through a Denon X7200 AVR) I noticed that the HTPCs fan was more hearable now and then, which didn't happen before. Looking at processes on the shell I now noticed, that Xorg uses up to 60% cpu when Kodi UI is active. Switching back to 1080p output immediately makes Xorg disappear from the top processes list. Did some more digging, and also found out, that disabling RSS feed in main window makes the CPU usage also drop drastically to only 4-5 %.
Same goes for visualizations while listening to music. When e.g. ProjectM or Goom is active in full screen I also got 60% Xorg CPU usage in 4K output.

Is this supposed to be normal due to the higher resolution? Shouldn't the Kodi UI and also visualizations be HW accellerated?

Thanks for any thoughts ..

boba


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-02

Nvidia does not support hevc-10 bit decoding via VDPAU. They simply did not implement it. Therefore kodi does not use it.


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-02

(2017-02-02, 11:58)fritsch Wrote: Nvidia does not support hevc-10 bit decoding via VDPAU. They simply did not implement it. Therefore kodi does not use it.

Hey firtsch,

thanks for your reply, but don't think you got my description right ....

I am aware that Nvidia doesn't support 10BIT HEVC, at least in linux. I am not talking about video decoding but the UI of Kodi sitting idle, and just displaying the RSS feed in main window that causes high xorg cpu usage when output is set to 4K. I doubt that 10Bit HEVC is in play there. Same goes for playing mp3s using visualization ...

boba


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-02

Disable the RSS feed please. That one is so insanely bad implemented ... it's the first thing I disable.

Edit: Ouh something else. Nvidia: You use the kodi script to start it or directly the kodi.bin? If kodi.bin it's clear.


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-02

(2017-02-02, 13:14)fritsch Wrote: Disable the RSS feed please. That one is so insanely bad implemented ... it's the first thing I disable.

Edit: Ouh something else. Nvidia: You use the kodi script to start it or directly the kodi.bin? If kodi.bin it's clear.

Hey man,

yea, RSS is now disabled, can live with that. I don't really need it.

Regarding start of Kodi ... well, it's still Kodibuntu. Process running is kodi.bin I think. Can I change anything here that would reduce CPU load?

Edit: here's a grep of running kodi processes:

boba 2320 0.0 0.0 4508 760 ? Ss 02:26 0:00 /bin/sh /usr/bin/kodi-standalone
boba 2372 0.0 0.0 11140 320 ? Ss 02:26 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/bin/im-launch kodi-standalone
boba 2375 0.0 0.0 43600 2560 ? S 02:26 0:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/im-launch kodi-standalone
boba 2388 0.0 0.0 4508 792 ? S 02:26 0:00 /bin/sh /usr/bin/kodi --standalone
boba 2390 0.4 7.1 3895700 579732 ? Sl 02:26 4:44 /usr/lib/x86_64-linux-gnu/kodi/kodi.bin --standalone
root 7042 0.0 0.0 15752 1012 pts/0 S+ 19:39 0:00 grep --color=auto kodi


thanks,

boba


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-02

Can you check with top (press H) and with a Debug Log obviously to see which thread is doing that?

If you turn on "debugging" in the menus - what FPS do you see?


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-02

Will check later when I got free access to my TV ;-) and report back ...


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-03

Alright, did 2 tests with debug log on and took a copy of the respective top output in thread mode.

1.) Sitting idle on main screen with RSS feed on

http://pastebin.com/ex7SD2YK

top - 23:43:18 up 8 min, 3 users, load average: 0.45, 0.52, 0.28
Threads: 296 total, 2 running, 294 sleeping, 0 stopped, 0 zombie
%Cpu(s): 16.3 us, 1.3 sy, 0.1 ni, 81.8 id, 0.6 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8129096 total, 7147372 free, 364548 used, 617176 buff/cache
KiB Swap: 8340476 total, 8340476 free, 0 used. 7495852 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1208 root 20 0 159592 46716 31628 R 52.5 0.6 4:03.05 Xorg
1328 boba 20 0 3069736 279628 92780 S 12.6 3.4 1:01.90 kodi.bin
1525 boba 20 0 3069736 279628 92780 S 3.0 3.4 0:14.79 kodi.bin
1622 boba 21 1 3069736 279628 92780 S 1.7 3.4 0:04.39 kodi.bin
1230 root -51 0 0 0 0 S 1.3 0.0 0:05.44 irq/30-nvidia

2.) Streaming music from Digitally Imported with ProjectM Visualization enabled

http://pastebin.com/3xdHgVZB

top - 23:58:25 up 0 min, 2 users, load average: 0.56, 0.15, 0.05
Threads: 319 total, 3 running, 316 sleeping, 0 stopped, 0 zombie
%Cpu(s): 15.5 us, 0.8 sy, 0.0 ni, 83.1 id, 0.6 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8129096 total, 7286072 free, 455492 used, 387532 buff/cache
KiB Swap: 8340476 total, 8340476 free, 0 used. 7406024 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1191 root 20 0 159596 47324 31864 R 52.2 0.6 0:19.77 Xorg
1291 boba 20 0 3172128 366476 98992 R 12.0 4.5 0:05.89 kodi.bin
1582 boba 20 0 3172128 366476 98992 S 2.3 4.5 0:01.28 kodi.bin
1195 root -51 0 0 0 0 S 1.3 0.0 0:00.52 irq/30-nvidia

Edit: ah and btw, I see 60 FPS also when projectm is running full screen. Sitting idle at main screen though, it drops to 10-15 FPS but jumps back to 60 as soon as I navigate around. Everything is absolutely smooth though navigating through the UI.


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-03

Looks like a driver issue. Please upgrade Nvidia drivers. It's not even the Kodi process.


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-03

Hey fritsch,

I am on latest 378 from Nvidia ppa. Where do I get newer ones? Or should I downgrade?


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-03

downgrade to long term stable, please


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-03

Will try 375 from ppa later tonight, that's the first version, according to nvidia website that supports gtx 1050.

Alright, same behavior with 375. Xorg using 50% cpu when visualization is active with 4K output. Maybe I'll give a clean Lubuntu + kodi install a try the next days. But anyway, can someone confirm that this is unusual? What should the expected xorg cpu load be with 4k output?


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-04

Wait a moment: You only get this high CPU load _when_ viz is active?


RE: Xorg - High CPU usage on 4K output - User 29008 - 2017-02-04

Hey fritsch,

that's the best way to reproduce it. When playing video both hw-accellerated or not cpu load seems normal. Sitting idle at main screen or other place in UI Xorg is around 5-6% which I guess is normal for 4K output ...
As I mentioned, first obvious case that Xorg shows 50%+ is RSS feed active. And second case when vis is active during music playback. Both go back to normal, low cpu usage when I switch Kodi interface/output to 1080p.


RE: Xorg - High CPU usage on 4K output - fritsch - 2017-02-05

Not funny. Fine on my intel rig, though (Edit: in 4k)