From 7e9bf498ff3e043e19af869b124fdf35571d4083 Mon Sep 17 00:00:00 2001 From: Jeena Date: Wed, 19 Aug 2026 14:30:09 +0900 Subject: [PATCH] fix: remove dim step that leaks orphaned layer surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dim creates a wlr-layer-shell surface that Hyprland never cleans up when the process exits — leaves an opaque full-screen overlay (pid=-1) covering the entire display until the layer tree is rebuilt. Removing step 1 (dim) from hypridle prevents future occurrences. unstick-display.sh now restarts waybar to force a layer tree rebuild as a recovery measure. --- hypr/hypridle.conf | 11 +---------- hypr/scripts/unstick-display.sh | 4 ++++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 334d8b2..b452eab 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -8,16 +8,7 @@ general { after_sleep_cmd = hyprctl dispatch dpms off && sleep 1 && hyprctl dispatch dpms on } -# Step 1: Dim monitor at 115 sec idle (warning that it will lock soon) -listener { - timeout = 115 - # Only dims the screen, does not lock yet - # This shows you that lock will happen soon - on-timeout = dim - on-resume = pkill -x dim -} - -# Step 2: Lock screen at 2 min idle +# Step 1: Lock screen at 2 min idle listener { timeout = 120 on-timeout = ~/.config/hypr/scripts/lock.sh diff --git a/hypr/scripts/unstick-display.sh b/hypr/scripts/unstick-display.sh index 68438f8..07572ae 100755 --- a/hypr/scripts/unstick-display.sh +++ b/hypr/scripts/unstick-display.sh @@ -28,4 +28,8 @@ hyprctl dispatch dpms off sleep 1 hyprctl dispatch dpms on +# Force a layer tree rebuild to clear orphaned surfaces (e.g. dim_layer) +pkill -x waybar 2>/dev/null +hyprctl dispatch exec waybar 2>/dev/null + echo "Done. Switch back to Hyprland (Ctrl+Alt+F2)."