After updating my Vero 4K+ to the latest version I’m seeing very high CPU usage by the kodi.bin process when the attached TV is on standby. The load average measured by top jumps from 0.2 to 1.3, SSH logins take 30 seconds to complete and the Tvheadend UI (running on the same device) responds very much slower than normal.
The Tvheadend error log lines were caused by restarting Kodi without Tvheadend running, they don’t appear in a normal boot.
I suspect the problem is that OSMC is now aggressively throttling the CPUs when the TV is off. Using sudo watch cat /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq
it seems the CPUs are running at a constant 100MHz using the powersave govenor, while with TV on they switch to the ondemand govenor which runs between 500MHz and 1.5GHz. I only have one Vero device so I can’t confirm what the previous behaviour was.
Comparing the Kodi log from the previous version with the current one, the old log includes this line: 2024-03-15 10:45:41.078 T:2795 error <general>: AML: no rw on /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
but the new one doesn’t. In directory /sys/devices/system/cpu/cpu0/cpufreq/ the file scaling_governor is currently RW for group video; unfortunately I don’t know what the permissions were before.
Is it possible that changing the governor on standby didn’t work in previous versions because kodi.bin didn’t have write access to the file, but due to a change somewhere else it has now started working?
Locking the CPUs to 100MHz when the TV is off makes the Vero unusable for any other tasks. In my case I run TVHeadend for off-air recording and also run rsnapshot overnight to back up the other nodes on my LAN.
For my use case I see there is a file ~/.kodi/userdata/standby.py which I could perhaps use to reset the governor after kodi has changed it.