Laptop makers invest significant time and effort into developing device drivers that minimize Windows’ drain on batteries. Linux rarely receives the same level of coverage as Windows. Linux might run as fast as Windows on the same hardware, but its battery life probably won’t be as good.
Over time, Linux has become much more efficient in its use of battery life. The Linux kernel has improved, and Linux distributions now tailor a number of preferences to your laptop’s configuration by default. However, there are still measures you may take to lengthen the life of your battery.
Basic Battery-Saving Tips
Adjust the same settings as you would on a Windows laptop or MacBook before attempting anything too sophisticated on your Linux laptop.
Suspend, or sleep mode in Linux can be sped up by issuing the appropriate command while you’re not using your laptop. The settings menu of your Linux desktop should contain this option. On an Ubuntu desktop, you may do this by going to System Settings > Power, for instance.
Battery life can be significantly impacted by the screen’s brightness. The battery life of your device will suffer according to the brightness of the display backlight. Try the hotkeys to adjust the brightness of your screen if your laptop has them; presumably, they will function in Linux as well. If you don’t already have this option enabled, look in the settings for your Linux desktop. Ubuntu users can find it in the System Settings menu under Brightness & Lock.
If you want your Linux desktop to go to sleep faster when you’re not using it, you can set that option. When the laptop screen is turned off, less power is consumed. Avoid using a screensaver if you are concerned about your computer’s energy consumption, as they require the monitor to remain on even after the computer is turned off.
Radios in the hardware can be turned off if they aren’t being used. When you’re not using Bluetooth, for instance, you can turn it off to save power. To turn off Bluetooth on your Ubuntu desktop, go to System Settings > Bluetooth.
Turning off Wi-Fi while it is not in use can also help conserve battery life. To turn off Wi-Fi and other wireless radios on Ubuntu, select “Airplane Mode” from the menu under System Settings > Network.
What you do while using the laptop is equally crucial. When you utilize more power-hungry programs or allocate more processing time to one task, your laptop will consume more battery life. It’s for this reason that you might want to consider switching from the default Ubuntu desktop, Unity, to a lighter desktop environment like Lubuntu, which is based on the Lxde desktop environment.
Install Proprietary Graphics Drivers (if You Need Them)
You’re in luck because your laptop has Intel graphics built right in. Concerns regarding power consumption caused by your graphics drivers shouldn’t be necessary. Though they aren’t the fastest, Intel graphics have great open-source driver support and “simply work” without any additional configuration.
However, you might have to put in some extra effort to lower power consumption if your laptop features graphics from NVIDIA or AMD.
A laptop with NVIDIA Optimus or AMD’s switchable graphics is the worst-case situation. These portables typically feature dual graphics processing units. A laptop with NVIDIA Optimus, for instance, will feature both an NVIDIA GPU (which is more powerful but drains the battery faster) and an Intel GPU (which is more efficient but uses more power), allowing the user to switch between the two as needed.
The Intel graphics are used by default until you start a game, at which point the NVIDIA graphics are activated on Windows (where this is correctly supported).
If you put Linux on an NVIDIA Optimus laptop, it will always use the NVIDIA graphics, which will quickly drain the battery. To get things working, you’ll need to install the Nvidia-prime package on Ubuntu and run NVIDIA’s Linux drivers to enable Optimus. Some laptops may also allow you to visit the BIOS or UEFI firmware settings panel and disable your discrete GPU, allowing Linux to use only onboard graphics without any further configuration.
The proprietary NVIDIA or AMD graphics drivers may improve performance even if you do not have a dual-GPU, switchable graphics system. Power-saving features may be accessible with these drivers if they aren’t supported by the default open-source drivers.
Check if Your Battery Needs to Be Replaced
Battery replacement might be in order if your laptop is shutting down prematurely. Over time, the capacity of any given battery will decrease relative to when it was first manufactured.
On Ubuntu, for instance, the Power Statistics program is accessible via the Dash. Check out the “Portable laptop power” subsection. When your battery is fully charged, it can store as much power as its “energy when full” rating indicates. When your battery was first created, its “energy (design)” was the maximum amount of juice it could hold.
The percentage can be calculated as follows: take “Energy when full” and divide it by “Energy (design)”, then multiply the result by 100. In the image below, for instance, we may use the following equations:
(44.8 / 54.3) * 100 = 82.5%
To put it another way, the battery is functioning at about 82.5 percent of its maximum capacity right now. Not awful, really. Unless you just got a brand new computer, you won’t be at peak performance. Conversely, if it’s low (say, below 50%) and you’re not getting very long out of your battery, you could just need to replace the battery.
It is possible to obtain this data with a few terminal commands if the Power Statistics program is not installed on your Linux distribution.
The following commands should be entered into a Terminal window:
cat /sys/class/power_supply/BAT0/charge_full cat /sys/class/power_supply/BAT0/charge_full_design
For a percentage of the battery’s initial capacity, divide the first value by the second, then multiply by 100. For the image below, for instance, the arithmetic would look like this:
(5901000 / 7150000) * 100 = 82.5%
This indicates that the battery is at 82.5% of its full potential.
Advanced Battery-Saving Utilities
There are no more easy wins to be had. Many little adjustments can be made to the battery life, but they usually require a lot of effort for very little gain.
A number of apps and utilities claim to extend the life of your battery, but they aren’t as effective as they were even only a few years ago. Linux distributions have settings optimized for laptops built in.
The open-source Intel PowerTOP software may check how effectively your system’s power-saving features are enabled and can make recommendations for further improvements. To use it, head to the command prompt, as it is a terminal program. It’s likely to be available in your Linux distribution’s app store.
In a Terminal window, you may enter these instructions to install and launch PowerTOP on Ubuntu, for instance:
sudo apt install powertop sudo powertop --calibrate
TLP can be installed if you’re really having trouble and need longer battery life. It’s meant to be implemented all at once for maximum impact on battery life.
It can also be downloaded from Ubuntu’s software archive. All that is required after installation is a system restart. The Default Power Management Settings in TLP are activated and TLP starts automatically upon launch.
TLP can aggressively pause USB devices, park your hard drive’s heads, and reduce your CPU speed, among other things. If your Linux laptop’s battery life is already rather good, you may not want to make these changes. However, if you’re having trouble getting adequate battery life from your system, they could prove useful.
The following command is an example of how to install TLP on Ubuntu:
sudo apt install tlp
After that, TLP will launch during system startup from now on. You can launch it without having to immediately restart by typing:
sudo tlp start
If your laptop’s battery life is satisfactory, you probably shouldn’t meddle with TLP. It’s not ideal, but it’s better than having to turn on all these extreme settings by hand. TLP isn’t the only tool available, and you can only use one at a time. They both adjust the same hidden parameters.