hypridle: wait for lock surface before suspend

This commit is contained in:
rope 2026-08-16 13:05:39 +01:00
parent 80759ec50e
commit cf6b7a36a1

View file

@ -440,7 +440,11 @@ in
# inhibitor, but the loginctl → logind Lock signal → lock_cmd
# detour is async and the box can suspend unlocked. Lid close
# (HandleLidSwitch=suspend) goes through here too.
before_sleep_cmd = "qs ipc call lock lock";
# The sleep is not padding: `qs ipc call` returns once the
# handler sets locked=true, before the lock surface has
# committed a frame. Without it the box freezes mid-transition
# and the pre-lock frame flashes on resume.
before_sleep_cmd = "qs ipc call lock lock; sleep 1";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [