I’m having a problem with CPU frequency scaling on my Pi 3B+ with DietPi 8.0.2
When I run the CPU command, it says " Governor | N/A" and doesn’t list any CPU frequencies, just temperature. It used to also display the current CPU frequency.
When I try to change the governor in dietpi-config, it says: “Your processor, or kernel, does not support this feature.” and “scaling_available_governors does not exist”.
Also when I run the stress test and check with “vcgencmd measure_clock arm”, it’s always showing 600 MHz, and the CPU isn’t heating up like it used to. When I run “vcgencmd get_throttled” however, it says “throttled=0x0” even though the CPU is running at 600 MHz.
Also, in /sys/devices/system/cpu/cpu0, I only have:
“cpu_capacity of_node power regs subsystem topology uevent”
I believe there should be a “cpufreq” among others there?
I think it’s a driver/software problem rather than a hardware or power supply issue, given that I can’t even select a governor any more. I’m using a 2.5A PSU and it was working fine in the past. Not exactly sure when or why it stopped working.
Looks fine, dmesg -l emerg,alert,crit,err didn’t output anything, did it?
No idea, the CPUFreq driver is builtin into the kernel, hence always available and automatically loaded, on all RPi models. Try to reinstall kernel and bootloader packages:
Just tried reinstalling the kernel/bootloader, shut down and restarted but no luck unfortunately.
Might have to bite the bullet and try with a fresh install, though it would be useful to know what caused it first so it doesn’t happen again.
Ok, clean install.
I used DietPi_RPi-ARMv8-Bullseye.img which auto-updated to 8.0.2 during install.
After the initial setup when I’m dumped to the shell for the first time, the CPU governor works as it should. The CPU scales up under load, and the CPU command shows all the information like clock speeds etc.
However after a reboot, this message briefly flashes at the top of the screen when connected via HDMI:
DietPi-PreBoot [277]: DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting…
From then on, the CPU governors stop working permanently again and the system is locked to 600 MHz.
I did a second clean install, and it was the same - CPU governors only work for the very first boot, then after the first reboot it stops working again with the error message above.
I would say there is an issue with the medium where you store the system on or with the Pi itself.
If your download of the image would be corrupted, the error had shown up on first boot, I think.
Would be interesting to know if Rasperry Pi OS (or any other OS for your Pi) has the same issue on your machine.
Just installed the latest version of Raspberry Pi OS.
CPU governor works just fine. Installed all the updates, did several soft and hard reboots. CPU governor and clock scaling still work perfectly, always hitting 1.4 GHz under load and going down to 600 MHz when idle.
Seems there’s some kind of bug in DietPi with the 3B+.
32- or 64-bit? I’m starting to think it’s because I used the 64-bit image.
root@DietPi:~# /boot/dietpi/func/dietpi-set_cpu
DietPi-CPU_set | CPU governors are not available on this system. This is probably a virtual machine. Aborting...
Just poked around in that script a bit and it’s just checking whether there’s a “/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors” available. Since I don’t even have a cpufreq folder under /sys/devices/system/cpu/cpu0/, just “cpu_capacity of_node power regs subsystem topology uevent”, the check fails.
Or it is an issue with the latest kernel (it is upgraded automatically on first boot) and the RPi 3+ . Since there are no kernel errors, I cannot imagine filesystem corruption to be the issue.
root@DietPi:/tmp# dpkg -i raspberrypi-*_1.20211118-1_armhf.deb
dpkg: error processing archive raspberrypi-bootloader_1.20211118-1_armhf.deb (--install):
package architecture (armhf) does not match system (arm64)
dpkg: error processing archive raspberrypi-kernel_1.20211118-1_armhf.deb (--install):
package architecture (armhf) does not match system (arm64)
Errors were encountered while processing:
raspberrypi-bootloader_1.20211118-1_armhf.deb
raspberrypi-kernel_1.20211118-1_armhf.deb
Edit:
Replaced “armhf” with “arm64” everywhere and it worked.
CPU scaling also works! So for anyone above who currently has a working CPU governor, maybe don’t update to the latest kernel