Linux is a name very fondly held by many computer purists and enthusiasts. Often the choice of developers and consumers alike, Linux holds a big fan following due to its open source, practical, free and extensible nature. The Linux family of Operating Systems include many well-known distributions including the evergreen Ubuntu, Arch Linux, Fedora, Linux Mint, Open SUSE, RedHAT and much more. The Linux Operating System family has spread to every sphere of our lives, including our servers, computers, mobiles, TVs and even our fridges and microwave ovens.
One thing most Linux users have in common is their preference for avoiding proprietary software and having the freedom of choice. The Linux kernel holds a multitude of system and kernel mode drivers allowing both enthusiasts and normal consumers to just install the Operating System and get started instantly.
However, the open source drivers and generic code lead to one headache. Desktop Linux primarily, does not have the best reputation when it comes to your laptop’s battery life. Running on the Windows OS, your laptop might have hours more of battery life, but under Linux, it might be as low as half of that.
So, what can you do about it? You deserve a truly contemporary and complete Linux computing experience. Let’s check out some quick and easy tips to extend your laptop’s battery life using Linux.
#1. Tweak the Distro’s in Built Power Settings
Starting off simple, one of the first things you should configure after you have installed your favorite Linux Distribution is to configure the power management options according to your liking.
In most Linux Distributions, the power settings are hidden somewhere inside the main Settings app. It can also be quickly accessed through the battery icon on your taskbar.
Some of the key items to configure the power management settings include:
- When to put the computer to sleep: Keeping your computer awake, especially if you are not using it is a blatant waste of power. Setting this to a conservative value will put your laptop to sleep when not needed. Power usage while sleeping is very low, hovering somewhere around 2 to 3% per hour.
- Brightness: Most distributions can be set to reduce the brightness of your laptop’s display if the battery is low. This enables you to extract that little bit of critical use time when your laptop hits the low 20s of remaining battery.
- Configuring what happens when the lid is closed: The default action is usually to suspend the laptop when the user closes the lid. However, for the interests of power saving, you can set it to hibernate or shut down when you close the lid.
These tips seem small and very obvious, but like most obvious things, you’d be surprised at how much effectiveness you can extract from them.
#2. Forego Wireless Connections and Go Wired
Connectivity options, such as Wi-Fi, Bluetooth, Cellular Dongles can often be the cause of huge battery drain on Linux Machines. The hardware for these features uses a lot of proprietary drivers when running under Windows, while commonly, the Linux open source drivers are not as optimized. In many laptops, the Wi-Fi chips and Bluetooth connections can cause the laptop not to go to sleep or to wake up intermittently.In addition to the issues, the power usage by wireless connections varies a lot on the signal strength.
There are two simple solutions to this:
- Go Wired: Forego the wireless connection route, and plug in directly to Ethernet for internet and USB for peripheral devices. While this might not be a possible solution in many cases, if you do have it at hand, it can save you a lot of battery power. Almost as high as 3 to 4% per hour.
- Proprietary Driver: Laptops when running on Windows behave better in terms of power usage of the wireless components. Even on Linux, many manufacturers like Intel, Broadcom and Realtek provide proprietary drivers for their wireless chipsets. While this method goes against the open source nature of Linux that users love, using these drivers will not only reduce battery use but in many cases, the speed and signal strength are also improved.
#3. Closed Source Proprietary Graphics Drivers
Most modern laptops come with either integrated or dedicated graphics processing units. Today’s marketplace is dominated by Intel, AMD and NVIDIA Graphics chips.
By default, Linux includes native graphics drivers in its kernel for all the common platforms, including the newest NVIDIA Pascal, AMD Vega and Intel Coffee Lake Graphics chips. The performance of these drivers, however, leaves a lot to be desired.
Modern laptops can switch between dedicated and inbuilt graphics depending on use case. For example, a heavy game or rendering utility will invoke the dedicated graphics card, while a simple word document or movie watching will be performed on the inbuilt card itself.
To take benefit of the full performance allowed by the powerful dedicated Graphics cards and the power saving potential that switching technologies like NVIDIA Optimus offers, you have to switch to their closed source graphics drivers.
AMD and NVIDIA both offer their full graphics driver suites, namely AMD Catalyst Control Center for Linux and NVIDIA Unix Driver. These allow the hardware to be used to their full potential while saving you crucial juice on your laptop as well.
#4. Reduce Screen Brightness
Portable devices like tablets and laptops have high resolution, bright LCD panels capable of rich and vivid colors, and brightness exceeding 200 nits on average.
It looks mighty alluring to pump up the screen brightness and watch your apps, games and movies pop to life. But consider this, the screen is the largest power sucker in all portable devices.
Studies have tested that a laptop easily lasts more than twice as long at 60% brightness than at 100% brightness.
While doing normal tasks like document editing, web browsing, reducing the screen brightness can give you significantly longer runtime.
#5. Close Unwanted Applications and Uninstall Bloatware
Simplest tip of all, over the course of using your computer for all sorts of tasks, be it for work or play, often we end up with a lot of applications, some of which we might not even want anymore. Remember that trial game you tried a month back, or the new browser everyone was wowing about. Fact check, you don’t even use those applications anymore but never actually removed them.
Many of the applications can run in the background even when you have not explicitly opened them. This can be for reasons such as sending notifications, updating themselves and fetching background content.
Following a cleanup routine on your laptop, say, once a month, will extend its battery life, its speed, its free storage and overall, make you a happier person.
#6. Advanced Techniques
We’ve discussed the sure shot methods of boosting your laptop’s battery juice above. What follows below, is not for the faint of heart. These advanced techniques allow a deeper insight and much more significant control over various parameters of your laptop. However, be warned, there are risks associated with them. Any messy configuration could leave your laptop unusable and you might have to format your entire laptop and lose your data in the process.
TLP for Linux – Advanced Power Management
TLP for Linux is an alternative power management system for Linux based Operating systems. It allows for granular control over various kernel tweaks, processor scheduling, graphics power management and much more.
TLP was originally designed for IBM / Lenovo’s Thinkpad line of laptops but it is compatible with any standard ACPI based personal computer now.
The various options include:
- Kernel laptop mode and dirty buffer timeouts
- Processor frequency scaling including “turbo boost” / “turbo core”
- Power aware process scheduler for multi-core/hyper-threading
- Hard disk power management level and spin down timeout
- Runtime power management for PCI(e) bus devices
- Wi-fi power saving mode
- Powering off disc drive
- Audio power saving mode
Installing TLP is fairly simple. You have to add the repository to your system’s package manager, and then install the tlp package.
sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlptlp-rdw
TLP comes with a default configuration, which should work wonders for most users, however, you can tweak with its various options. For details on the specific options available, you can run tlp –help in the terminal.
After installing, you can start the TLP service by typing:
sudosystemctl enable tlp
Then, simply reboot the system, and you are good to go.
Powertop
While TLP can manage your battery life and power consumption figures, there is a chance that your laptop’s poor battery life might be due to some rogue services or application. Powertop allows you to analyze the root cause of the problem, and then, the necessary steps can be taken to resolve it.
Powertop automatically scans the services and processes on a Linux based system and tries to improve the battery life.
Installation is fairly simple. The repository is pre-included in most Linux distributions, so you can directly install the powertop package. Type in the following command in the Linux Terminal to install the package.
sudo apt-get install powertop (Ubuntu) sudo apt-get install powertop (Debian) pacman –S powertop (Arch Linux) sudodnf install powertop (Fedora)
Powertop is a powerful utility and allows for various levels of configuration. A basic and good power saving profile can be configured automatically by using the autotune feature of powertop.
After installation, the procedure to configure powertop for your laptop is:
- Calibrate Powertop
- Create Power Saving profile with Auto Tune
- Start the profile on boot
sudopowertop --calibrate
During the calibration process, powertop will analyze the running data of your laptop. Several things, including your display, wifi and touchpad might temporarily hang up or stop working. Do not fret, this is normal, and after Powertop is done scanning, it will be back to normal.
sudopowertop --auto-tune
After calibration, start the auto tune process using the given command. This will create a good profile for power saving automatically.
Finally, to enable these tweaks on startup, we have to add the profile to systemd.
sudonano /etc/system/system/powertop.service
Add the following lines and save the file
[Unit] Description=Powertop tunings [Service] ExecStart=/usr/bin/powertop --auto-tune RemainAfterExit=true [Install] WantedBy=multi-user.target
Then, enable the profile at boot using the command
sudosystemctl enable powertop.service
That’s it, you have installed and configured Powertop on your laptop. With all the tweaks combined, you are looking at significantly increased runtime on your laptop.
Conclusion – Improve Linux Laptop Battery Life
Being a computer purist, a developer, a free and open source software (FOSS) advocate, a Linux lover does not mean that we have to compromise with the user experience we get. Using an operating system, as much as the functionality and practicality matters to us, the battery life is of utmost importance too. After all, a laptop is a portable device, and without the battery, the portability goes for a toss.
It is not that hard to squeeze out some extra juice, not just a few minutes, but even in hours from your existing Linux laptop. All of the above tricks and methods can be done quickly and safely. The results are foolproof and almost immediate.
With such flexibility and varied usage, coupled with great battery life, is, in essence, giving your laptop a second lease of life. The more seamless your experience is, the happier you are and the result is more productivity. A win-win situation, isn’t it?
Leave a comment
Have something to say about this article? Add your comment and start the discussion.