RockPi4 CPU scaling

Anyone else noticed there seems to be no scaling and each core is locked at max speed?

The scaling governor seems to be set to performance which seems just to be max.

Any reason why things are not set to on-demand?

It might be better if they set it to interactive.
It uses more power than on-demand but it has better performance especially if the cpu cores need to switch from low to high frequencies frequently.
It made a big difference to stability on RK3328 LibreELEC images, it should do the same for LibreELEC/Linux on Rock Pi4 RK3399.
On devices like phones that run on batteries, it’s better to use on-demand for better battery life but not for devices that have their own power source.

Using ‘performance’ can cause stability problems since the cpu cores never slow down and cause more heat.

That is what I was sort of thinking as noticed the cores whenever I looked where always at max.
There are a few comments about heat and either interactive or ondemand would help much.

I have been trying to force another governor but failing so if anyone has any guides.
I will prob have a look at the build script again and see if I can find where it is set, but thought you could change through /sys?

It can be changed by building a new kernel.
Seems interactive is the default.

The rockchip_defconfig config file is used for Android I think.
I’m not sure if this is the correct kernel branch, maybe it’s release-4.4-rockpi4?

But if the Linux OS was built with mainline 5.1 kernel support, you will need to modify the config file in that source. I think the mainline images might use ondemand perhaps.

A terminal command can also change the governor but I’m not sure what the commands are and it will reset after a reboot.

That is weird how do we get different lines? But it isn’t interactive its performance when in use.
I am playing with Manjaro-kernel-5.2 so need to load up debian just to check again.

There is no user_space driver so prob why I can not set.
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y

I guess when I try and set things with cpu_power it fails.
Currently its sets the default to interactive and doesn’t have interactive enabled in the config…

cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
408000
408000
408000
408000
408000
408000
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_CPUIDLE=y
CONFIG_CPU_FREQ=y
#CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
#CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_ROCKCHIP_CPUFREQ=y

You wouldn’t believe how much cooler my rockpi4 is :slight_smile:

@jack

stress --cpu 6

sudo cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
1416000
1416000
1416000
1416000
1800000
1800000

sudo nano /etc/default/cpufrequtils

# valid values: userspace conservative powersave ondemand performance
# get them from cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
GOVERNOR="ondemand"
1 Like