power: suspend-then-hibernate on external power too

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sergei Poljanski 2026-10-03 21:35:52 +04:00
commit 0223e1a6c5
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -30,10 +30,12 @@
# HibernateDelaySec). Previously this looped suspend->wake->suspend due
# to ACPI EC interrupts, but acpi.ec_no_wakeup=1 (above) plus disabling
# gsd-power's sleep handlers (in desktop.nix via dconf) makes it stable.
# On AC, plain suspend (s2idle) is fine.
# On AC too: plain suspend let a spurious-wake loop run unbounded for 1.5
# days (logind re-suspends every 30s while the lid is closed); with
# suspend-then-hibernate it ends in hibernate after HibernateDelaySec.
services.logind.settings.Login = {
HandleLidSwitch = "suspend-then-hibernate";
HandleLidSwitchExternalPower = "suspend";
HandleLidSwitchExternalPower = "suspend-then-hibernate";
HandleSuspendKey = "suspend-then-hibernate";
HandlePowerKey = "hibernate";
IdleAction = "suspend-then-hibernate";