How to increase laptop battery life on linux

Philip Thomas K.

04 July 20


One of the great things about linux, is that you can do whatever you want to it. You can even optimise it to increase the battery life of your laptop.

Here’s How

To do this, you must first install powertop. powertop is a utility that is written by some people at intel. It is a utility that can help you diagnose the power consumption of your linux machine.

After installing powertop, run the following command in your terminal:

sudo powertop --calibrate

This command runs your laptop through some tests. It will look like the computer has taken control of itself. Please do not touch your laptop during this period. After the calibration is complete, run the following command:

sudo powertop --auto-tune

This will tune all your possible tuneables to their Good setting. However, not all of these changes will be persistent when you restart your machine. To determine which of the changes do not stick, simply reboot your machine. After that is done, run the following command:

sudo powertop --html

This command will produce a html file that can be interactively viewed with your browser:

Click on the “Tuning” tab, and in it, you will find a section called: “Software Setting in Need of Tuning”. This section details 2 things: A description of a tuneable that is not persistently tuned to its Good setting, and the corresponding command that tunes it to its Good setting.

All of these commands that are in the “Script” column need to be placed in a special file inside your linux system called rc.local. This file has all the commands listed inside it run as root during startup. It should be stored inside your /etc/ folder.

I personally recommend that the descriptions are added in as comments. I will not bore you through how you should achieve this task. Just use your preferred text editor to get the job done. But, do note that you will have to run your text editor as root for the changes to be saved.

Why not just use tlp?

I tried using it, but for some reason, it made my startup slower. Not by much, probably 1-2 seconds slower. But, since I am far too used to living the easy runit life, I noticed the lag immediately. Just after the line: Waiting for devices to settle.

Maybe if you run a systemd governed system, you may not notice the same issues as I do. My guess is that instead of directly tuning everything to Good, the program instead runs powertop --auto-tune every time. This will be slower, as it will have to always re-generate the list of tuneables on startup, instead of using a pre-defined list.

Best Regards,