Config to hibernate when battery is critically low


I want to make my laptop hibernate when battery is critically low but can’t find the config for that.

1 Like


Maybe you could do the equivalent of this:



The stockholm repository has something similar to what you are looking for, it is a module which provides the means to trigger actions for different power levels (e.g. between 25% and 15% or below 15%):

This is how i use the module for my laptop:

If you do not want the full-fledge version then you can probably copy-paste the relevant parts into your config



Funny, just an hour ago I added code for that to my config.

But if your battery sends discharging events, you probably want a udev rule (as described in the arch wiki).

1 Like


Great to learn about these. Thank you all.

1 Like