I just installed new battery to an old laptop running pretty bare-bones endeavourOS and herbstluftwm (+ lxsession to cover the need for a polkit agent). The battery manufacturer recommends fully charging and discharging the battery a few times after installing it. The question is how do I get the system to shut down safely when the battery’s about to die?
I’m guessing this will involve a systemd hook or something, but I haven’t been able to find anything that’s not DE-specific. Please feel free to just point me to a wiki page or whatever.
Even when using a Li-Ion battery, the manufacturer recommends that you sometimes discharge the battery to reset the controller.
I do this about once a year, leaving the laptop running on battery power on the BIOS screen.
I haven’t fully discharged (i.e. on purpose! ) a Li-Ion battery ever, and they all have been working well. Instructions that I’ve heard (I’m no battery expert myself) are to keep a Li-Ion battery mostly between 50%-80% of charge. Also they’ve said that do not discharge fully.
NiMH batteries have been a different story.
Also I’ve kept the Li-Ion batteries fully disconnected from the laptops always when possible.
Thanks, that works great as a solution to the immediate problem, but is there a way to tell the system to shut down when the battery hits a certain point?
Thanks. My issue was finding a DE-less solution, but the archwiki pointed me to powerkit, which seems to be exactly what I needed. It’s DE-independent and, among other things, it lets you specify a percentage at which to shut down (or hibernate or whatever).