diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf index 16d1edf..9ee7d5e 100644 --- a/.config/hypr/hypridle.conf +++ b/.config/hypr/hypridle.conf @@ -46,3 +46,18 @@ listener { on-timeout = swaymsg "output * power off" 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 +}