How to Maximize Your Linux Laptop’s Battery Life
Laptop manufacturers spend a lot of time tuning their device drivers for Windows battery life. Linux Laptop usually doesn’t get the same attention. Linux may perform just as well as Windows on the same hardware, but it won’t necessarily have as much battery life.
Linux’s battery usage has improved dramatically over the years. The Linux kernel has gotten better, and Linux distributions automatically adjust many settings when you’re using a laptop. But you can still do some things to improve your battery life.
Basic Battery-Saving Tips
Before you do anything too complex, adjust the same settings you would on a Windows laptop or MacBook to maximize battery life.
For example, tell your Linux laptop to suspend—this is what Linux calls sleep mode—more quickly when you’re not using it. You’ll find this option in your Linux desktop’s settings. For example, head to System Settings > Power on an Ubuntu desktop.
Screen brightness can affect battery life dramatically. The brighter your display backlight, the worse your battery life will be. If your laptop has hotkeys to change screen brightness, try them—they’ll hopefully work on Linux, too. If not, you’ll find this option somewhere in your Linux desktop’s settings. It’s available at System Settings > Brightness & Lock on Ubuntu.
You can also tell your Linux desktop to turn off the screen more quickly when it’s inactive. The laptop will use less power when its screen is off. Don’t use a screensaver, as those just waste power by making your computer do more work and leaving the display on.
You can also disable hardware radios you don’t use. For example, if you don’t use Bluetooth, you can disable it to gain some more battery life. Head to System Settings > Bluetooth to disable Bluetooth on an Ubuntu desktop.
If you’re not using Wi-Fi, you can save a bit of power by disabling that, too. On Ubuntu, head to System Settings > Network and enable “Airplane Mode” to disable Wi-Fi and other wireless radios.
Remember that what you do with the laptop is also important. Running heavier software and using more CPU resources will cause your laptop to use more battery power. For this reason, you may want to look at a more lightweight desktop environment, such as the Lxde-based Lubuntu instead of the Unity-based main Ubuntu desktop.
Install Proprietary Graphics Drivers (If You Need Them)
If your laptop has integrated Intel graphics, congratulations. You shouldn’t need to worry about power management issues with your graphics drivers. Intel graphics aren’t the fastest, but they have excellent open-source driver support and “just work” out of the box.
If your laptop has NVIDIA or AMD graphics, however, you may need to do some work to decrease power consumption.
The worst case scenario is a laptop with NVIDIA Optimus or AMD’s switchable graphics. Such laptops have two different GPUs. For example, an NVIDIA Optimus laptop will have both a more powerful, battery-draining NVIDIA GPU and a less powerful, battery-friendly Intel GPU. On Windows, where this is properly supported, the laptop is designed to use the Intel graphics until you play a game, when the NVIDIA graphics kicks in.
When you install a Linux distribution on an NVIDIA Optimus laptop, your laptop will use the NVIDIA graphics all the time by default, draining your battery. You’ll need to install NVIDIA’s Linux drivers and set up Optimus—look for the
nvidia-prime package on Ubuntu—to make things work properly. On some laptops, you may also be able to enter the BIOS or UEFI firmware settings screen and disable your discrete GPU to force Linux to use only onboard graphics without any additional tweaks.
Even if you don’t have a dual-GPU, switchable graphics setup, you may benefit from installing the proprietary NVIDIA or AMD graphics drivers. They may enable access to power-saving features that don’t work in the standard open-source drivers.
Check if Your Battery Needs to Be Replaced
If you’re struggling with battery life, it’s possible you need to replace your laptop’s battery. All batteries will deteriorate over time, gradually holding less power than they did when they left the factory.
For example, on Ubuntu, you can open the Power Statistics application from the Dash. Look at the “Laptop battery” section. “Energy when full” is how much power your battery can currently store when it’s fully charged. “Energy (design)” is how much power your battery could originally store when it’s fully charged.
Divide “Energy when full” by “Energy (design)”, multiple the result by 100, and you’ll get a percentage. For example, in the screenshot below, we’d do the following math:
(44.8 / 54.3) * 100 = 82.5%
This means the battery currently holds 82.5% of its original capacity. That’s not too bad. You won’t be at 100% unless you just purchased a new laptop. But if it’s low—under 50%, for example—and you aren’t getting much time out of your battery, you may just need to replace the battery.
If you don’t have the Power Statistics application on your Linux distribution, you can get this information via a few terminal commands.
Open a Terminal window and run the following commands:
cat /sys/class/power_supply/BAT0/charge_full cat /sys/class/power_supply/BAT0/charge_full_design
Divide the first number by the second number and multiple by 100 to get the percentage of the battery’s original capacity. For example, for the screenshot below, we’d do the following math:
(5901000 / 7150000) * 100 = 82.5%
This means the battery is currently at 82.5% of its original factory capacity.
Advanced Battery-Saving Utilities
That’s all the low-hanging fruit. There are many low-level tweaks you can make to slightly affect battery life, but they’re generally a lot of work for not much payoff. There are a variety of tools that promise to help you with your battery life, but they’re less useful than they once were a few years ago. Linux distributions automatically configure various settings to function well on laptops.
Intel’s open-source PowerTOP utility will examine your system and see how well various power-saving features are enabled, even providing some suggestions for how to reduce your system’s power consumption. It’s a command-line tool, so you’ll need to run it from there. You’ll usually find it in your Linux distribution’s software repositories.
For example, to install and run PowerTOP on Ubuntu, you’d open a Terminal window and run the following commands:
sudo apt install powertop sudo powertop --calibrate
If you’re really struggling and need more battery life, you can install TLP. It’s designed to be a single package of aggressive battery life tweaks. It’s available in Ubuntu’s software repositories as well. Just install it and restart your system—that’s it. TLP automatically starts at boot and enables its default power-saving tweaks.
For example, TLP will more aggressively suspend USB devices, park your hard drive’s heads, and throttle your CPU. These may not be ideal tweaks if you already have solid battery life on your Linux laptop, but they may be helpful if you’re struggling to squeeze more battery time out of your system.
For example, to install TLP on Ubuntu, you’d run:
sudo apt install tlp
You can then restart your system and TLP will automatically start at each boot. To avoid restarting immediately, you can launch it by running:
sudo tlp start
You probably shouldn’t mess with TLP if you’re happy with your laptop’s battery life. But it’s a good last-resort option that beats manually enabling all these aggressive tweaks. There are other tools like TLP, but you can only use one at a time. They change most of the same settings under the hood.