Linux Power Management for Laptops
Extend Linux laptop battery life using TLP, auto-cpufreq, PowerTOP, and kernel boot parameters. Practical configuration for all major distros.
Before you start
- ▸Root or sudo access on the target laptop
- ▸Kernel 5.15 or newer (6.1+ recommended for amd-pstate active)
- ▸GRUB as the bootloader, or familiarity with your bootloader's config file
- ▸Basic terminal and text-editor comfort
Laptop battery life on Linux has improved dramatically over the past few years, but out-of-the-box power consumption is still higher than it could be. A combination of userspace power managers, CPU frequency scaling, and a few kernel boot parameters can routinely add 1–3 hours of real-world runtime. This guide covers the practical stack: TLP, auto-cpufreq, PowerTOP, and targeted kernel tweaks.
Understanding the Linux Power Stack
Linux power management operates at several layers:
- Kernel drivers – handle hardware-level states (PCIe ASPM, runtime PM, audio codec power saving).
- CPU frequency scaling – governed by a cpufreq driver (
intel_pstate,amd-pstate) and a governor (powersave,performance,schedutil). - Userspace managers – TLP or auto-cpufreq sit on top and automate the above based on AC vs. battery state.
Do not run TLP and auto-cpufreq simultaneously. They both own the same governor and frequency-scaling settings; conflicts cause unpredictable behaviour. Pick one.
Option A: TLP
TLP is the most widely deployed solution. It is event-driven (triggered on power source changes) and tunable via a single config file. It does not run a background daemon polling the system.
Install TLP
# Debian / Ubuntu
sudo apt install tlp tlp-rdw
# Fedora
sudo dnf install tlp tlp-rdw
# Arch
sudo pacman -S tlp
On ThinkPads, also install tp-smapi (older hardware) or acpi-call for battery charge thresholds:
# Ubuntu (DKMS builds)
sudo apt install tp-smapi-dkms acpi-call-dkms
# Arch (AUR)
paru -S acpi_call-dkms
Enable and Start TLP
sudo systemctl enable --now tlp
# On systems with power-profiles-daemon, mask it to avoid conflicts
sudo systemctl mask power-profiles-daemon
Key Configuration Options
The config file lives at /etc/tlp.conf on TLP 1.3+ (Debian/Ubuntu) and /etc/tlp.d/ drop-ins are supported on TLP 1.4+. Edit the main file for clarity:
sudo nano /etc/tlp.conf
Critical settings to review and set explicitly:
# CPU scaling governors: powersave is correct for Intel/AMD with HWP
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
# Energy-performance hints (Intel HWP / AMD EPYC)
CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance
CPU_ENERGY_PERF_POLICY_ON_BAT=power
# PCIe Active State Power Management
PCIE_ASPM_ON_BAT=powersupersave
# Wi-Fi power saving (may cause latency; disable if video calls suffer)
WIFI_PWR_ON_BAT=on
# USB autosuspend (set to 0 to exclude devices by ID if peripherals misbehave)
USB_AUTOSUSPEND=1
# ThinkPad battery charge thresholds (requires tp-smapi or acpi_call)
START_CHARGE_THRESH_BAT0=40
STOP_CHARGE_THRESH_BAT0=80
After editing, reload without rebooting:
sudo tlp start
Option B: auto-cpufreq
auto-cpufreq takes a dynamic, ML-informed approach — it monitors CPU load and battery level continuously and adjusts the governor and turbo state in real time. It pairs well with systems that have variable workloads and is the better fit on AMD laptops using amd-pstate.
Install auto-cpufreq
# Debian / Ubuntu — use the installer script (no official package yet)
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq && sudo ./auto-cpufreq-installer
# Arch (AUR)
paru -S auto-cpufreq
# Fedora — use the installer script as above, or flatpak for GUI only
sudo systemctl enable --now auto-cpufreq
Live monitoring output (press Ctrl+C to exit):
sudo auto-cpufreq --monitor
PowerTOP: Identify and Fix Power Hogs
PowerTOP is a diagnostic tool from Intel. It measures per-process and per-device wakeup rates and lets you toggle power-saving settings interactively.
# Install
sudo apt install powertop # Debian/Ubuntu
sudo dnf install powertop # Fedora
sudo pacman -S powertop # Arch
# Run interactively (needs root for full hardware access)
sudo powertop
Navigate to the Tunables tab. Items showing Bad are consuming power unnecessarily. Press Enter on any line to toggle it to Good. Common offenders include the NMI watchdog, audio codec power saving, and USB devices.
Persist PowerTOP Tunables at Boot
PowerTOP can write a systemd service for you:
sudo powertop --auto-tune
sudo powertop --html=/tmp/report.html # export a full power report
Create a oneshot service to apply tunables on boot:
sudo bash -c 'cat > /etc/systemd/system/powertop.service << EOF
[Unit]
Description=PowerTOP auto-tune
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target
EOF'
sudo systemctl enable --now powertop
Warning: --auto-tune aggressively autosuspends USB devices. If a keyboard or mouse becomes unresponsive after boot, disable this service and tune manually via the config file.
Kernel Command-Line Tweaks
These boot parameters complement userspace tools. Edit /etc/default/grub and add parameters to GRUB_CMDLINE_LINUX_DEFAULT, then update GRUB.
sudo nano /etc/default/grub
Recommended additions (research each for your specific hardware first):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvme.noacpi=1 pcie_aspm=force nmi_watchdog=0 mem_sleep_default=deep"
nvme.noacpi=1– disables NVMe ACPI power management (fixes sleep wake issues on some laptops; skip if NVMe works fine).pcie_aspm=force– forces PCIe Active State Power Management on hardware that reports it as unsupported but actually works. Test carefully — rare instability on some systems.nmi_watchdog=0– disables the NMI watchdog, a significant wakeup source on battery.mem_sleep_default=deep– prefers S3 (suspend-to-RAM) over s2idle where both are available. Saves significantly more power during suspend.
For AMD laptops on kernel 6.1+, also enable the active driver:
# Add to GRUB_CMDLINE_LINUX_DEFAULT
amd_pstate=active
Apply the GRUB changes:
# Debian / Ubuntu / Fedora
sudo update-grub
# Fedora (if update-grub is not present)
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# Arch (systemd-boot users: edit /boot/loader/entries/*.conf directly instead)
sudo grub-mkconfig -o /boot/grub/grub.cfg
Verify Your Improvements
Check the current TLP status and active settings:
sudo tlp-stat -s # summary
sudo tlp-stat -b # battery info and thresholds
sudo tlp-stat -p # CPU frequency and governor
Confirm suspend mode is deep:
cat /sys/power/mem_sleep
# Expected output (varies): s2idle [deep]
Check active CPU governor and current frequency:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
grep MHz /proc/cpuinfo | head -4
For a battery discharge rate in real time, use upower:
upower -i $(upower -e | grep BAT)
# Look for: energy-rate: 8.5 W (lower is better)
Troubleshooting
Wi-Fi Drops After Enabling Power Saving
Set WIFI_PWR_ON_BAT=off in /etc/tlp.conf, or create a persistent iwconfig rule. Power saving on some Intel and Realtek adapters causes connection instability.
USB Peripherals Unresponsive After Boot
This is usually PowerTOP's auto-tune autosuspending input devices. Add the device's USB ID to TLP's exclusion list:
# Find the ID
lsusb
# Example output: Bus 001 Device 003: ID 046d:c52b Logitech Unifying Receiver
# In /etc/tlp.conf:
USB_DENYLIST="046d:c52b"
System Won't Wake From Suspend
Remove mem_sleep_default=deep from kernel parameters and retest. Some platforms do not fully support S3 despite advertising it. As a fallback, s2idle (the default) is universally safe.
TLP Changes Not Taking Effect
Make sure power-profiles-daemon is masked (sudo systemctl mask power-profiles-daemon). It ships enabled by default on Fedora 35+ and Ubuntu 22.04+ and overrides TLP's governor settings while both are active.
Frequently asked questions
- Can I use TLP and auto-cpufreq together?
- No. Both tools manage the CPU governor and frequency scaling policy. Running them simultaneously causes conflicts and unpredictable power behaviour. Choose one based on your preference — TLP for static event-driven tuning, auto-cpufreq for dynamic load-aware scaling.
- Does TLP work on non-ThinkPad laptops?
- Yes. ThinkPad-specific features like battery charge thresholds require tp-smapi or acpi_call, but all core TLP functionality — governor control, PCIe ASPM, USB autosuspend — works on any laptop.
- What is the difference between s2idle and deep (S3) suspend?
- s2idle is a software-driven idle loop where the CPU halts but the system stays powered; it is universally safe but uses more power. S3 (deep) cuts power to most components and saves significantly more energy during suspend, but requires full ACPI S3 support from the firmware.
- Will these changes affect performance when plugged in?
- TLP applies separate profiles for AC and battery power. On AC, you can set the governor to performance and energy-performance policy to balance_performance, so plugged-in behaviour is unchanged from stock.
- PowerTOP's auto-tune broke my USB keyboard. How do I fix it without rebooting?
- Re-enable the device immediately with: echo on | sudo tee /sys/bus/usb/devices/DEVICE_ID/power/control. Then add the USB ID to TLP's USB_DENYLIST in /etc/tlp.conf so it is excluded permanently.
Related guides
AI and Artificial-Life Tools on Linux
Set up open-source AI/ML and artificial-life toolkits on Linux: PyTorch, JAX, DEAP, Avida, NetLogo, and RL environments with GPU driver guidance.
Assembly Language on Linux: A Starter Guide
Write x86-64 assembly on Linux from scratch: install NASM and GAS, learn syscalls, assemble and link a working program, then inspect and debug it.
How to Benchmark Disk Performance with fio
Learn to benchmark Linux disk performance with fio: writing job files, testing latency and throughput, and interpreting IOPS and percentile output correctly.
The Linux Boot Process Explained
Trace the full Linux boot sequence from UEFI firmware through GRUB2, the kernel, initramfs, and systemd to your login prompt — with diagnostics at each stage.