LMGTFY:
Read what @Uncle_Vova and @mrtsolar have to say, and if you’re curious, @Honza’s link.
I’m also very interested in that topic, but so far I only protect against gooing too low by letting my KDE/Plasma warn me at 20% instead of the default 10%.
I did not yet play with /sys/class/power_supply/BAT0/* and try to limit voltage, but I think it’s possible.
It should be noted that percentage is a vague concept when it comes to charging levels. 100% percent is what the manufacturer or the driver author defines it to be. Or yourself. After limiting it, I guess 80% is the new 100%. What one wants to limit is the voltage.
Ultimately, what I’d like to see is to be able to define power profiles like
- Stationary (40% - 60%)
- Mobile (20% - 80%)
- Endurance (10% - 90%)
- Damn_I_Need_Power_Badly (5% - 100%)

and then conveniently switch between them via the battery icon in my favourite desktop environment. ![]()
Little, but somewhat related: