1. Home
  2. Linux
  3. Improve battery life on linux

How To Improve Battery Life On Linux Laptops

Let’s face it: battery life on Linux is abysmal. If you take a modern laptop running Windows 10, battery life will probably be somewhere around 6 – 10 hours, easy. Install Linux on that same PC, and you’re lucky to get 4-5 hours. Why is this? Well, many Linux developers don’t do enough to help laptop users. Sure, some add a few tweaks, and others even use some of the software covered in this article to help improve battery life on Linux but the majority of mainstream Linux operating systems have mediocre battery life at best.

SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.

That’s why in this article, we’ll be going over the best ways to improve battery life on Linux laptops. Let’s get started!

TLP

The first piece of software that users can use to improve their battery life on the Linux platform is TLP. It’s a background tool that, once installed, automatically scans the computer it’s on, and adjusts battery usage automatically. For the most part, no tweaks really need to be made with this tool because everything is automatic. However, it is possible to change certain settings if desired.

TLP is widely used by fans of Linux on laptops. Developers looking to get a little bit out of their Linux operating system when it’s running on a laptop turn to this software specifically due to the fact that pretty much everything is automated. No tinkering required for the average user.

To install TLP to your Linux PC, start off by opening a terminal window. Then, enter the command corresponding to your operating system.

Ubuntu

sudo apt-get install tlp

Arch Linux

sudo pacman -S tlp

Fedora

sudo dnf install tlp

OpenSUSE

Suse has TLP on the OpenSUSE software page. Install it with the “one-click method” here.

Other

As mentioned before, TLP is very popular. Even if your operating system isn’t popular enough to be mentioned in the installation list, there’s still probably a way to install it. Open the package manager that is normally used to install software on the Linux-based operating system you’re using. Search with the term ‘TLP”.

Enabling TLP

The TLP software is very easy to enable at boot. Those running Ubuntu, Fedora, Arch Linux, OpenSUSE, or any other Linux distribution that uses the modern systemd startup system can easily enable TLP. This is done with a single command to make it load at boot.

sudo systemctl enable tlp

A second command allows the TLP service to start right away. Otherwise, rebooting is necessary.

sudo system start tlp

Debian users (especially those running the version without systemd) need to start and enable TLP in a different way. When installed, TLP will automatically enable itself. However, it won’t start right away without the the following command.

sudo tlp start

When TLP is fully enabled, it’ll manage the power usage on Linux automatically. There really isn’t any reason to change any settings. If, however, you’d like to change settings anyways, open a terminal and type: tlp --help. This reveals the many options the program has for managing power usage on Linux.

Powertop

While TLP manages to automatically improve battery life on Linux, it never really gets to the core of the problem as to why battery life is so terrible. To solve this problem, there is a different method. The program that can solve this problem goes by the name of Powertop. Like TLP, it can automatically scan a Linux laptop and try to improve battery life. However, unlike TLP, it’s more about enabling and disabling certain power-management tools within Linux.

Additionally, Powertop has a browser that can help users find what exactly is the power hog so that measures can be taken. Here’s how to install it:

Ubuntu

sudo apt install powertop

Debian

sudo apt-install powertop

Arch Linux

Arch Linux carries powertop. However, unlike a lot of other Linux-based operating systems on this list, there is an extensive article on how Powertop works with Arch Linux. If you’re an Arch user looking to install this software, it’s a good idea to read this page. Install it with:

pacman -S powertop

Fedora

sudo dnf install powertop

OpenSUSE

Like most software packaged for OpenSUSE, Powertop has a “one-click” install page. Install it here.

Other

The source code for Powertop is available on Github. Along with this, detailed instructions cover exactly how to download it and build it based on the source code. Go here if you’ve searched your Linux distribution for Powertop and came up empty.

Configuring Powertop

Powertop is a powerful tool. A good power saving profile will be configured automatically, by using the “autotune” feature. This feature will automatically go through and enable all the “GOOD” settings. For example: if your WiFi chip uses too much power, the battery suffers as a result. The autotune feature will diagnose this, let you know and turn on power savings.

First, calibrate Powertop. This is necessary for the program to work.

sudo powertop --calibrate

During this calibration process, Powertop collects a lot of data on how your Laptop runs. Your screen may go blank, and WiFi might stop working. This is just Powertop fiddling with things. Leave everything and let Powertop do its thing.

When the calibration is complete, start the autotune process.

sudo powertop --auto-tune

Finally, enable these auto-tune tweaks at startup with systemd. Paste the following in nano with: sudo nano /etc/systemd/system/powertop.service

[Unit]
Description=Powertop tunings

[Service]
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

Press CTRL + O to save this file. Then, enable the auto-tunes at boot with:

sudo systemctl enable powertop.service

Conclusion

Battery life on Linux is pretty terrible especially if you compare it with battery life on operating systems like Windows and macOS leaves. It is because of this fact, many Linux users find themselves frustrated. Luckily, with the help of such tools as TLP and Powertop, all is not lost.

3 Comments

  1. Thing is I used to run Windows on my Macbook in Boot Camp and got similar bad battery life compared to the Macbook running MacOS. I mean the OS isn’t matched to the hardware really well so the result is inefficiency.
    I have tried to improve battery life with Linux distro’s to no avail. I have experienced better results over the years but still nothing coming close to what I got with Windows. It’s just one of those negatives you have to accept if you run Linux.

  2. I think it’s widely accepted that using Linux desktop OS on a notebook will get you less battery life then with Windows. The more you can micro manage drivers the OS and hardware together the more efficient everything is. Case in point is Apple’s Mac lineup which mates all the hardware, OS, and a lot of software together to save on power use. You put Linux on a Mac and you will experience the same loss of battery life as you would on a Windows PC running Linux. This is why other then testing on a notebook with Linux I mostly use Windows on all my notebooks. If you love Linux desktops then install a distro on a desktop PC not a notebook. Actually, I think the experience is even better and hardware support is also better with desktop PC hardware then notebook hardware with Linux.

  3. Thanks for documenting this. I just got a new laptop and it was great to not have to look all this up and remember it 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.