I'm currently using this:
cpupower frequency-set --governor powersave
but it resets after each reboot.
I'm currently using this:
cpupower frequency-set --governor powersave
but it resets after each reboot.
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.
cpufreq-set, after disabling it with update-rc.d?
– Xen2050
Dec 22 '17 at 23:15
sudo systemctl disable ondemand to disable ondemand
– Elias Soares
Dec 02 '21 at 18:32
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
if [ -f /etc/default/cpufrequtils ] ; then . /etc/default/cpufrequtils
Therefore the default governor should be set as follow.
echo 'GOVERNOR="powersave"' | sudo tee /etc/default/cpufrequtils
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
ondemand:
sudo systemctl disable ondemand
– luke
Aug 13 '22 at 13:23