I would like to know how to change (lower, in my case) CPU speed easily to adjust my needs. I have done research on the internet and it appears the same answers come back... "there is no need to lower your CPU speed". Well, great for the majority, yet, I have a need for it. It has always been the simplest way for me to stop my laptop from overheating and crashing... yes, ubuntu crashes due to overheating,... I had to go through updates 4 times before getting through using icepacks and a fan...
So here is my question: How can I easily control my CPU speed in Ubuntu? Any answer concerning this question is greatly appreciated! Thank You all in advance! :)
43 Answers
One of the best ways to do this is to install indicator-cpufreq if you wish to do the limit frequently [since this app starts on login]:
sudo apt install indicator-cpufreqWhile if you do limits not so often, you can install cpufrequtils
sudo apt install cpufrequtilsThese are the safe ways too, in the sense that you do not have to do edits inside the system.
0You've not mentioned the CPU model, so we don't know if it supports scaling, but if it does, you could try using cpufrequtils from the repositories.
Install:
sudo apt-get install cpufrequtilssudo cpufreq-set -g powersave- this will change the governot to convervative, and use the lowest frequencysudo cpufreq-set -f <supported-frequency>- to change the frequency manually.
For more info look at cpufreq-info --help and cpufreq-set.
I did this with setting up in /etc/sysfs.cfg
In my case I did fill in this file the following line for each cpu
devices/system/cpu/cpufreq/policy0/scaling_max_freq = 2700000
devices/system/cpu/cpufreq/policy1/scaling_max_freq = 2700000and it worked for me. To find out how the exact path is to your controls, you've only to search through /sys/ as the lines in the /etc/sysfs.ctl do exactly that, they set up the values in this place. I had 8 cpus so there are 8 lines beginning with policy0 and ending with polidy7.
To quick check how it works on your system I did use the inline function:
cpufreq-infowith that function you may see how your system operates the cpu at the moment. So if it is setted up you may check if that worked or not.
To quick check how it workes you may do such kind of a command
sudo /bin/sh -c " echo 2700000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq "if you only want to give a special programm rules you could use the tool cgroups. I think to drop down the speed is not allways better for the temperatur as if you get than because of this to much processes waiting, your cpus will run all the time on full speed and your system stays slow. But I did it because of the same reason. My cpu is now not more running with full speed 3100000 and uses a maximum value of 2700000 what is quick enough for me and doesn*t disturbs at all. I've never got the heat that quick up.