[x86-64] Kodi high CPU usage when idle

  • Hello,


    I have installed LibreELEC 12 Generic x86 on a MSI Cubi N with a Pentium N3700 CPU.

    Kodi works, but when it displays the interface, doing nothing (idle), the CPU usage is around 25 - 35 %. This seems very high.

    Attached is the Kodi log file after a fresh install (no extension installed except the French language package). The log does not seem to show something odd.

    I also checked the output of dmesg, and I could not find anything relevant.

    I tried to install LibreELEC 11, but it has the same issue.

    Any idea of what could cause the issue?

    Thanks.

  • Hi,
    The top command with ssh confirms that the kodi.bin process uses 25 - 35 % of CPU. This is consistent with the debug information displayed in the Kodi interface.

  • Top won't be very enlightening as it shows no detail on what threads are active. For that you'll need other tools and a debug version of Kodi that includes symbols; we strip them from the binary after compile to save space.

  • Hi.

    Thanks for the advises.

    I tried to set algorithmdirtyregions to 1 or to 2, and when I do that, Kodi does not start. I see the kodi.bin process appear in the output of the top command, but it almost immediately disappears, and then a new one with a different PID appears. It seems that Kodi crashes, and there is a loop to start it again when it crashes.

    Attached is a log of Kodi with algorithmdirtyregions set to 1.

    So I left algorithmdirtyregions set to 3.

    Setting smartredraw to true gives better results. The CPU usage is now around 15-20 %. This is better, but still high. I imagine that Kodi should use around 5 % CPU when idle.

    Thanks.

  • I think OpenGLES rendering of high-resolution GUI uses a lot CPU capacity. I guess it would be lower with OpenGL.

    a) reduce the GUI resolution to FullHD / 60Hz

    b) try the LE Legacy version

  • cepamoi22 Thanks for the info, I'm afraid it is years ago I test this (and this on the only existing X11 version - as Da Flex already suggested).

    Setting the default refresh rate to 24Hz (and allow frame rate switching) may help too but but the system feels slower.

  • Thank you All for your suggestions.

    Da Flex  mglae : reducing the resolution and the refresh rate does not change anything. I did not have time to install the legacy version now. I will try this later today.

    chewitt : I did not succeed to build LibreELEC. I get an undefined reference error when building glibc:

    Code
    /home/julien/LibreELEC/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/lib/gcc/x86_64-libreelec-linux-gnu/13.2.0/../../../../x86_64-libreelec-linux-gnu/bin/ld.bfd: /home/julien/LibreELEC/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/glibc-44f757a6364a546359809d48c76b3debd26e77d4/.x86_64-libreelec-linux-gnu/libc_pic.os.clean:(.debug_info+0x4a7b96): undefined reference to `.LASF0'
    collect2: error: ld returned 1 exit status

    So I'm afraid I cannot try the patch you propose.


    Hi,

    I just installed LibreELEC legacy.
    Now the CPU usage when Kodi does nothing is ~10-12 %. This is better, but still a bit high.
    So I have created an advancedsettings.xml file with smartredraw to true. And now the CPU usage is ~6 % when idle.
    This is much better.

    I don't know if this can be improved again. If you have any other suggestion, please let me know.

    Thank you all for the help.


    I just realized that when I use an advancedsettings.xml file with smartredraw to true, the image viewer does not work correctly.
    When displayed as full screen, the photos appear very dark, and moving to the next photo does not work.
    Any idea to solve that?
    Thanks.

    Edited 2 times, last by cepamoi22: Merged a post created by cepamoi22 into this post. (July 25, 2025 at 12:03 AM).