With a cooler installed and all cores loaded, the CPU frequency doesn't switch to 1800

The other day, I received a parcel with a radiator and cooler from AliExpress

Radxa 5B,

for the Milk-V Jupiter motherboard. I installed it, booted the system, running a build from the llama.cpp source code for load CPU.
I’m checking temperature sudo nvme smart-log /dev/nvme0 | grep ‘^temperature’ && sensors . Finally, at temperatures above 55 degrees Celsius, the cooler deigns to turn on.
Than i’m checking with

sudo htop.

When running the build on 8 cores, the frequency is still 1600, instead of the stated 1800 with the fan on.

This raises the question of how to fix this issue. Why doesn’t the processor frequency change as stated, and how can I fix this?

For M1 running Bianbu later than some versions, due to some changes in BSP kernel (K1/M1 now shares the same V-F table), you’ll need to manually enable “boost“, otherwise it will just stay at 1.6GHz like all other K1/X1 chips.

See:

If you want to pin M1 to 1.8GHz you can do this:

echo 1 > /sys/devices/system/cpu/cpufreq/boost
echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo 1800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed

Or if you want to make it persistent:

echo -e '#!/bin/bash\necho 1 > /sys/devices/system/cpu/cpufreq/boost\necho userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\necho performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor' | sudo tee /etc/rc.local && sudo chmod +x /etc/rc.local && sudo /etc/rc.local && cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1 Like

As I mentioned earlier, I manually switched the processor frequency.

I’m currently trying to figure out what needs to be done to automatically switch the frequency, with a cooler installed, between idle and load modes, such as compiling a program from source code. That is, when no such operations are taking place, the frequency should automatically return to 1600 GHz, and when the load returns, say, when launching an AI model, the frequency should increase back to 1800 GHz. The cooling system should also turn on and select the appropriate RPM depending on the load on the processor, and then turn off when there is no load.

Then you should set CPU governor to ondemand/schedutil/etc instead of userspace which should do automatic cpu freq scaling.

1 Like

Thanks for reminding me of this. I completely forgot about the rest while I was busy trying to train the Qwen model.

So, here’s what I did:

$ uname -a
Linux Milk-V-M1-Jupiter-M2-00-10 6.6.77 #1 SMP PREEMPT Wed Jan 21 09:02:53 2026 riscv64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 13 (trixie)”
NAME=“Debian GNU/Linux”
VERSION_ID=“13”
VERSION=“13 (trixie)”
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.4
ID=debian
HOME_URL=“https://www.debian.org/
SUPPORT_URL=“Debian -- User Support
BUG_REPORT_URL=“https://bugs.debian.org/

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance

$ echo “schedutil” | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
schedutil

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
schedutil

$ sudo apt search cpufrequtils
linux-cpupower/stable 6.12.73-1 riscv64
CPU power management tools for Linux

$ sudo nano /etc/systemd/system/cpu-governor.service
[Unit]
Description=Set CPU Governor to schedutil
After=sysinit.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c ‘for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo schedutil > $cpu; done’
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

$ sudo systemctl daemon-reload
$ sudo systemctl enable cpu-governor.service
$ sudo systemctl start cpu-governor.service
$ sudo systemctl status cpu-governor.service
● cpu-governor.service - Set CPU Governor to schedutil
Loaded: loaded (/etc/systemd/system/cpu-governor.service; enabled; preset: enabled)
Active: active (exited) since Mon 2026-04-20 16:34:40 ; 1h 9min ago
Invocation: 6b9b9fc213a4476ca11f314df05f62ae
Process: 889 ExecStart=/bin/bash -c for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo schedutil > $cpu; done (code=exited, statu>
Main PID: 889 (code=exited, status=0/SUCCESS)
Mem peak: 1.7M
CPU: 72ms

Apr 20 16:34:40 Milk-V-M1-Jupiter-M2-00-10 systemd[1]: Starting cpu-governor.service - Set CPU Governor to schedutil…
Apr 20 16:34:40 Milk-V-M1-Jupiter-M2-00-10 systemd[1]: Finished cpu-governor.service - Set CPU Governor to schedutil.
lines 1-11/11 (END)

sudo htop

I enabled the Boost function manually. After doing so, the maximum frequency unlocked was 1800. Naturally, everything reset after a system reboot. Attempting to add the corresponding settings to /etc/systemd/system/cpu-governor.service

[Unit]
Description=Setting the CPU governor and enabling Turbo Boost
After=sysinit.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c ‘echo 1 > /sys/devices/system/cpu/cpufreq/boost && for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo schedutil > $cpu; done’
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

leads to a system freeze during boot.