Increase Linux Battery Life (Any Distro)
Updated Nov 27, 2019
Is there a simple way to optimize a Linux laptop for battery life without having to spend your whole day? I'll show you best practices to keep it well-nourished.
Increasing your Linux machine's battery life is fast and simple.
Back in the day, the battery life on Linux was terrible.
Most users would spend days, if not weeks, getting the Linux laptop battery life in an efficient state.
Even today, information read for power saving on Linux is typically scattered across the web.
It's difficult to know which settings to find on Linux and not be overloaded.
There wasn't a handful of Linux users as compared to today, so hardware support wasn't a top priority.
Plus, Linux didn't really have any standardization on what settings the average users can use to just get by and continue their work.
Power management tools such as Jupiter can achieve this quite well on a laptop, but in the Linux world, using a GUI is actually not the fastest way.
Why not a GUI? But isn't the CLI hard?
With the terminal, optimizing the battery is much quicker.
Terminal? CLI? Shell? For someone who does basic tasks on Linux, they all mean the same thing.
The typical computer user believes that the Linux CLI is used by top-tier engineers that possess arcane knowledge.
How could it ever be possible for the average joe to learn the Linux CLI?
In reality, the CLI can be used by anyone with just a bit of guidance on Linux.
It's actually easier than you think.
In fact, when I started using the command line on Linux, reading a few blog posts helped me get up to speed within a couple of weeks.
The command line can be intimidating for many, which is one of the many reasons why beginners choose to not learn Linux.
When one realizes that the Linux CLI is a tool to instruct the computer to perform a specific task, then it unlocks the doors to many other avenues.
Having to use a GUI can become more of a burden when you start to do more advanced tasks.
You do not have to necessarily become a power user to make the most out of the command line, but it should be mentioned at the very least.
It's a robust tool and it takes a minimalistic approach to perform any task that it's given.
Especially with managing battery usage, it's a simple thing to do.
Optimize battery life
If you think about it, laptop power management is basically telling the computer to use fewer watts.
Nothing more or less.
It takes what it requires and leaves out the rest.
This can be applied to any distro, whether that's Linux Mint, Ubuntu, and the list goes on.
In the case of Linux, it's nothing new for seasoned users since it's easy to get what they want, but if you're coming from another operating system, your way of doing things takes a different approach.
Usually, in Windows, you know the drill:
- Go online to search for "optimize windows battery life".
- Skim through a blog post (most likely what you're doing on this one).
- Download and run some sort of Battery Optimizer
.exefile onto the desktop.
- Configure the settings and reboot.
It's what most do when they want a conservative laptop battery mode, but if you're on a Unix-based operating system such as macOS or Linux, it's different.
The third-party tools described above aren't necessary at all.
It can all be done through the Linux command line.
On Linux, there's no catch either; it just requires a few simple steps and you'll have what you've been looking for.
It really makes you think as to why most software just doesn't work like Linux.
With the command line, a simple execution can do the trick without having to learn an unfamiliar interface.
Once I demonstrate the process, you'll have a harder time wanting to do it in any other way.
Are you ready?
Install the programs
sudo apt install powertop htop tlp lm-sensors
Install microcode - only install one package
sudo apt install intel-microcode
sudo apt install amd64-microcode
enable lm-sensors (choose the default options)
check CPU usage
launch powertop (press
tab to cycle through each category)
After applying the optimizations, you'll have a well-rounded laptop that won't be leaking any power from the battery.
Power management tools on Linux such as tlp are a killer way of optimizing the laptop battery.
I could have used powertop instead of tlp to calibrate the battery watt usage, but that requires having to create a systemd service on Ubuntu, which already in itself sounds like an arbitrary task for the beginner to follow through.
If you install tlp, it automates it for the battery (right from the start)!
How easier can it get?
Have any questions? Leave a comment down below.