Save Battery on Linux

Posted on Aug 4, 2021

Linux on laptops

The downside of Linux when it comes to laptops is that it’s very power hungry, however we can fix this by installing a power saving program called auto-cpufreq.

How to install auto-cpufreq

There are many ways of installing auto-cpufreq provided at https://github.com/AdnanHodzic/auto-cpufreq.

However, I will install it from source code, since this way will work on most Linux distributions.

  1. Clone the git repository:
$ git clone https://github.com/AdnanHodzic/auto-cpufreq.git
  1. Change the directory to the repository and execute the installer:
$ cd auto-cpufreq && sudo ./auto-cpufreq-installer
  1. Install the auto-cpufreq daemon to make changes permanent:
$ sudo auto-cpufreq --install

That’s it! auto-cpufreq is installed.

Verify if auto-cpufreq is running

$ systemctl status auto-cpufreq

Monitor CPU load using auto-cpufreq

$ sudo auto-cpufreq --stats

Extra: Install TLP alongside auto-cpufreq for even better battery life

Warning: You will lose boost clocks after installing TLP.

$ sudo apt install tlp