[Leia] Too high Idle CPU @ARM devices - limitframes option for screensaver? / render hack?


#1

Hello,

I noticed, that (most propably because Kodi changes in time) idle CPU usage of vanilla CE is around 14-20% (Odroid C2). When I tested release with Jarvis 16.1, idle CPU usage is around 2-6% (and was that also on weaker Raspberry Pi2). This is a bit important for me, as I am using 24/7 installations.

I am suspecting that this is because some changes in rendering system inside Kodi (?), because I remember, for 18y old PC, I limited GUI fps by limitframes variable@Application.cpp CApplication::Render()
Jarvis:

if (limitFrames) {
  singleFrameTime = 30;  //no need to render menu more than 25 fps on old computer
  // Screensaver is on, 1 fps - idle for Raspberry, slow PC etc.
  if (m_bScreenSave==true) {
  singleFrameTime = 1000;  // 1 fps, high wakeup latency but v.low CPU usage
  }

and thats greatly (20% --> 4% on Odroid C2/Rpi2) reduced Idle CPU usage, when ARM box/Old PC was running, but TV shutdowned and not used (=actived [Black] screensaver).

I used this (screensaver part) also for Rpi2 LE some time (years back, maybe it was OE, maybe LE, old version, maybe 4/5/6), but then propably some LE patch/hack (?) did similiar work, and I remember Ive got 2-5% idle CPU even without my modification on LE 7. And I dont use any overclocking, dirty region hacks, etc., I am using standard values and standard installation.

Leia (CoreElec 9):
Now, I am trying to get similiar results with Leia releases, but I am not sucessfull yet. I think, the previous patch/hack is gone, and Kodi again renders all the time all the FPS, and therefore put unecessary CPU Idle load to the 24/7 ARMs .

I tried to address this on the Kodi side, not much solution there. With suspiction, that some guys already sucesfully fought with this before (and then benefit was lost when Kodi code changed), I am trying get some opinions here also.

The code for CApplication::Render() changed since Jarvis, and unfortunatelly I wasnt able to stop/limit Rendering, through similiar modification on the Leia:

void CApplication::Render()
{
// do not render if we are stopped, in background, or screensaver active
if (m_bStop || (m_screensaverActive))
return;

I didnt see any change and video out was always rendering. Limitframes variable is gone, so for now I dont know, how to kick at least frame limitation, during screensaver.

Is there any chance, that this could be solveable similiary as on Jarvis release? I dont get much Kodi support on their forum yet. I believe, that even with Leia it should be possible be somewhere near 4% Idle. When I stopped Kodi service, CPU usage drops kinda that way, and I am pretty sure that Kodi itself when doing nothing doesnt take that amount (20%) of CPU, so it should be most propably rendering. And the same observation I had on Jarvis…


TS file skipping