Overclocking profile for RPi 4

Ah sorry, you mentioned rpi-monitor, but got it that this was related to an old post only. btop should show the system clock, indeed. So you opened it via SSH client on the phone?

Okay, so then it is also related to reduced min frequency. Just strange that it leads to faster clock in your case, instead of slower clock, and only when you increase the max frequency (no matter whether with arm_freq=1800 or arm_boost=1) as well. Do you have any over_voltage or over_voltage_min set in /boot/config.txt at the same time? over_voltage is set when choosing one of our overclocking profiles but “default” and “safe”, and over_voltage_min is additionally set when using the powersave profile. This disables DVFS dynamic voltage scaling. We are already discussing whether to hence drop over_voltage and over_voltage_min from our profiles, and instead use over_voltage_delta for the powersave profile, which reduces voltage for all frequencies without disabling DVFS. It may or may not affect clock speed as well somehow. So if any of these settings is set in your case, would be great if you could test whether just removing them solves it, even with idle frequency at 300 MHz and max frequency at 1800 MHz.

But since leaving the idle frequency at 600 MHz alone solves it, at least we found culprit, and one which caused system clock anomalies in other cases, even when so far in the opposite way.

I’ll add a warning to this menu option, that it has this effect in some cases, and that the idle frequency should then be raised until the clock runs again at normal speed.

Hello,

Yes I usually ssh from my phone to the pi.

The clock is never faster but indeed it is slower. If 52 seconds on a raspberry pi take 1 minute in real time, then the pi clock runs at about 86.7% speed. Or am I missing something obvious?

I did not set anything else in the config.txt file, just used the profile as it. Before adding arm_boost=1 I reverted to the default profile.

I’ll try to test it but I run it 24/7 as a personal server so I want to avoid reboots. Thank you again!

Right, not sure where I got the idea from that it runs faster in your case. So then it is just the well known issue, with the little difference or added info that also the max clock needs to be raised to trigger it. Probably this was true as well in the other reported cases.

Okay, then DVFS should be active. Not sure how a higher max clock rate can have any effect when the CPU idles, but probably it changes the pstates, or the voltage for all pstates a little, when one is added. Not sure how exactly it works. I’ll write a little script to loop through all pstates, with userspace governor, and check voltage in each case. This can then be run with different overclocking and voltage settings, to check their effect. Needed for the RPi 5 overclocking profiles anyway, where I want to avoid explicit voltage settings in the first place, if DVFS works fine.

However, while it is interesting to find out whether voltage has anything to do with it, in the end for you it does not matter. You either need to raise the idle frequency, or lower the max frequency. I would raise the idle frequency, since it alone, without lowered voltage, has no significant effect on power consumption (hence heat emission) anyway. And also DVFS does not undervolt by default, without another setting, which has been removed for RPi 5: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#use-dvfs

On a whim, I tried various over_voltage_delta when setting the min frequency to 300 and keeping the arm_boost=1.
over_voltage_delta=50000 - booted, clock too slow
over_voltage_delta=-20000 - booted, clock too slow
over_voltage_delta=-50000 - did not boot correctly

So this likely won’t fix anything.