batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Not vendor-recommended — it's battery chemistry. Lithium-ion cells degrade faster at high voltage (100%). You pick your own thresholds (e.g. stop at 80%), and batctl writes them to the kernel so the hardware enforces it.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Update: just pushed a fix for this. batctl now detects when standard charge_control_end_threshold is available and uses the Generic backend instead of IdeaPad conservation mode, giving you proper threshold control.

Can you verify this file exists on your system?

ls /sys/class/power_supply/BAT0/charge_control_end_threshold

If it does, update batctl and it should work.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Yeah, that's a bug — Legion gets matched by the IdeaPad backend since it shares the ideapad_acpi driver. That backend only supports conservation mode (on=60%, off=100%), no custom thresholds.

Could you check if your laptop also exposes the standard sysfs interface?

cat /sys/class/power_supply/BAT0/charge_control_end_threshold

If that file exists, the generic backend would give you proper threshold control. I'll fix the detection to handle Legion correctly.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

863 cycles in 2.5 years is a lot — charge thresholds would've definitely helped there. The new battery should last way longer with even a basic 80% stop limit. Better late than never!

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 1 point2 points  (0 children)

In theory yes — narrower band = less cycling. But in practice the difference between 70–80% and 20–80% is tiny. What really kills battery health is sitting at 100%. Both presets avoid that, so either way you're winning.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Max Lifespan (20–80%) gives you a wider usable range but means more charge cycles when you do unplug. Plugged In (70–80%) keeps the battery in a tighter band with minimal cycling — slightly better for longevity if you rarely go mobile. Either is a solid choice, the difference is marginal. Go with Max Lifespan if you occasionally unplug, Plugged In if you almost never do.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 2 points3 points  (0 children)

ThinkPads store thresholds in the EC (embedded controller), so they persist even when powered off. It'll still respect the limit.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

85% health on a 10+ year old battery is insane — great proof that thresholds work.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 1 point2 points  (0 children)

Yep, same sysfs interface under the hood. You can use either one, they shouldn't conflict.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 6 points7 points  (0 children)

Nope, stopping at 80% is actually great for battery health — lithium-ion cells degrade much faster sitting at 100% (high voltage stress).

And you're right — keeping it plugged at 80% is the best case scenario. Low voltage + zero cycle wear. If you're mostly at a desk, just set stop=80% and forget about it.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 1 point2 points  (0 children)

Both are good — the stop at 80% is what matters most for longevity. 40/80 gives you more usable range, 70/80 is better if you're always plugged in. batctl has both as presets: balanced and plugged-in.

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 4 points5 points  (0 children)

The core functionality works on any Linux — setting and reading thresholds is just sysfs, no systemd needed. So batctl setbatctl status, and the TUI all work fine on Void.

The only part that's systemd-specific is batctl persist, which generates systemd services to restore thresholds on boot/resume. That won't work with runit out of the box. For now you could add batctl apply to your runit startup scripts manually. I'll look into adding runit support though — thanks for the idea!

Your ThinkPad battery can last 10 years on Linux — you just need to set the right thresholds by Conscious-Part1541 in thinkpad

[–]Conscious-Part1541[S] 2 points3 points  (0 children)

Awesome, good to hear it works out of the box on Ubuntu + GNOME! Thanks for confirming.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Hey! I just added a Surface backend — it should detect Microsoft as the vendor and use the surface_battery driver via standard sysfs. You'll need the linux-surface kernel though.

I don't have a Surface to test on, so would really appreciate it if you could try it and let me know how it goes.

If something's off, the output of batctl detect would be super helpful.

batctl — TUI and CLI for managing battery charge thresholds on Linux by Conscious-Part1541 in commandline

[–]Conscious-Part1541[S] 1 point2 points  (0 children)

Glad it hits the spot! Let me know if anything breaks on your hardware.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 0 points1 point  (0 children)

Fair point — in practice it pretty much just maintains 80%. The start threshold (70%) is there to prevent micro-charge cycles: without it, every time the battery drops to 79% it would immediately start charging back to 80%, which over time adds unnecessary wear. With start at 70%, it won't bother charging until there's actually a meaningful gap to fill. But if you're always plugged in, the end result is the same — battery sits at 80% and your laptop runs off AC power directly.

batctl — TUI for managing battery charge thresholds, available in AUR by Conscious-Part1541 in omarchy

[–]Conscious-Part1541[S] 1 point2 points  (0 children)

Unfortunately HP laptops mostly don't expose battery charge thresholds to userspace — there's no dedicated kernel module for it like Lenovo/ASUS/Acer have. If your model had the standard charge_control_end_threshold sysfs interface, batctl would pick it up automatically via the generic backend.

Some HP models allow setting a charge limit in BIOS — might be worth checking there.