skip to content
Slashism

Improve battery life on Linux

/ 2 min read

The one thing that I really dislike about Linux is its battery management. It drains your battery very fast.

I found few tricks to improve the battery life on Ubuntu:

Use tlp

This tiny utility can help us to maximize battery life. Install it with this command:

Terminal window
sudo tlp start

Now it will automatically start with the system. It will detect the power source automatically and change the power profile accordingly to give the optimized battery life.

You can see a lot of battery and power-related information with this command:

Terminal window
sudo tlp-stat

Use -s for a short output:

Terminal window
sudo tlp-stat -s

Install Powertop

Install powertop with this command if it’s not installed:

Terminal window
sudo apt install powertop

Now unplug the AC adapter and run the calibration to get more accurate information out of it:

Terminal window
sudo powertop --calibrate

Don’t freak out if your screen goes all black. It will take a couple of minutes to calibrate so wait patiently without panicking.

Once the calibration is done, you can start the powertop and see some power status:

Terminal window
sudo powertop

Now do the autotune to adjust some of the settings to improve the power usage:

Terminal window
sudo powertop --auto-tune

Ubuntu Power Statistics

Launch the Power Statistics from your application menu in Ubuntu. Then click on the Laptop battery in the opened window.

You will see a window with lots of stats. Here two stats are important to calculate your battery’s original capacity: Energy when full and Energy (design)

Energy when full - Amount of power your battery can currently store with a full charge.

Energy (design) - Amount of power your battery could store originally with a full charge

Now divide Energy when full by Energy (design) and multiply the result by 100, and you will get the percentage of the current capacity of your battery.

In my case it was:

43.9/48 * 100 = 91.45%

Here my battery can currently hold 91.45% of its original capacity, which is good. If it’s below 50% then you might want to replace your battery.

That’s all. I hope these tips will help you to improve your battery life on Linux.