From cf6b7a36a13d39938321516ed030ad8e8560d9c7 Mon Sep 17 00:00:00 2001 From: rope Date: Sun, 16 Aug 2026 13:05:39 +0100 Subject: [PATCH] hypridle: wait for lock surface before suspend --- settings/hyprland.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 254b51d..d73970c 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -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 = [