Install cpufreq in Ubuntu to Save Power [Quick Tip]

Overheating of laptop, low battery life. power saving, these are the common troubles one faces in almost any operating system and in almost any laptop. Jupiter was one of the best application to reduce overheating of Linux laptops but its development stopped for reasons unknown.

With Ubuntu 16.04, TLP became the best alternative to Jupiter. But TLP is not the only tool that you can use to save battery and reduce overheating of laptops in Ubuntu 18.04. cpufreq is a tiny daemon that does its job pretty well. Moreover, unlike TLP, it is not confined to command line. You can install it as an applet indicator and quickly control it from the top panel.

Install cpufreq on Ubuntu

To install cpufreq in Ubuntu 18.04 use the following command in terminal (Ctrl+Alt+T):

sudo apt install indicator-cpufreq

Voila! Nothing else needed here. Now just search for cpufreq in Unity Dash and it will be started.

If you are using Elementary OS you will need to install and enable indicators.

How does cpufreq work?

All processors run at a certain clock speed. You would have seen numbers like 3.1GHz in product specifications.

Higher the clock speed, higher the amount of processing done. So a very high clock speed is good right? Well like all things it also comes at a cost. Processors start to consume exponentially more power and produce a lot of heat as the clock speeds are increased.

To avoid the high power consumption and heat, processors do not run at their highest clock speed all the time. Modern processors have algorithms which adjust the clock speed on the fly depending on the load, temperature and power consumption. This is the reason your laptop heats up when running something intense and remains cool the other times.

cpufreq gives you options to tweak these algorithms. On my laptop I get these options.

cpu-freq
Newer Intel processors(2nd gen and above)

Older Intel processors also allow you to set the processor speed manually. The newer Intel processors use a new p_state driver which does not allow you to do the same.

Install cpufreq in Ubuntu 13.04
More manual control with older Intel processors

Nevertheless you can still use it to toggle between Powersave and Performance modes. This changes how aggressively the algorithm changes the processor clock speed.

You can squeeze out a little more battery life out of your laptop in the power save mode and use the performance boost in performance mode.

If you have an old computer and you are presented with frequency options, I highly suggest you not to use them unless you know what you are doing. Setting it to non-optimal frequencies might cause problems like overheating and performance issues.

How to uninstall cpufreq

Uninstalling cpufreq is as easy as it to install. Use the following command in terminal:

sudo apt-get remove indicator-cpufreq

What tool(s) do you use for power saving and performance boost on Linux? TLP, Cpufreq or something else? Do share your views in the comment section.

Similar Posts

  • indicator-cpufreq was just automatically removed yesterday from my Debian Testing. Because not maintained upstream and outdated libraries it was based on.