From 426b9372be36a1fbde94e05a6c610f4009e40f5b Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 21 Aug 2026 13:31:57 +0200 Subject: [PATCH] Opt in to preempting a weaker gatelock holder gatelock just made preempt_weaker_holder opt-in (it defaulted to True, which let wake_alarm evict this armed lock). screen_locker is the app that actually needs it: on 2026-08-21 diet_guard held the global grab from 07:04 to 09:07+ while this locker retried against it, which is the contention behind the reported lockout. Production only -- demo mode uses a local grab and never contends. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_018M5gKyYzxWG6QkCaj1wWfk --- screen_locker/screen_lock.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/screen_locker/screen_lock.py b/screen_locker/screen_lock.py index 41558f6..f89f5df 100755 --- a/screen_locker/screen_lock.py +++ b/screen_locker/screen_lock.py @@ -156,6 +156,12 @@ class ScreenLocker( mode="hard", grab="local" if demo_mode else "global", disable_vt=not demo_mode, + # Opt in: a weaker holder (diet_guard, leetcode_guard) that already + # owns the grab must stand down rather than block enforcement + # forever -- the 2026-08-21 lockout was diet_guard holding it for + # hours. Safe in this direction only; gatelock never signals a + # holder that outranks us, so wake_alarm can still take the screen. + preempt_weaker_holder=not demo_mode, ) # Built before setup(), which calls build_surface per live output. self.container = FrameGroup([])