CPU Scaling is a feature built into most modern (mobile) CPUs that allows them to scale up or down in how fast they run and how much energy they suck down based on demand. If you have a fairly modern mobile computer there’s a very good chance that your CPU(s) can handle frequency scaling.
Why should you care? Well, you can control this to tell you computer how much power and how fast it should allow it’s CPU(s) to operate. This can save some energy and thus battery life at the expense of a little performance – which is great for extending the use time of your laptop when it’s unplugged.
Can your CPU(s) handle scaling? There’s an easy way to find out. Open up a terminal session (Applications -> Accessories ->Terminal) and type or paste the following into it:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
On my machine I get back
1667000 1333000 1000000
Those are in Hertz, so my machine is capable of 1.66Ghz, 1.33Ghz and 1.00 Ghz.
Now that you know your CPU(s) can handle scaling, let’s see what modes are available. In the terminal, type or paste:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Again, I get:
powersave ondemand userspace conservative performance
Powersave will keep the CPU constantly at the lowest frequency. Ondemand will set the CPU at the lowest frequency (in my case, 1.00Ghz) until use of the CPU increases, then it will automatically bump it up to the highest frequency (with me, 1.66Ghz). Userspace means that a different program will be used to control the CPU’s scaling. Conservative is where your CPU will go up as needed, starting at the lowest frequency, and then bumping up to the next available until it maxes out. Performance simply sets the CPU(s) at the highest available frequency and keeps it there.
The lower your frequency, the less power you use. So, if you’re bent on extending your battery life to the max, you’d want to keep your CPU(s) at their lowest frequency – but you’ll do this at the expense of computing power. In my case my 1.66Ghz processors would effectively be 1.00Ghz processors.
Now, how do you actively control this? It’s fairly easy. Right click on an empty space in your taskbar (where your applets and such things as Applications, Places and System are located) and choose “Add to panel”. From there, find the CPU Frequency Scaling Monitor. Double click on this and it will appear in your taskbar. Right click on it and choose Properties and you can set various options like have it show your CPU frequency as a frequency (i.e. 1.33Ghz) or as a percentage. If you have multiple CPU’s or a dual/quad core machine you can also choose which CPU to monitor.
To configure this applet to actually allow you to control how your CPU(s) scale, you’ll have to had back to the terminal.
Type this:
sudo dpkg-reconfigure gnome-applets
This will throw up a nifty blue screen asking you to say Yes. Do so. Then it will ask if you want to install cpufreq-selector with SUID root. Say yes. Once you’ve done this, go back to your CPU Frequency Scaling Monitor in your taskbar and left click it. You should now be presented with a bunch of options from which you can choose the one you want. You can also directly set the frequency at which your CPU(s) will run at, which can be handy if you want to scale up or down for a short bit and then manually change it again.
As you can see, I’ve got mine set to Ondemand, allowing the frequency to scale up through three different settings (1 GHz, 1.33 GHz or 1.66 GHz) as needed.
While this will take effect immediately, it will only be in effect until you reboot at which time your default settings will come back. To change the default head back into your terminal and type:
gconf-editor
From there head to apps -> gnome-power-manager -> cpufreq. Find the settings policy_ac and policy_battery and change them to whichever setting you want for the default.
For those with multiple cores or processors who happen to be a bit needy in the info department (like myself) you can add an applet for each CPU. Just add as many applets as you have CPUs and then right click on them, choose Preferences and use the drop down to choose which CPU that particular applet is monitoring.
Now you know a lot more about CPU Frequency Scaling then you may have when you started reading this article and you know how to set it on your computer.
With kudos to thebert and the Ubuntu forums.
Technorati Tags: ubuntu, cpu frequency scaling, howto, linux, mobile, laptops, power saving, battery life
Popularity: 7% [?]















January 17th, 2008 at 10:27 am
Thanks for the article! By the way, Intel as officially stated before that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing the power consumption.
March 18th, 2008 at 1:06 pm
Hi,
i have Amd Athlon 64 3000, and I got the message that my CPU can not be scaled.
Is it true?
As I know this CPU-s are scalable.
July 5th, 2009 at 5:38 pm
Thanks for this information
December 12th, 2009 at 10:43 am
Substantially, the post is really the greatest on this worthw hile topic. I fit in with your conclusions and will thirstily look forward to your future updates. Saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay privy of any updates. Gratifying work and much success in your business dealings!
February 15th, 2010 at 4:37 am
Well I was just searching on Google for some videos and songs of my favorite singers and just came across your blog, generally I just visit blogs and retrieve my required information but this time the useful information that you posted in this post compelled me to reply here and appreciate your good work. I just bookmarked your blog
.
April 6th, 2010 at 11:19 pm
Very nice, gives me a lot of inspiration being right in the midst of a redesign. It’s all in the details and comment forms are definitely overlooked more often than not. Time well spent on this post.
May 3rd, 2010 at 3:44 pm
Saying thanks will not just be sufficient, for the fantastic lucidity in your writing. I will instantly grab your rss feed to stay privy of any updates.
May 8th, 2010 at 4:06 pm
Substantially, the post is really the greatest on this worthw hile topic. I fit in with your conclusions and will thirstily look forward to your future updates.
May 13th, 2010 at 6:14 am
I found so many interesting stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! Keep up the excellent work.
May 16th, 2010 at 2:02 pm
Substantially, the post is really the greatest on this worthw hile topic. I fit in with your conclusions and will thirstily look forward to your future updates. Good quality content is important but it’s not everything. I’ve seen blogs with bad content, yet they still manage to rank on top for several keywords. Sure, they will certainly bore the reader with bad content.
May 16th, 2010 at 2:23 pm
By the way, Intel as officially stated before that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing the power consumption. Just wanna say thank you for the information that you have been shared on your site. Simple but very informative. Hoping that you could give more other information about this.
May 28th, 2010 at 12:32 pm
Saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay privy of any updates. Thanks for the information on linking.
May 30th, 2010 at 4:43 pm
Thanks for the article! Indeed, as Intel has officially said that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing energy consumption.
June 11th, 2010 at 9:04 pm
Very nice. Thanks for the post.
FYI, it appears that in Ubuntu 10.04 the applet -by default- can manage CPU freq and mode.
June 30th, 2010 at 8:09 am
I found so many interesting stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! Keep up the excellent work.
June 30th, 2010 at 4:53 pm
Essentially, the post is actually the largest worthw hile on this topic. I fit their conclusions and thirsty waiting for their future upgrades. Saying thanks not only be enough for fantasti c lucidity in his writing. She immediately takes the RSS feed to keep abreast of any updates. Rewarding work and much success in your business relationships!
July 2nd, 2010 at 6:33 am
I found so many interesting stuff in your blog, especially its discussion. I fit their conclusions and thirsty waiting for their future upgrades. Saying thanks not only be enough for fantasti c lucidity in his writing. She immediately takes the RSS feed to keep abreast of any updates.
July 9th, 2010 at 7:17 am
I do a hell of a lot of work on trains so this is a great tutorial for me. Thanks dude!
August 1st, 2010 at 3:28 am
Essentially, the post is actually the largest worthw hile on this topic. I fit their conclusions and thirsty waiting for their future upgrades.
August 7th, 2010 at 4:46 pm
Thanks for the article! Indeed, as Intel has officially said that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing energy consumption.
August 14th, 2010 at 5:39 am
Well, I was searching on Google for some videos and songs from my favorite singers and just came across your blog, in general, I just visited my blog and retrieve required information, but this time he sent useful information in this post forced me to respond here and thanks for your good work. I bookmarked your blog.
September 17th, 2010 at 4:24 am
Thanks for the article! Indeed, as Intel has officially said that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing energy consumption. Thank you for taking the time to write this blog post. Much appreciated, very valuable information.
September 21st, 2010 at 4:31 am
Vielen Dank für diese Informationen This blog shows you some of the top tips and information on how to go about SEO, link building, articles and search engine news.
September 23rd, 2010 at 5:34 am
Hay Friend , i read w/ u idea. Do you have twitter or facebook so i can follow you ?
October 7th, 2010 at 5:37 am
Well, I am so excited that I have found this your post because I have been searching for some information about it almost three hours. You helped me a lot indeed and reading this your article I have found many new and useful information about this subject.
October 19th, 2010 at 3:28 pm
Substantially, the post is really the greatest on this topic worthw hile. I fit in with your conclusions and will thirstily look forward to your future updates. Saying thanks just will not be sufficient, for the fantastic c lucidity in your writing. I will instantly grave your rss feed to stay privy of any updates. Gratifying work and much success in your business dealings! There is no tolerance for doing the same mistake over and over again. They would better take off the hands and say sorry, lol
November 1st, 2010 at 8:30 am
thkss forr this kind of info now i can work on my laptop longer….keep writing such kind of post
November 15th, 2010 at 9:10 pm
ll the contents you mentioned in post is too good and can be very useful. I will keep it in mind. Thanks for sharing the information. Keep updating, looking forward for more posts. Thanks.
November 27th, 2010 at 7:50 am
Very nice redesign gives me a lot of inspiration being right in the Midst of a. It’s all in the details and comment forms are definitely overlooked more often than not. Time well spent on this post Hey I object your name I instrument agree for your insert please prepare bill!
December 8th, 2010 at 8:27 am
Saying thanks not only be sufficient for exceptional clarity in his writing. I instantly grab your RSS feed to keep abreast of any updates. This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! Keep up the excellent wor
December 9th, 2010 at 6:13 am
Substantially, the post is really the greatest on this topic worthw hile. I fit in with your conclusions and will thirstily look forward to your future updates. There ought to be one day – just one – when there is open season on senators.
December 24th, 2010 at 11:47 am
I found so many interesting stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! Keep up the excellent work. Cool! That just makes sense for many’s minds, lol. We should be more optimistic in life.
February 27th, 2011 at 2:55 pm
However yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love studying more on this topic. If doable, as you grow to be experience, would you mind updating your weblog with more details? It is extremely helpful for me. Huge thumb up for this blog publish!
March 6th, 2011 at 5:19 pm
wiadomosci blog tresci zwrot podatku newsy blog informacje blog przeczytaj wiadomosci dla ciebie aktualnosci nowosci naklejki scienne sprawdz to wiadomosci
March 27th, 2011 at 2:29 pm
Saying thanks not only be sufficient for the lucidity c Fantasti in their writing. I instantly grab your RSS feed to keep abreast of any updates. Thanks for the info on the link. I recently came across your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog.
March 28th, 2011 at 8:10 am
Thanks for the article! Indeed, as Intel has officially said that keeping the governor as “on demand” is the most efficient way to use the CPU while reducing energy consumption. With the new day comes new strength and new thoughts.
April 6th, 2011 at 10:44 pm
Thanks alot this explained alot even though I’m trying to oc my phone, it helped me understand. What different settings meant because alot of people haven’t defined stuff and expect u to know
April 8th, 2011 at 7:33 pm
Oh man i like your blog!
May 23rd, 2011 at 1:08 pm
I am a fan of this blog!!.
May 30th, 2011 at 1:41 pm
Am an avid ubuntu user, and this tips is gonna help alot. thanks for sharing
June 18th, 2011 at 6:02 am
This morning we are featuring Pluristem Therapeutics Inc.
July 25th, 2011 at 6:58 pm
You will find absolutely a lot of more details to take into consideration
July 28th, 2011 at 3:34 am
This can save energy and battery life and performance at the expense of a bit – which is ideal for extending the life of your laptop when offline.
November 17th, 2011 at 11:26 am
I try to learn something new on different blogs regularly. It is always refreshing to read posts of other blogger and learn something from them.
November 19th, 2011 at 4:45 pm
There is lot of information and they are very innovative and informative.
November 22nd, 2011 at 10:12 pm
It is so lucky to read your blog; it is full of useful message. I wish we both can do better in the future. It great honor if you can visit our website, and give us some suggestion.
December 16th, 2011 at 3:53 am
none of this worked. im in ubuntu 11.10 but right click the bar at the top does nothing. I have no applets what do i do?
January 13th, 2012 at 12:17 pm
You are awesome! This blog is so great. I really hope more people read this and get what you’re saying, because let me tell you, its important stuff. I never would’ve thought about it this way unless Id runs into your blog. Thanks for putting it up. I hope you have great success.
January 24th, 2012 at 6:08 am
Thanks for this! I’m gonna apply this one right after I install ubuntu on my laptop. Nice Post by the way.