My processor is running at 40% of its maximum speed, I want it to use 100% of the speed, all the time. I searched on Google but the tutorials are very old and they all differ.

So, how can I permanently disable CPU frequency scaling and set my system to performance mode?

Please, only terminal based solutions, I don't want applets.

I'm using Xubuntu 14.04 x64.

share|improve this question
2  
For the curious: CPU frequency scaling in Linux – Jérôme Mar 26 '16 at 21:35
up vote 39 down vote accepted

After struggling with ondemand for a while, I will share how to permanently disable it in Ubuntu and its derivates.

Install cpufrequtils:

sudo apt-get install cpufrequtils

Then edit the following file (if it doesn't exist, create it):

sudo nano /etc/default/cpufrequtils

And add the following line to it:

GOVERNOR="performance"

Save and exit.

Now you need to disable ondemand daemon, otherwise after you reboot the settings will be overwritten.

sudo update-rc.d ondemand disable

And you are done!

You can check your settings with:

cpufreq-info

It will show a block of information for every core your processor has. Just check if all of then are in performance mode, and at the maximum speed of your processor.

Update:

The Debian Wiki says that sysfsutils is necessary in order to maintain the settings across reboots, but that is untrue. Also, enabling sysfsutils make my system unstable, so it's not recommended.

Sorry if I misspelled something. :)

Sources:

share|improve this answer
1  
/etc/default/cpufrequtils/ doesn't exist on my Ubuntu 14.04, it seems that the correct path is /etc/init.d/cpufrequtils – ecerulm Apr 24 '15 at 13:57
1  
I did this with my server but I'm wondering if I should disable it after doing what I needed to do. Is this going to kill my server in the long run? – David 天宇 Wong May 7 '15 at 20:13
2  
@ecerulm: /etc/default/cpufrequtils/ is sourced in /etc/init.d/cpufrequtils so it works just as well, and it is easier to maintain your own settings over package updates if configured in /etc/default/cpufrequtils/. – Jérôme Jul 15 '15 at 21:31
3  
Actually, on my 3.19.0-51-generic ubuntu server "performance" is default overridden by /etc/init.d/ondemand Thus, reboot after sudo update-rc.d ondemand disable is all I needed. – wick Mar 5 '16 at 19:24
    
My A8-4500M still throttles although the temperature is below 80C since I undervolted it – Suici Doga Jul 18 '16 at 1:20

I cannot comment, so I had to resort to a new answer. For immediate results, make sure you do sudo /etc/init.d/cpufrequtils restart for the new frequency to kick in after you follow all of Dennie's steps.

share|improve this answer
4  
Just to note, you can also (sudo) cpufreq-set -g performance – laconbass Oct 13 '16 at 21:48

Try this:

gksu gedit /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Replace ondemand with performance. Repeat for every core (increase cpu0: cpu1, cpu2).

If you get save errors, use nano editor:

sudo nano /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Source: Avoiding CPU Speed Scaling – Running CPU At Full Speed

share|improve this answer
    
I stumbled with this site earlier, I cannot save the file, both mousepad and nano gives me errors. – Removed Sep 13 '14 at 19:10
    
@Dennis gedit gave errors to me too, but the file got saved despite the errors. Close the editor and open it again to see if it is saved. – Cornelius Sep 13 '14 at 19:12
    
You are right, it was indeed saved. But when I reboot the computer it goes back to ondemand. – Removed Sep 13 '14 at 19:25
    
@Dennis indeed, the same issue addressed here, but no answer... – Cornelius Sep 13 '14 at 19:27
1  
I found the solution, you need to disable the ondemand daemon, with: sudo update-rc.d ondemand disable (askubuntu.com/questions/3924/…) – Removed Sep 13 '14 at 20:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.