High CPU usage - Kodi - September update

Hi,
I have cleanly installed the latest version of OSMC (2022.09-1) on my Raspberry Pi 3 B. I have nothing else installed just, OSMC, and Kodi uses the CPU between 41-52%, when it is in idle. The previous version of OSMC (2022.03-1) used 11% of CPU, when it was in idle, with all the stuff installed (Deluge, Plex, SMB, Webmin). Now the CPU is running on 80℃, previously around 56℃. Is there any fix to this problem? Thanks.

There might be if we know where the problem is. Is this a clean install without addons?
On my Pi3 with latest version Kodi is using 50% of one core of the the CPU, means 12.5% of the CPU so close to the 11% you wrote.
There was a jump in CPU usage but that came in August 2021 with the introduction of v19.

I just reinstalled the whole OSMC about 20 mins ago, without any addons. Just the OSMC image downloaded from the site. Nothing else. In my case, all cores are running between 30 and 70%, not just one.

So is it 50% of total CPU or 50% of one core?
image

Currently all cores are around 50%:


But in your screenshot Kodi only uses 27.4%? The issue seems coming from dbus, python and connmand?
Here is my top

This is just a snapshot from a certain moment. I can provide you screenshot, when Kodi is the winner. Plus dbus, connman and phyton is coming with the OSMC image itself and still do not know, how to solve the issue of the high CPU usage, even if we are talking about the others than Kodi. Thank you for your help in the investigation.

Well I am not saying they are not coming from OSMC but would need to figure out why they use so much CPU. For Kodi the high CPU is not unsual, means my suggestion is to focus on the others. How is your network assigned? Fixed IP or DHCP? Are you using Wifi or Ethernet? Maybe upload full logs grab-logs -A and share the URL maybe that can tell us something.

I have static IP, assigned on my router. The Pi is connected with Ethernet. All config is the same as before the 2022.09-1 update. Nothing has changed, just OSMC version. Here you can find the uploaded logs: https://paste.osmc.tv/qomeneguqe Thanks.

The log is full with Oct 10 11:00:35 osmc preseed[649]: DBusException Raised: net.connman.Error.OperationTimeout: Operation timeout which I assume is the issue of the high CPU usage.
Can you try a clean install with default config using DHCP?

MAN!!! You made my day!
The issue is not related to the static IP or DHCP. It was a human error (me):
When OSMC installer asked me how I wanted OSMC to connect to the internet, I thought it was related to the installer, about how I wanted to download the image. But this question is about the device, where I want to use OSMC. Until now I chose wireless, as my laptop is connected via Wifi, but now I chose wired and installed that way. And what a surprise, the CPU usage went back to normal. Thank you very much for your help! I really appreciate it!

sorry for necro-posting but the following finding related to “relatively” high CPU (Kodi using 34% CPU in a RPi4 and RPi3 running the latest OSMC, with the only peculiarity being that these are audio streamers not connected to any screen) made MY day.

In short, to go from 34% CPU continuously to 6% continuously (and decrease temps by a few degrees), add this to your advancedsettings:

  <gui>
      <smartredraw>true</smartredraw>
  </gui>

Save a few watts and help the environment, since your RPi is running all the time

1 Like

I do not have advancedsettings.xml file under /home/osmc/.kodi/userdata#, but I gave it a try and created it. Thanks.

This will cause some problems, particularly with PVR and toast notifications last time that I checked.

1 Like

I’ll make this default for Kodi v21 testing so we can get some feedback.

I’ve been testing this the last couple days and found that there still exists some screen drawing issues left to be worked out in this experimental feature. I found a notification from my Trakt add-on get stuck on the screen, the home window not updating immediately at playback stop, and it appears the notification that the newer OSMC remotes use for a low battery warning fails to display with this option as well.

As far as the power reduction goes I suppose that would depend on your skin and what you have running, but in my setup with Estuary and not much happening during idle on a RPi 4 I could see in htop the CPU usage bouncing between 16-25% with my POE switch reporting 3.96-4.5w power usage with smart redraw off, and CPU usage bouncing between 1-8% and power usage at 3.89-4.27w with smart redraw on. I’d note that the CPU usage number looks a bit deceptive as that is a percentage of a single core so 25% is actually more like 6% on this SBC. I don’t see enough power savings or heat reduction here to make it worth dealing with any of the outstanding issues of this option right now.

For the reasons above, I have recommended to @sam_nazarko for us to not add this to testing at this time.

Thats amazing work, thanks for going the extra mile and sharing the results!

My use case is a bit special as it’s audio-only and I dont use the gui at all (no screen) so i dont really care about gui glitches.

I also use the same RPi for homeassistant and Frigate so a few % less CPU usage does count, for the use case.
This is indeed still experimental so not for everyone!

1 Like