rene54321
(Rene54321)
January 24, 2021, 1:34pm
1
Hi,
I have realized Today that the fresh installed RPi3B+ with the openHABian Image 1.6b is only running at 600MHz Core Freq. I have checked the CPU Governor and it looks like it is set default as “powersafe” instead of "ondemand“. Normally this can be changed in the raspi-config. What is the best way to change this permanent in the openHABian Buster Image to “ondemand”? In the old openHABian stretch image the RPi3B+ was set to ondemand as default, so no change was required.
RPi3B+ output:
[14:38:11] openhabian@openHABian-RPi3:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1400000
[14:38:16] openhabian@openHABian-RPi3:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
600000
[14:38:32] openhabian@openHABian-RPi3:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
I have also checked this in an RPI4 same configuration:
openhabian@openHABian-RPi4:~ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1500000
openhabian@openHABian-RPi4:~ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
600000
openhabian@openHABian-RPi4:~ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
Best regards René
Looks like Raspbian changed the default. You can change it back or ;
conservative ondemand userspace powersave performance
` sudo sh -c "echo ondemand > cpu0/cpufreq/scaling_governor"
rene54321
(Rene54321)
January 24, 2021, 2:11pm
3
Hi,
I believe I do something wong:
[15:10:07] openhabian@openHABian-RPi3:~$ sudo sh -c “echo ondemand > cpu0/cpufreq/scaling_governor”
sh: 1: cannot create cpu0/cpufreq/scaling_governor: Directory nonexistent
[15:10:28] openhabian@openHABian-RPi3:~$
rene54321
(Rene54321)
January 24, 2021, 2:22pm
4
This was working:
[15:16:56] openhabian@openHABian-RPi3:~$ sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
[15:19:27] openhabian@openHABian-RPi3:~$ sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
[15:19:31] openhabian@openHABian-RPi3:~$ sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor"
[15:19:34] openhabian@openHABian-RPi3:~$ sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor"
But after reboot all was configured back to powersafe.
How to make this permanent?
Best regards René
mstormi
(Markus Storm)
January 24, 2021, 2:34pm
5
not sure, maybe force_turbo=1 in /boot/config.txt
I’ll create a systemd timer to run this on openhabian bootup.
BTW for me it was sufficient to change the governor on cpu0.
Could you please find out if that is sufficient ?
rene54321
(Rene54321)
January 24, 2021, 3:00pm
6
Hi,
I believe force turbo is not an good option as this force the cpu to use all the time maximum speed.
best regards René
milo
(M)
January 24, 2021, 3:20pm
7
If you have the cpufrequtils package installed.
Create a file /etc/default/cpufrequtils with this contents
GOVERNOR="performance"
The value can be any one of: conservative ondemand userspace powersave performance
reboot
rene54321
(Rene54321)
January 24, 2021, 7:07pm
8
Hi,
I used your stated package. This is working fine also after reboot.
Thanks for the good idea.
best regards René
mstormi
(Markus Storm)
January 24, 2021, 9:19pm
9
I’ve patched that into openhabian, the package should install on starting openhabian-config
main branch only for now, please test.
rene54321
(Rene54321)
January 25, 2021, 6:34am
10
Good morning,
I have removed the cpufrequtil and started openhabian-config. After this rebooted the RPI and it is again working all the time at 600MHz. Do I need to start an update?
best regards René
Did you select the main branch?
This is needed otherwise the cpufrequitls don’t get installed
rene54321
(Rene54321)
January 25, 2021, 2:20pm
14
Hi,
no sorry I was using the top one openHAB3. Will try now the main one.
Best regards René
Selected the main branch, cpufrequtils get installed and governor is set to ondemand.
So it’s working.
mstormi
(Markus Storm)
January 25, 2021, 6:08pm
17
I just had a power outage, an despite of cpufrequtils being installed (and GOVERNOR=“ondemand”), the governor was set to powersave so OH startup took twice as long as it would have taken with ondemand. Duh.
mstormi
(Markus Storm)
January 25, 2021, 6:20pm
19
No, and I won’t investigate.
I don’t own that HW so someone with an interest in getting this going has to do it.
And please mind forum communication rules. This was off topic and pinging, both of which is annoying many and not ok.