New Vero4k: high kodi idle load - audio settings


#1

Hello!

I just got my vero 4k in the mail, very happy to move from my old rasp. pi to this nice box!

I plugged it in, ran the configuration, and then turned on ssh, configured a couple other things, mostly with my audio. I then logged in via ssh, and I noticed that the load on the system was: load average: 2.31, 2.33, 2.23… that seems a bit high for it not doing anything!

Looking at top, I found it was kodi.bin that was eating 20% of the CPU, huh! That seems a bit high for something that is currently not even doing anything. I’m attaching a screen capture of top:

Pasted(1)

Sometimes, kodi jumps much higher, here it is doing 63.2% of the CPU:

 538 osmc      20   0  632548 154004  29140 R  63.2  8.4  15:13.31 kodi.bin                                                                                                         

Things will work fine, I know… but it seems like kodi is going a bit nuts and needs to be tamed!

So I looked at what I changed in my settings, and I found that when I went into System->Audio (selecting the first option in the Audio submenu, which is Audio output device), the CPU usage jumps from 2-4% usage when idle, to 20% usage… just by being in the menu! Not doing anything. Dropping out of the audio menu, the kodi.bin process drops back down to the 2-4% CPU usage.

I think the only things I changed were to set the Number of channels to 5.1 (I have surround speakers), the Allow passthrough -> DTS-HD receiver (which is what I have), and enable audio DSP processing. Not sure if those settings are good or not, but reverting them didn’t seem to change the CPU spikes when I’m in the menu itself.


#2

Audio DSP processing is broken in Kodi v17.
I’d recommend keeping it disabled; or you could experience crashes. It doesn’t really work in Kodi Krypton.

CPU load will depend on what menu Kodi is sitting on. If the screen has to be redrawn regularly, you’ll get a higher load. This can also depend on skin.

Shouldn’t be anything to worry about unless the system is behaving sluggishly.

Sam


#3

Sam has already covered the CPU side of your question. The load figures on Linux don’t just represent CPU usage. It’s kinda complicated but f you really want to read up on it, take a look here, for example.

Based on my own Vero4K (so a sample size of one :wink: ) your load figures seem to be typical. Here are mine from running top:

top - 21:06:21 up 13 days,  8:11,  1 user,  load average: 2.14, 2.17, 2.15

Here are the figures from a Pi3 also running the latest version of OSMC:

top - 21:05:12 up 1 day, 23:16,  1 user,  load average: 0.07, 0.05, 0.00

Both systems are essentially idle but the load on the Vero4K is significantly higher than on the Pi3, probably due to differences in the underlying architecture of the two devices.


#4

Thanks dillthedog for the answer.

I’m familiar with how load works in unix systems. I’ve been a unix systems administrator for 25 years.

On Linux, the load is basically the number of threads that are either working, or waiting to work. They can either be waiting on the CPU itself, on i/o (disk, network, etc.), or busy with hardware or software interrupts. Its essentially the number of threads that aren’t completely idle.

On a completely idle system, you would not expect to have any load, because none of the processes should be serving any interrupts, or running in userspace. Of course there are always background jobs that can be run and a multi-user system is a complex beast.

The fact that kodi can run 20-30% of the CPU in userspace, means that it is doing something, when it really should just be idling and doing nothing. If you run a strace on the kodi process, you will see it is doing quite a lot of things. This is why I was saying that it seems like it could use some good optimization.

I don’t really mind that the load is at 2 when idle, it just means that the system is doing something, and occupying resources to do those things. Its interesting that it seems to be doing these things on the 4k, when it wasn’t doing them on the pi3.


#5

The Kodi application on a Ver4K must interact with a very different underlying system architecture from on a Pi. That said, my V4K doesn’t run at 20-30%; it’s more like 10% with a +/- variability of around 5%. I guess it’ll partly depend on what add-ons are installed. I have just YouTube and Emby.


#6

Does unplugging HDMI temporarily drop the load?


#7

Sorry for taking so long to test this and get back to you. I’ve been gone traveling.

It seems like there is no significant change in the load when I unplug the HDMI.


#8

Any news here?

I observe the same problem, idle Vero 4k+, TV off, AVR off, but high load on the Vero 4k:

op - 09:04:41 up 23:48,  1 user,  load average: 3,13, 3,16, 3,20
Tasks: 116 total,   1 running, 114 sleeping,   0 stopped,   1 zombie
%Cpu(s):  3,1 us,  0,6 sy,  0,9 ni, 95,4 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem :  1831240 total,   939464 free,   348868 used,   542908 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  1378608 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  602 osmc      20   0  882412 276960  27940 S  17,5 15,1 312:59.93 kodi.bin
 4095 root      20   0    7040   1528   1036 R   1,0  0,1   0:02.74 top
 4253 root      20   0       0      0      0 S   0,7  0,0   0:00.48 kworker/1:1
    1 root      20   0   26308   3632   2584 S   0,0  0,2   0:02.13 systemd
    2 root      20   0       0      0      0 S   0,0  0,0   0:00.07 kthreadd
    3 root      20   0       0      0      0 S   0,0  0,0   0:05.27 ksoftirqd/0

The case also feels very warm.


#9

Load Average of 3 is high. Normally on an idle Vero4k it should be around 2. Or was the Vero actually in standby? In standby you will have a higher load average.

Was the system idle at that moment? Which screen had you been on? Which skin are you using?


#10

Which skin are you using?

skin.estuary

Or was the Vero actually in standby?
Was the system idle at that moment? Which screen had you been on?

No standby active (just the normal idle mode after a reboot, no keys pressed)
Screen is the normal Kodi main menue.
Load is still high (after a reboot yesterday, system is idle the whole time)

09:55:11 up 2 days, 38 min, 1 user, load average: 3,49, 3,34, 3,26

root@vero4k:~# uname -a
Linux vero4k 3.14.29-134-osmc #1 SMP Mon Dec 31 00:16:36 UTC 2018 aarch64 GNU/Linux

#11

I guess some addons must be eating CPU