Linux Power Management: Getting Real Battery Life From a Laptop
The gap between Linux and Windows battery life on the same laptop used to be embarrassing. Kernel work on runtime power management, better default policies, and vendor participation have closed most of it. What remains is usually a small number of settings and one application behaving badly.
Measure before changing anything
sudo apt install powertop
sudo powertop --calibrate # takes several minutes, do it on battery
sudo powertop
The Overview tab ranks what is waking the CPU. The Tunables tab lists settings that are not in their power-saving state, with a one-key toggle to try each.
Without this you are guessing, and guessing about power leads people to disable things that were never costing anything.
# Current drain and battery health
upower -i $(upower -e | grep BAT)
cat /sys/class/power_supply/BAT0/power_now # microwatts
Battery health is worth checking early. A cell at seventy percent of its design capacity is not a software problem.
Power profiles
Modern desktops integrate with power-profiles-daemon:
powerprofilesctl list
powerprofilesctl set power-saver
Three profiles, exposed in the GNOME and KDE power menus. For most people this is sufficient and requires no configuration.
TLP
For finer control:
sudo apt install tlp
sudo systemctl enable --now tlp
sudo tlp-stat -s
Do not run TLP and power-profiles-daemon together; they fight over the same settings. Pick one.
Useful settings in /etc/tlp.d/99-custom.conf:
CPU_SCALING_GOVERNOR_ON_BAT=powersave
CPU_ENERGY_PERF_POLICY_ON_BAT=power
PCIE_ASPM_ON_BAT=powersupersave
WIFI_PWR_ON_BAT=on
USB_AUTOSUSPEND=1
# Charge thresholds, on supported hardware
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80
Charge thresholds are the underrated one. A battery kept at eighty percent rather than one hundred degrades far more slowly, and on a laptop that lives on a desk the capacity you lose is capacity you were not using.
sudo tlp-stat -b # verify thresholds took effect
CPU scaling
cpupower frequency-info
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sudo cpupower frequency-set -g powersave
On modern Intel and AMD hardware the driver matters more than the governor. intel_pstate and amd_pstate handle scaling in hardware, and amd_pstate in guided or active mode is a meaningful improvement on recent AMD laptops. Check what you are using:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
The usual culprits
A discrete GPU that never sleeps. On a hybrid laptop this is often the single largest drain.
nvidia-smi # is it awake, and what is using it
Running the desktop on integrated graphics with per-application offload is the fix. See NVIDIA drivers on Linux.
Browsers. Frequently the largest consumer on the machine. One tab with an animation or a busy script can cost more than every system setting combined. Check the browser’s own task manager before blaming the OS.
Screen brightness. The display is usually the biggest single draw. Dropping brightness is worth more than most tuning.
Wake sources. A device waking the machine repeatedly prevents deep idle states:
cat /proc/acpi/wakeup
Disable ones you do not need, often a USB controller waking on any activity. A udev rule makes it persistent.
Suspend and hibernate
systemctl suspend
systemctl hibernate
Hibernate needs swap at least the size of your RAM and a resume parameter pointing at it. It is more prone to hardware quirks, so test it before relying on it.
Check what suspend states the hardware supports:
cat /sys/power/mem_sleep
[s2idle] rather than [deep] means modern standby, which on some hardware drains noticeably more. Some firmware lets you choose in BIOS settings.
Realistic expectations
On a well-supported laptop, current Linux is close to Windows and occasionally better. On hardware with poor Linux support, especially very new machines or ones with unusual power controllers, it can still be worse and no amount of configuration fixes a missing driver.
Measure first. The single largest win is almost always one specific thing, and it is rarely the thing people tune.
Frequently Asked Questions
Should I install TLP or use what my distribution ships?
Try the built-in power profiles first, since GNOME and KDE both integrate with power-profiles-daemon and the defaults are reasonable now. TLP gives finer control and is worth adding if the defaults are not enough, but do not run both.
What is actually draining my battery?
Run powertop and look at the top consumers. The usual culprits are a discrete GPU staying awake, a browser with a busy tab, and a device that never reaches a low power state. Guessing wastes far more time than measuring.
Does the desktop environment affect battery life?
Somewhat, though less than people claim. A compositor doing constant animation costs more than a minimal window manager, but the difference is usually smaller than a single misbehaving browser tab.
Why does my laptop get hot doing nothing?
Commonly the discrete GPU never powering down on a hybrid machine, or a process polling in the background. Check with powertop and nvidia-smi, and consider running the desktop on integrated graphics with per-application offload.
Do battery charge limits work on Linux?
On supported hardware, yes. ThinkPads, ASUS, and several others expose charge thresholds through sysfs, and TLP can set them. Limiting charge to around eighty percent meaningfully extends battery lifespan if the machine is usually plugged in.
Is suspend or hibernate better?
Suspend for short breaks, since it resumes in seconds and uses a little power. Hibernate for long periods, since it writes memory to swap and uses none. Hibernate needs swap at least the size of your RAM and is more likely to have hardware quirks.