feat(idle): suspend after 10 min of lid-open idle
The panel powered off at 330s but nothing ever suspended, so a lid-open idle laptop kept drawing 6-7W indefinitely; only lid *close* suspended (logind's default HandleLidSwitch). logind IdleAction stays Ignore on purpose -- it cannot run swaymsg/hyprlock hooks, hypridle's before_sleep_cmd can. Plain suspend, not suspend-then-hibernate: swap is zram-only.
This commit is contained in:
1 parent
77470bd03e
commit
8d93ac7e2f
1 file changed
+15
@@ -46,3 +46,18 @@ listener {
|
|||||||
on-timeout = swaymsg "output * power off"
|
on-timeout = swaymsg "output * power off"
|
||||||
on-resume = swaymsg "output * power on" && brightnessctl -r
|
on-resume = swaymsg "output * power on" && brightnessctl -r
|
||||||
}
|
}
|
||||||
|
# 10min -> s2idle. This listener used to be missing entirely: the panel powered
|
||||||
|
# off at 330s but the machine never suspended, so a lid-open idle laptop kept
|
||||||
|
# draining ~6-7W (10h battery) forever. Closing the lid did suspend, because
|
||||||
|
# logind's default HandleLidSwitch=suspend -- but only the lid path.
|
||||||
|
# logind's own IdleAction stays Ignore on purpose (it cannot run swaymsg/hyprlock
|
||||||
|
# pre-sleep hooks; hypridle's before_sleep_cmd can).
|
||||||
|
# 600s = long enough that a compile/syncthing burst usually finishes; a suspend
|
||||||
|
# mid-task is recoverable, and before_sleep_cmd locks on resume.
|
||||||
|
# Verified: polkit org.freedesktop.login1.suspend allow_active=yes, so this
|
||||||
|
# needs no auth prompt from an active local session. Plain suspend (not
|
||||||
|
# suspend-then-hibernate) because swap is zram-only -> hibernate impossible.
|
||||||
|
listener {
|
||||||
|
timeout = 600 # 10min -> suspend
|
||||||
|
on-timeout = systemctl suspend
|
||||||
|
}
|
||||||
Reference in new issue
Block a user