mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.9K
active users

David Bremner

Dear

I run a "minimal" system based on , but I'd like my laptop to suspend or shutdown when the battery power gets too low, to avoid running the battery right to zero. What is a reasonable to do this? seems like it might be part of the answer, but it seems like it is mainly glue to provide non-root users the ability to suspend etc...

@bremner i have a similar need. i don't really need the laptop to suspend or shutdown when the laptop is online, typically i'm at the desk and will notice it's about to run out.... what I want is something that *wakes up* while in suspend to do an orderly shutdown instead of just zapping out of existence when running out of power in suspend

@bremner I'm using fdpowermon (and my config is partially in the package as an example, or available on request :))

@bremner previously did this in `/etc/udev/rules.d/99-lowbat.rules`

```
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/bin/systemctl hibernate"
```

Which would hibernate whenever the battery level was 5% or less