Limit Battery Charging to 80% via sysfs
Write charge_control_end_threshold in /sys/class/power_supply/BAT0/ to stop charging early and extend battery lifespan.
Run `echo 80 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold` to stop charging at 80%.
01Command
Command
$ echo 80 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold02What it does
Lithium batteries age fastest when kept at 100% and warm, so capping the charge at 80% is the single most effective lifespan tweak for a laptop that lives on the charger. Check what your hardware exposes with `ls /sys/class/power_supply/BAT0/` — ThinkPads use separate charge_start_threshold and charge_stop_threshold files instead. The setting resets after reboot unless you persist it with a systemd service or the GNOME Power Profiles/KDE Battery-peak UI.
03Risk
!Warning: Not all laptops support thresholds: if the file does not exist, writing it is impossible and third-party hacks will not create it — check the ArchWiki vendor list first.
04Undo
Undo
$ echo 100 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold05Sources
- sysfs-class-power - kernel documentationEvidence: Documents charge_control_end_threshold and charge_stop_threshold files in /sys/class/power_supply/<battery>/, which limit the maximum charge level to reduce battery wear.
- Laptop - ArchWikiEvidence: The Battery section explains battery charge threshold support per vendor and how to write to /sys/class/power_supply/BAT*/charge_control_end_threshold or ThinkPad-specific start/stop threshold files.
Last verified: 2026-09-18 · Category: System & Settings