Pi Zero CPU command issue?

Hi,

Firstly I would like to say a huge ‘Thank You!’ for this amazing distro. This is the 1st Linux distro I have used with cli only, and has been amazingly simple to setup. I recently purchased a Raspberry Pi Zero (non-wifi), and have set it up with a 2tb USB HD, USB TV Tuner, and Netgear 4G Router (via USB). Software installed is TvHeadend, Samba Server, qBitorrent, ProtonVPN, Pi-Hole, and is all working perfectly.

In dietpi-config, I have set the governor to ‘conservative’ and reduced the minimum CPU frequency to 300mhz. Running htop shows ~5% CPU usage, with htop accounting for most of that. When I run ‘sudo cpu’ the output is:

─────────────────────────────────────────────────────
DietPi CPU Info
Use dietpi-config to change CPU / performance options
─────────────────────────────────────────────────────
Architecture | armv6l
Temperature | 31’C : 87’F (Cool runnings)
Governor | conservative
Throttle up | 50% CPU usage

Current Freq Min Freq Max Freq
CPU0 | 1000 MHz 700 MHz 1000 MHz

[ INFO ] DietPi-CPU_info | CPU current frequency, may be affected by this script, due to the processing required to run it.

So I’m not sure if ‘sudo cpu’ is returning bad info, or dietpi-config isn’t applying the 300mhz min frequency, or if I’ve set something up wrong. If anyone has any advice on what could be happening, I would be grateful.

Thanks in advance. :slight_smile:

Many thanks for your report.

Yeah currently on all non-RPi4 the config option seems to be ignored since it implies some instability: https://github.com/raspberrypi/firmware/issues/1431#issuecomment-732214981

Actually the major instability issues have been fixed, but in some circumstances, when lowering the overvoltage (manually) on some RPi models it can still hang or crash the system. I personally don’t see it as issue anymore since lowering overvoltage below a certain level will always lead to an instable system, so that is and was try & fail anyway. But the kernel dev chose to disable it and for now seems to not deal with the issue anymore.

Since I feel like I over-posted the above linked issue already, it would be great if you could awake it and kindly ask if this topic can be picked up again.

Also the official docs do not contain a word that arm_freq_min would not work on models other than RPi4: https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md

Thank you very much for your fast reply.

I will bump that thread a little, to see if there’s any news on a fix.

So ‘sudo cpu’ always reports that it’s 1000mhz, regardless of CPU load, which is bad for me as I was aiming for the lowest possible power draw. I live off-grid, so every little counts, and I have disabled the HDMI & LED to drop it as far as possible. Is there a patched kernel anywhere, or some setting that could be tweaked to manually lower the CPU speed?

Thanks again.

best to my knowledge, cpu command is raising cpu frequence at the time of execution. This as well is stated on the command output

[ INFO ] DietPi-CPU_info | CPU current frequency, may be affected by this script, due to the processing required to run it.

can you check following

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

Ah, yes - I posted my own answer without reading it properly, sorry!

dietpi@DietPi:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
700000 7744920
800000 103592
900000 38038
1000000 264752

It would seem that all is well, and it’s scaling from 700-1000mhz as expected.

Thank you for your help :slight_smile:

yep looks good, 95% of the time you are on 700 MHz