From 0b9eb533ab6a8685b090dcc61bcaebc3a51ae75c Mon Sep 17 00:00:00 2001 From: Lef Date: Wed, 18 Nov 2026 10:42:44 +0200 Subject: [PATCH 1/5] omamobile-omarchy 0.1.49: idle re-arms its monitor when the timeout changes, so a new lock time works without a shell restart A lock or screensaver timeout changed while the shell runs never fired: the main IdleMonitor never reported idle again until a restart. Patch 0032 (both series) switches the monitor off for 50 ms when firstIdleTimeoutSeconds changes. On a Pixel 8 Pro (Omarchy 4.0.6, quickshell 0.3.2.r7, Hyprland 0.57) the unpatched shell never went idle in 100 s after a change to 30 s; patched, it locked 31 s after the change. --- ...the-monitor-when-the-timeout-changes.patch | 40 +++++++++++++++++++ ...the-monitor-when-the-timeout-changes.patch | 40 +++++++++++++++++++ .../omamobile-omarchy/test/source-family.py | 11 ++++- packages/omamobile-omarchy/version | 2 +- 4 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch create mode 100644 packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch diff --git a/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch new file mode 100644 index 000000000..96225fabf --- /dev/null +++ b/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -0,0 +1,40 @@ +# Idle: re-arm the main idle monitor when its timeout changes. A lock or +# screensaver timeout changed while the shell runs never fired: the live +# IdleMonitor took the new timeout but never reported idle again until a +# shell restart (Pixel 8 Pro, Omarchy 4.0.6, quickshell 0.3.2.r7, Hyprland +# 0.57: untouched for 100 s after a change to 30 s, no lock). Switching the +# monitor off for 50 ms when firstIdleTimeoutSeconds changes starts it again; +# with this the phone locked 31 s after the change. +# handleIdleChanged() ignores the off/on flip, so the re-arm neither +# cancels a running idle cycle nor wakes a locked display. +# +# Refreshed against Omarchy 4.0.6 with 0007 and 0013 applied. + +--- i/shell/plugins/services/idle/Service.qml ++++ w/shell/plugins/services/idle/Service.qml +@@ -190,6 +190,8 @@ + function handleIdleChanged() { + logEvent("idle-monitor", idleMonitor.isIdle ? "idle" : "active") + if (!root.idleEnabled || !root.idleTimersEnabled) return ++ // The 50 ms re-arm below flips isIdle; it is not user activity. ++ if (root.idleRearming) return + + if (idleMonitor.isIdle) startIdleCycle() + else handleActiveSignal() +@@ -294,9 +296,15 @@ + } + } + ++ // A new timeout on a live monitor never fires (seen on the Pixel 8 Pro, ++ // quickshell 0.3.2): switch the monitor off and on so it starts again. ++ property bool idleRearming: false ++ onFirstIdleTimeoutSecondsChanged: { idleRearming = true; idleRearmTimer.restart() } ++ Timer { id: idleRearmTimer; interval: 50; repeat: false; onTriggered: root.idleRearming = false } ++ + IdleMonitor { + id: idleMonitor +- enabled: root.idleEnabled && root.idleTimersEnabled ++ enabled: root.idleEnabled && root.idleTimersEnabled && !root.idleRearming + timeout: Math.max(1, root.firstIdleTimeoutSeconds) + respectInhibitors: true + onIsIdleChanged: root.handleIdleChanged() diff --git a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch new file mode 100644 index 000000000..7bd6dd882 --- /dev/null +++ b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -0,0 +1,40 @@ +# Idle: re-arm the main idle monitor when its timeout changes. A lock or +# screensaver timeout changed while the shell runs never fired: the live +# IdleMonitor took the new timeout but never reported idle again until a +# shell restart (Pixel 8 Pro, Omarchy 4.0.6, quickshell 0.3.2.r7, Hyprland +# 0.57: untouched for 100 s after a change to 30 s, no lock). Switching the +# monitor off for 50 ms when firstIdleTimeoutSeconds changes starts it again; +# with this the phone locked 31 s after the change. +# handleIdleChanged() ignores the off/on flip, so the re-arm neither +# cancels a running idle cycle nor wakes a locked display. +# +# Omarchy 4.5: same hunk, one line of offset. + +--- i/shell/plugins/services/idle/Service.qml ++++ w/shell/plugins/services/idle/Service.qml +@@ -191,6 +191,8 @@ + function handleIdleChanged() { + logEvent("idle-monitor", idleMonitor.isIdle ? "idle" : "active") + if (!root.idleEnabled || !root.idleTimersEnabled) return ++ // The 50 ms re-arm below flips isIdle; it is not user activity. ++ if (root.idleRearming) return + + if (idleMonitor.isIdle) startIdleCycle() + else handleActiveSignal() +@@ -295,9 +297,15 @@ + } + } + ++ // A new timeout on a live monitor never fires (seen on the Pixel 8 Pro, ++ // quickshell 0.3.2): switch the monitor off and on so it starts again. ++ property bool idleRearming: false ++ onFirstIdleTimeoutSecondsChanged: { idleRearming = true; idleRearmTimer.restart() } ++ Timer { id: idleRearmTimer; interval: 50; repeat: false; onTriggered: root.idleRearming = false } ++ + IdleMonitor { + id: idleMonitor +- enabled: root.idleEnabled && root.idleTimersEnabled ++ enabled: root.idleEnabled && root.idleTimersEnabled && !root.idleRearming + timeout: Math.max(1, root.firstIdleTimeoutSeconds) + respectInhibitors: true + onIsIdleChanged: root.handleIdleChanged() diff --git a/packages/omamobile-omarchy/test/source-family.py b/packages/omamobile-omarchy/test/source-family.py index c2a881b3a..09a496da3 100644 --- a/packages/omamobile-omarchy/test/source-family.py +++ b/packages/omamobile-omarchy/test/source-family.py @@ -17,5 +17,14 @@ else: raise AssertionError('unsupported source family accepted') -assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 29 +# Pinned, not counted (L-637): a new legacy fix adds a name here instead of +# breaking a literal count that every other PR also bumps. +legacy = {p.name[:4] for p in (package / 'legacy-4.0.6').glob('0*.patch')} +retained = {'0001', '0003', '0005', '0006', '0007', '0008', '0009', '0010', + '0011', '0012', '0013', '0014', '0015', '0016', '0017', '0018', + '0019', '0020', '0021', '0022', '0023', '0024', '0025', '0026', + '0027', '0028', '0029', '0030'} +missing = retained - legacy +assert not missing, 'legacy archive lost %s' % sorted(missing) +assert (package / 'legacy-4.0.6/bridge-4.0.4-menu-first-frame.patch').is_file() print('PASS: actual selector rejects unsupported families; legacy archive retained') diff --git a/packages/omamobile-omarchy/version b/packages/omamobile-omarchy/version index 5946febf1..352e98e2f 100644 --- a/packages/omamobile-omarchy/version +++ b/packages/omamobile-omarchy/version @@ -1 +1 @@ -0.1.48 +0.1.49 From c20241d294300da60472bc1396a63a31ffbea19d Mon Sep 17 00:00:00 2001 From: Lef Date: Wed, 18 Nov 2026 18:29:58 +0200 Subject: [PATCH 2/5] omamobile-omarchy: the idle re-arm lives in patches/ only, not in the 4.0.6 legacy copy legacy-4.0.6/ only carries what a phone needs to get through the update to 4.5. --- ...the-monitor-when-the-timeout-changes.patch | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch diff --git a/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch deleted file mode 100644 index 96225fabf..000000000 --- a/packages/omamobile-omarchy/legacy-4.0.6/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch +++ /dev/null @@ -1,40 +0,0 @@ -# Idle: re-arm the main idle monitor when its timeout changes. A lock or -# screensaver timeout changed while the shell runs never fired: the live -# IdleMonitor took the new timeout but never reported idle again until a -# shell restart (Pixel 8 Pro, Omarchy 4.0.6, quickshell 0.3.2.r7, Hyprland -# 0.57: untouched for 100 s after a change to 30 s, no lock). Switching the -# monitor off for 50 ms when firstIdleTimeoutSeconds changes starts it again; -# with this the phone locked 31 s after the change. -# handleIdleChanged() ignores the off/on flip, so the re-arm neither -# cancels a running idle cycle nor wakes a locked display. -# -# Refreshed against Omarchy 4.0.6 with 0007 and 0013 applied. - ---- i/shell/plugins/services/idle/Service.qml -+++ w/shell/plugins/services/idle/Service.qml -@@ -190,6 +190,8 @@ - function handleIdleChanged() { - logEvent("idle-monitor", idleMonitor.isIdle ? "idle" : "active") - if (!root.idleEnabled || !root.idleTimersEnabled) return -+ // The 50 ms re-arm below flips isIdle; it is not user activity. -+ if (root.idleRearming) return - - if (idleMonitor.isIdle) startIdleCycle() - else handleActiveSignal() -@@ -294,9 +296,15 @@ - } - } - -+ // A new timeout on a live monitor never fires (seen on the Pixel 8 Pro, -+ // quickshell 0.3.2): switch the monitor off and on so it starts again. -+ property bool idleRearming: false -+ onFirstIdleTimeoutSecondsChanged: { idleRearming = true; idleRearmTimer.restart() } -+ Timer { id: idleRearmTimer; interval: 50; repeat: false; onTriggered: root.idleRearming = false } -+ - IdleMonitor { - id: idleMonitor -- enabled: root.idleEnabled && root.idleTimersEnabled -+ enabled: root.idleEnabled && root.idleTimersEnabled && !root.idleRearming - timeout: Math.max(1, root.firstIdleTimeoutSeconds) - respectInhibitors: true - onIsIdleChanged: root.handleIdleChanged() From 141db40f4619316e19ec68410ce679ea33fbeabc Mon Sep 17 00:00:00 2001 From: Lef Date: Wed, 18 Nov 2026 19:20:13 +0200 Subject: [PATCH 3/5] omamobile-omarchy: the idle re-arm patch says where the bug is (Quickshell's idle_notify pointer) --- ...-arm-the-monitor-when-the-timeout-changes.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch index 7bd6dd882..5ffeff2dc 100644 --- a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch +++ b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -8,6 +8,20 @@ # handleIdleChanged() ignores the off/on flip, so the re-arm neither # cancels a running idle cycle nor wakes a locked display. # +# The bug is in Quickshell, not here (0.3.2.r7.g2b4501a, src/wayland/ +# idle_notify/monitor.cpp): on a timeout change updateNotification() deletes +# the old notification, creates the new one, and only then assigns the +# pointer isIdle is bound to. The new object lands at the old address, so +# the pointer "did not change" and isIdle stays bound to the destroyed one. +# Seen on the 8 Pro with Omarchy 4.5.0-3 and +# QT_LOGGING_RULES=quickshell.wayland.idle_notify.debug=true: Destroyed and +# Created at the same 0xffff5a365070, "has been marked idle", while +# `omarchy-shell idle status` kept "idle":false and nothing locked in 67 s. +# With this patch the new one came at another address and the phone locked +# 30 s after the change. Turning enabled off and on sends the pointer +# through null. Drop this once a Quickshell that clears the pointer before +# creating the new notification is on the phones. +# # Omarchy 4.5: same hunk, one line of offset. --- i/shell/plugins/services/idle/Service.qml From cadbc90927f028fa733de53d299815f2043079bd Mon Sep 17 00:00:00 2001 From: Lef Date: Wed, 18 Nov 2026 19:23:15 +0200 Subject: [PATCH 4/5] omamobile-omarchy: the idle re-arm patch links the upstream Quickshell report and fix --- ...32-idle-re-arm-the-monitor-when-the-timeout-changes.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch index 5ffeff2dc..3e4326e02 100644 --- a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch +++ b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -20,7 +20,10 @@ # With this patch the new one came at another address and the phone locked # 30 s after the change. Turning enabled off and on sends the pointer # through null. Drop this once a Quickshell that clears the pointer before -# creating the new notification is on the phones. +# creating the new notification is on the phones: reported upstream as +# https://github.com/quickshell-mirror/quickshell/issues/938 and /1309, with +# an open fix in https://github.com/quickshell-mirror/quickshell/pull/1097 +# (bNotification = nullptr before the delete). # # Omarchy 4.5: same hunk, one line of offset. From bffed4125487b901f8b7afcd27b94ac601f153c1 Mon Sep 17 00:00:00 2001 From: Lef Date: Wed, 18 Nov 2026 20:37:46 +0200 Subject: [PATCH 5/5] omamobile-omarchy: drop the idle re-arm header's line left from the 4.0.6 copy --- .../0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch index 3e4326e02..74fcc2a07 100644 --- a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch +++ b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -24,8 +24,6 @@ # https://github.com/quickshell-mirror/quickshell/issues/938 and /1309, with # an open fix in https://github.com/quickshell-mirror/quickshell/pull/1097 # (bNotification = nullptr before the delete). -# -# Omarchy 4.5: same hunk, one line of offset. --- i/shell/plugins/services/idle/Service.qml +++ w/shell/plugins/services/idle/Service.qml