PINE64
CPU speed / governor=performance? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6)
+---- Forum: Debian (https://forum.pine64.org/forumdisplay.php?fid=24)
+---- Thread: CPU speed / governor=performance? (/showthread.php?tid=1799)



CPU speed / governor=performance? - sheffield_nick - 07-20-2016

I'm using Debian Jessie 8.5 base, kernel3.10.102-2-pine64-longsleep on a PINE A64+ 2GB and noticed that the CPU clock speed is fixed at 1.152GHz and the governor=performance.

Is this temporary while final scaling settings are being worked out? I'd hope to use something like ondemand, to dynamically scale the clock speed as required, like with other ARM boards. This *appears* to work:


Code:
echo ondemand | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null

and my board dynamically scales between 480MHz and 1152MHz.

Also, are the 1200MHz and 1344MHz CPU speeds practical to use? mentioned in /sys/devices/system/cpu/*/cpufreq/scaling_available_frequencies

Thanks


RE: CPU speed / governor=performance? - sheffield_nick - 07-20-2016

(07-20-2016, 02:49 AM)sheffield_nick Wrote:
Code:
echo ondemand | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null

and my board dynamically scales between 480MHz and 1152MHz.

Anyone know the correct way to make this change persist across reboots? I've read posts about using cpufrequtils or sysfsutils, but neither of these are installed by default? I don't want to screw up by installing some conflicting CPU scaling daemon, etc Blush

Many thanks


RE: CPU speed / governor=performance? - Fourdee - 07-20-2016

DietPi allows you to change CPU govs on the fly in dietpi-config, automatically applied during boot: http://dietpi.com/
Also supports options for setting process priority (nice), and lots more "tweaky goodness".


   
   


If you dont want to try DietPi:
Create a service to run the command during boot. copy and paste all into term, then reboot:


Code:
cat << _EOF_ > /etc/systemd/system/cpuondemand.service
[Unit]
Description=cpuondemand

[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
StandardOutput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
_EOF_
systemctl enable cpuondemand.service
systemctl daemon-reload