How to permanently set CPU power management to the powersave governor?
I'm currently using this:
cpupower frequency-set --governor powersave
but it resets after each reboot.
Solution 1:
For 16.04 there's one more step to add to Jayen's answer. The complete set of steps are
sudo apt-get install cpufrequtils
echo 'GOVERNOR="powersave"' | sudo tee /etc/default/cpufrequtils
sudo update-rc.d ondemand disable
The last step disables the "ondemand" daemon, which would otherwise overwrite the changes created by cpufrequtils.
See also How I can disable CPU frequency scaling and set the system to performance?
You might also consider adding, for example, MAX_SPEED="2GHz"
to /etc/default/cpufrequtils
if you have an overheating, say, 2.2GHz processor, to limit the maximum possible speed.
Solution 2:
To set the governor permanently to powersave, firstly install cpufrequtils:
sudo apt-get install cpufrequtils
And then edit the /etc/init.d/cpufrequtils
file and change GOVERNOR
to "powersave"
(GOVERNOR="powersave"
). You can do this automatically by using the following command:
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="powersave"/' /etc/init.d/cpufrequtils
From here: Prevent Your Laptop From Overheating With Thermald And Intel P-State
Solution 3:
Based on Alin's answer, but will persist when cpufrequtils is upgraded:
To set the governor permanently to powersave, firstly install cpufrequtils:
sudo apt-get install cpufrequtils
And then create/edit the /etc/default/cpufrequtils
file (which is read from /etc/init.d/cpufrequtils
) and set GOVERNOR="powersave"
. You can do this automatically by using the following command:
echo 'GOVERNOR="powersave"' | sudo tee /etc/default/cpufrequtils
And if you are on Ubuntu 16.04 or later, you need to disable the built-in service that sets the governor to ondemand
:
sudo update-rc.d ondemand disable