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?

1 Like

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.

1 Like

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

I have found the CPU performance to vary. I have the heatsink. Once I compiled a kernel on it and the heatsink got almost too hot to touch. But now I am compiling another kernel from scratch and it barely heats up - and the performance seems slower.

I have seen the dmesg raid performance testing at boot to vary from 28MB/s to over 1000MB/s.

It could be something as simple as the heatsink not making proper contact any more, making it throttle. But it appears to be attached.

Does anybody have any experiences like this? Cheers

not sure about boot performance, but cevap has shown stable 1600MB/1500MB read/write with raid, just few days ago video was available, seems vimeo retards block again non premium accounts and video is not available,if I find it, I’ll post

This was the link: https://vimeo.com/350784916 (https://duckduckgo.com/?q=vimeo+1600Mb+radxa&t=canonical&ia=web)
Few days ago another video showing that all cpu’s work properly was posted (??because some said not all cpu’s are active??, not sure what it means), I did not watch last video have no link now as account seems to be gone.

On cevap’s video, it did not go down or varied, it was very stable.

Maybe offtopic for this thread and probably nothing to do with cpu scaling, but you can’t reach those speeds with any M2 pn rock (test it if you do not believe), I am unsure what kind of raid was created to get those speeds, guess it might be interesting for you due to other thread you created.