From a9d997884b487ebb842a1d05d21df3c209fbade0 Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 26 Sep 2026 20:28:23 +1000 Subject: [PATCH 1/3] Keep the lock lit for a while after it is woken After a lid-open wake the unlock screen lit and went dark again five seconds later with no input, the same run-up the lock takes when it is first locked. The user has just opened the lid to look at it. A wake from a blank panel or from suspend now keeps the lock lit for 30 seconds. Input re-arms the usual five seconds but never cuts a longer run-up short, so the panel goes dark 30 seconds after the wake or five seconds after the last input, whichever is later. The resume watch starts its clock with the lock, so a suspend within a second of locking (sleep-lock) is still seen. --- shell/plugins/lock/Service.qml | 28 ++++-- test/shell.d/lock-lit-after-wake-test.sh | 112 +++++++++++++++++++++++ test/shell.d/lock-wake-key-test.sh | 2 +- test/shell.d/video-background-test.sh | 4 +- 4 files changed, 135 insertions(+), 11 deletions(-) create mode 100755 test/shell.d/lock-lit-after-wake-test.sh diff --git a/shell/plugins/lock/Service.qml b/shell/plugins/lock/Service.qml index 1005510ad987..e7d97df3402f 100644 --- a/shell/plugins/lock/Service.qml +++ b/shell/plugins/lock/Service.qml @@ -32,6 +32,11 @@ Item { property string lastEvent: "init" property string lastEventAt: "" property bool displaysBlank: false + // A lock that is not touched goes dark after blankRunUp. One that was just + // woken, from a blank panel or from suspend, stays lit for wakeRunUp first: + // the user is looking at it. + readonly property int blankRunUp: 5000 + readonly property int wakeRunUp: 30000 // displaysBlank tracks what the lock asked for; Hyprland reports what each // panel actually did. While a video is on show the two are reconciled, so a // blank that failed keeps playing and a panel woken behind the lock's back @@ -172,16 +177,22 @@ Item { runWake() } - function armBlankTimer() { - idleBlankTimer.armedAt = Date.now() + // Input re-arms the short run-up but never cuts a longer one short. + function armBlankTimer(runUp) { + var interval = runUp || blankRunUp + var now = Date.now() + if (idleBlankTimer.running && idleBlankTimer.armedAt + idleBlankTimer.interval - now > interval) return + idleBlankTimer.interval = interval + idleBlankTimer.armedAt = now idleBlankTimer.restart() } - function runWake() { + function runWake(runUp) { + var fromBlank = root.displaysBlank root.displaysBlank = false root.monitorDpmsKnown = false if (!wakeProcess.running) wakeProcess.running = true - if (lockRequested) armBlankTimer() + if (lockRequested) armBlankTimer(runUp || (fromBlank ? wakeRunUp : blankRunUp)) } function runBlank() { @@ -524,7 +535,7 @@ Item { Timer { id: idleBlankTimer - interval: 5000 + interval: root.blankRunUp repeat: false property double armedAt: 0 onTriggered: { @@ -532,7 +543,7 @@ Item { // blank the freshly woken unlock screen under the user. Wall-clock time // exposes the gap: take a fresh run-up instead of blanking. if (Date.now() - armedAt > interval + 2000) { - root.armBlankTimer() + root.armBlankTimer(root.wakeRunUp) return } // Only a password check in flight should hold the display up. The @@ -550,15 +561,16 @@ Item { interval: 1000 repeat: true running: root.lockRequested + // Start the clock with the lock: sleep-lock suspends within a second of it. property double lastTick: 0 - onRunningChanged: lastTick = 0 + onRunningChanged: lastTick = running ? Date.now() : 0 onTriggered: { var now = Date.now() var resumed = lastTick > 0 && now - lastTick > interval + 2000 lastTick = now if (resumed) { root.logEvent("resume-detected") - root.runWake() + root.runWake(root.wakeRunUp) } } } diff --git a/test/shell.d/lock-lit-after-wake-test.sh b/test/shell.d/lock-lit-after-wake-test.sh new file mode 100755 index 000000000000..ca495966222c --- /dev/null +++ b/test/shell.d/lock-lit-after-wake-test.sh @@ -0,0 +1,112 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +run_node_test <<'JS' +const fs = require('fs') +const service = fs.readFileSync(path.join(root, 'shell/plugins/lock/Service.qml'), 'utf8') + +function extract(name) { + const match = service.match(new RegExp(`\\n function ${name}\\([^)]*\\) \\{[\\s\\S]*?\\n \\}\\n`)) + if (!match) fail(`Service.qml defines ${name}`) + return match[0] +} + +function runUp(name) { + const match = service.match(new RegExp(`readonly property int ${name}: (\\d+)`)) + if (!match) fail(`Service.qml defines ${name}`) + return Number(match[1]) +} + +const blankRunUp = runUp('blankRunUp') +const wakeRunUp = runUp('wakeRunUp') +assert(blankRunUp === 5000, 'an untouched lock still goes dark after five seconds') +assert(wakeRunUp >= 30000, 'a woken lock stays lit for at least thirty seconds') + +// Run the service's own timer bookkeeping against a stand-in for the lock root +// and a clock the test moves by hand. +function makeLock() { + const clock = { now: 1000000 } + const timer = { + running: false, + interval: blankRunUp, + armedAt: 0, + restart() { this.running = true }, + // When the countdown would fire, or 0 if it is not running. + dueAt() { return this.running ? this.armedAt + this.interval : 0 } + } + const state = { + Date: { now: () => clock.now }, + displaysBlank: false, + monitorDpmsKnown: false, + lockRequested: true, + blankRunUp, + wakeRunUp, + wakeProcess: { running: false }, + idleBlankTimer: timer + } + state.root = state + const fns = new Function('state', `with (state) { + ${extract('armBlankTimer')} + ${extract('runWake')} + return { armBlankTimer, runWake } + }`)(state) + return { + state, timer, clock, ...fns, + after(ms) { clock.now += ms }, + blank() { timer.running = false; state.displaysBlank = true } + } +} + +let lock = makeLock() +lock.armBlankTimer() +assert(lock.timer.dueAt() === lock.clock.now + blankRunUp, 'taking the lock arms the short run-up') + +lock.blank() +lock.after(60000) +lock.runWake() +assert(lock.timer.dueAt() === lock.clock.now + wakeRunUp, 'the key that wakes a blank panel keeps it lit for the wake run-up') +const wokeAt = lock.clock.now + +lock.after(10000) +lock.runWake() +assert(lock.timer.dueAt() === wokeAt + wakeRunUp, 'input soon after a wake does not cut the wake run-up short') + +lock.after(wakeRunUp - 10000 - 2000) +lock.runWake() +assert(lock.timer.dueAt() === lock.clock.now + blankRunUp, 'input near the end of the wake run-up re-arms the normal run-up') + +lock = makeLock() +lock.armBlankTimer() +lock.runWake() +assert(lock.timer.dueAt() === lock.clock.now + blankRunUp, 'input at a lit lock keeps the normal run-up') + +// Suspend froze the countdown: it still looks armed, but its wall-clock time has passed. +lock = makeLock() +lock.armBlankTimer() +lock.after(3600000) +lock.runWake(wakeRunUp) +assert(lock.timer.dueAt() === lock.clock.now + wakeRunUp, 'a resume re-arms the wake run-up over a countdown frozen by suspend') + +lock = makeLock() +lock.state.lockRequested = false +lock.runWake() +assert(!lock.timer.running, 'waking after unlock does not arm a blank') + +assert( + /id: resumeWatchTimer[\s\S]*?onRunningChanged: lastTick = running \? Date\.now\(\) : 0/.test(service), + 'a suspend within a second of locking is still seen as a resume' +) + +assert( + /id: resumeWatchTimer[\s\S]*?if \(resumed\) \{[\s\S]*?root\.runWake\(root\.wakeRunUp\)/.test(service), + 'a resume wakes the lock with the wake run-up' +) + +assert( + /id: idleBlankTimer[\s\S]*?if \(Date\.now\(\) - armedAt > interval \+ 2000\) \{\s*root\.armBlankTimer\(root\.wakeRunUp\)/.test(service), + 'a blank countdown frozen by suspend takes the wake run-up instead of blanking' +) +JS diff --git a/test/shell.d/lock-wake-key-test.sh b/test/shell.d/lock-wake-key-test.sh index d1aff6e3f3ff..ecde90d7a964 100755 --- a/test/shell.d/lock-wake-key-test.sh +++ b/test/shell.d/lock-wake-key-test.sh @@ -17,7 +17,7 @@ assert( const service = fs.readFileSync(path.join(root, 'shell/plugins/lock/Service.qml'), 'utf8') assert( - /id: resumeWatchTimer[\s\S]*?running: root\.lockRequested[\s\S]*?now - lastTick > interval \+ 2000[\s\S]*?if \(resumed\) \{[\s\S]*?root\.runWake\(\)/.test(service), + /id: resumeWatchTimer[\s\S]*?running: root\.lockRequested[\s\S]*?now - lastTick > interval \+ 2000[\s\S]*?if \(resumed\) \{[\s\S]*?root\.runWake\(root\.wakeRunUp\)/.test(service), 'a resume clears the blank state, so the first key at a lit lock is typed' ) diff --git a/test/shell.d/video-background-test.sh b/test/shell.d/video-background-test.sh index b074c5f932a1..7dd634ef9c19 100755 --- a/test/shell.d/video-background-test.sh +++ b/test/shell.d/video-background-test.sh @@ -159,7 +159,7 @@ assert( lockService.includes('command: ["hyprctl", "monitors", "-j"]') && lockService.includes('running: root.locked && root.videoBackground') && /displaysBlank: root\.screenBlank\(lockSurface\.screen/.test(lockService) && - /function runWake\(\) \{[\s\S]*?root\.monitorDpmsKnown = false/.test(lockService) && + /function runWake\([^)]*\) \{[\s\S]*?root\.monitorDpmsKnown = false/.test(lockService) && /function runBlank\(\) \{[\s\S]*?root\.monitorDpmsKnown = false/.test(lockService), 'a locked video wallpaper follows what each panel actually did, not only what the lock asked for' ) @@ -169,7 +169,7 @@ assert( /displaysBlank: root\.screenBlank\(/.test(lockService) && /powerSaverActive: root\.powerSaverActive/.test(lockService) && /function runBlank\(\) \{\s*\n\s*root\.displaysBlank = true/.test(lockService) && - /function runWake\(\) \{\s*\n\s*root\.displaysBlank = false/.test(lockService), + /function runWake\([^)]*\) \{[\s\S]*?root\.displaysBlank = false/.test(lockService), 'the lock screen stops playback once displays go dark or power-saver is active' ) assert( From 3b4ddd791cb6471a02e6402db664dfb00dc9c08b Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sun, 27 Sep 2026 10:48:59 +1000 Subject: [PATCH 2/3] Give a wake the lock never saw the same lit run-up The power button is a locked Hyprland bind, so pressing it at a blank lock lights the panels without any key reaching the lock. The lock kept thinking it was blank and never armed a run-up for that wake. While the lock is blank it now polls Hyprland's DPMS state, as it already did for a video wallpaper. Every enabled panel lit means something woke them, so the lock wakes with the 30 second run-up. Answers asked for before a blank or wake finished are dropped, and a panel coming back mid-blank is left to the screen-change settle. --- shell/plugins/lock/Service.qml | 35 ++++++++++-- test/shell.d/lock-lit-after-wake-test.sh | 73 +++++++++++++++++++++++- test/shell.d/video-background-test.sh | 4 +- 3 files changed, 103 insertions(+), 9 deletions(-) diff --git a/shell/plugins/lock/Service.qml b/shell/plugins/lock/Service.qml index e7d97df3402f..383f52276448 100644 --- a/shell/plugins/lock/Service.qml +++ b/shell/plugins/lock/Service.qml @@ -43,6 +43,9 @@ Item { // (a resume that kept the same outputs) resumes instead of freezing. property var monitorDpms: ({}) property bool monitorDpmsKnown: false + // Bumped by every wake and blank, so a DPMS answer asked for before one of + // them is dropped instead of undoing it. + property int dpmsEpoch: 0 // Hyprland lights every panel for a key when any one is dark, so the key that // does it is a wake key whichever panel's lock surface holds keyboard focus. readonly property bool anyDisplayBlank: displaysBlank && (!monitorDpmsKnown || anyMonitorDark(monitorDpms)) @@ -189,6 +192,7 @@ Item { function runWake(runUp) { var fromBlank = root.displaysBlank + root.dpmsEpoch += 1 root.displaysBlank = false root.monitorDpmsKnown = false if (!wakeProcess.running) wakeProcess.running = true @@ -196,6 +200,7 @@ Item { } function runBlank() { + root.dpmsEpoch += 1 root.displaysBlank = true root.monitorDpmsKnown = false if (!blankProcess.running) blankProcess.running = true @@ -233,6 +238,21 @@ Item { return true } + // Hyprland lights the panels for input that never reaches the lock: the power + // button is a locked bind, and a lid can come back without a suspend. Every + // enabled panel lit while the lock thinks it is blank is such a wake, and gets + // the same run-up as a key. + function takeMonitorDpms(text, epoch) { + if (epoch !== dpmsEpoch || blankProcess.running) return + // A panel coming back mid-blank is the screen-change settle's to judge. + if (screenDpmsSettleTimer.running || screenDpmsProcess.running) return + if (!applyMonitorDpms(text)) return + if (!displaysBlank || !lockRequested) return + if (Object.keys(monitorDpms).length === 0 || anyMonitorDark(monitorDpms)) return + logEvent("woken-behind-lock") + runWake(wakeRunUp) + } + // Give up the blank state only once no panel is dark. An answer that cannot be // read gives it up too, as a panel coming back always did. function settleScreenDpms(text) { @@ -483,16 +503,19 @@ Item { Process { id: blankProcess command: ["bash", "-c", "omarchy-brightness-keyboard off; omarchy-brightness-display off"] + onExited: root.dpmsEpoch += 1 } // Quickshell exposes no DPMS signal, so the panel state is polled while a - // video is the locked wallpaper. A wake or blank request drops the last - // answer, so its optimistic state applies until the next poll confirms it. + // video is the locked wallpaper, and while the lock is blank to notice a wake + // it did not see. A wake or blank request drops the last answer, so its + // optimistic state applies until the next poll confirms it. Process { id: monitorDpmsProcess + property int epoch: 0 command: ["hyprctl", "monitors", "-j"] stdout: StdioCollector { - onStreamFinished: root.applyMonitorDpms(text) + onStreamFinished: root.takeMonitorDpms(text, monitorDpmsProcess.epoch) } } @@ -501,9 +524,11 @@ Item { interval: 3000 repeat: true triggeredOnStart: true - running: root.locked && root.videoBackground + running: root.locked && (root.videoBackground || root.displaysBlank) onTriggered: { - if (!monitorDpmsProcess.running) monitorDpmsProcess.running = true + if (monitorDpmsProcess.running || blankProcess.running) return + monitorDpmsProcess.epoch = root.dpmsEpoch + monitorDpmsProcess.running = true } onRunningChanged: { if (!running) root.monitorDpmsKnown = false diff --git a/test/shell.d/lock-lit-after-wake-test.sh b/test/shell.d/lock-lit-after-wake-test.sh index ca495966222c..fc784ac9167e 100755 --- a/test/shell.d/lock-lit-after-wake-test.sh +++ b/test/shell.d/lock-lit-after-wake-test.sh @@ -39,6 +39,13 @@ function makeLock() { } const state = { Date: { now: () => clock.now }, + dpmsEpoch: 0, + monitorDpms: {}, + blankProcess: { running: false }, + screenDpmsSettleTimer: { running: false }, + screenDpmsProcess: { running: false }, + events: [], + logEvent(event) { this.events.push(event) }, displaysBlank: false, monitorDpmsKnown: false, lockRequested: true, @@ -51,12 +58,19 @@ function makeLock() { const fns = new Function('state', `with (state) { ${extract('armBlankTimer')} ${extract('runWake')} - return { armBlankTimer, runWake } + ${extract('anyMonitorDark')} + ${extract('applyMonitorDpms')} + ${extract('takeMonitorDpms')} + return { armBlankTimer, runWake, takeMonitorDpms } }`)(state) return { state, timer, clock, ...fns, after(ms) { clock.now += ms }, - blank() { timer.running = false; state.displaysBlank = true } + blank() { timer.running = false; state.displaysBlank = true; state.dpmsEpoch += 2 }, + // A poll asked for now, answered with these panels. + poll(panels, epoch = state.dpmsEpoch) { + fns.takeMonitorDpms(JSON.stringify(panels.map(([name, dpmsStatus]) => ({ name, dpmsStatus, disabled: false }))), epoch) + } } } @@ -95,6 +109,61 @@ lock.state.lockRequested = false lock.runWake() assert(!lock.timer.running, 'waking after unlock does not arm a blank') +// The power button is a locked Hyprland bind: it lights the panels and the lock never sees a key. +lock = makeLock() +lock.blank() +lock.after(60000) +lock.poll([['eDP-1', true], ['USB-2', true]]) +assert(!lock.state.displaysBlank && lock.state.events.includes('woken-behind-lock'), 'panels lit without a key reaching the lock count as a wake') +assert(lock.timer.dueAt() === lock.clock.now + wakeRunUp, 'a wake the lock did not see gets the wake run-up') + +lock = makeLock() +lock.blank() +lock.poll([['eDP-1', false], ['USB-2', true]]) +assert(lock.state.displaysBlank && !lock.timer.running, 'one panel lit while another is dark is not a wake') + +lock = makeLock() +lock.blank() +const staleEpoch = lock.state.dpmsEpoch - 1 +lock.poll([['eDP-1', true]], staleEpoch) +assert(lock.state.displaysBlank && !lock.timer.running, 'an answer asked for before the blank landed is not a wake') + +lock = makeLock() +lock.blank() +lock.state.blankProcess.running = true +lock.poll([['eDP-1', true]]) +assert(lock.state.displaysBlank && !lock.timer.running, 'an answer that races the blank itself is not a wake') + +lock = makeLock() +lock.blank() +lock.state.screenDpmsSettleTimer.running = true +lock.poll([['USB-2', true]]) +assert(lock.state.displaysBlank && !lock.timer.running, 'a panel coming back mid-blank is left to the screen-change settle') + +lock = makeLock() +lock.blank() +lock.poll([]) +assert(lock.state.displaysBlank && !lock.timer.running, 'no enabled panel is not a wake') + +lock = makeLock() +lock.armBlankTimer() +const due = lock.timer.dueAt() +lock.poll([['eDP-1', true]]) +assert(lock.timer.dueAt() === due && lock.state.events.length === 0, 'a lit lock polled for its video wallpaper is not woken again') + +assert( + /id: monitorDpmsTimer[\s\S]*?running: root\.locked && \(root\.videoBackground \|\| root\.displaysBlank\)[\s\S]*?if \(monitorDpmsProcess\.running \|\| blankProcess\.running\) return\s*monitorDpmsProcess\.epoch = root\.dpmsEpoch/.test(service), + 'a blank lock polls the panels, tagging each answer with the state it was asked in' +) + +assert( + /id: blankProcess[\s\S]*?onExited: root\.dpmsEpoch \+= 1/.test(service) && + /function runBlank\(\) \{\s*root\.dpmsEpoch \+= 1/.test(service) && + /function runWake\([^)]*\) \{[\s\S]*?root\.dpmsEpoch \+= 1/.test(service) && + /onStreamFinished: root\.takeMonitorDpms\(text, monitorDpmsProcess\.epoch\)/.test(service), + 'answers asked for before a blank or wake finished are dropped' +) + assert( /id: resumeWatchTimer[\s\S]*?onRunningChanged: lastTick = running \? Date\.now\(\) : 0/.test(service), 'a suspend within a second of locking is still seen as a resume' diff --git a/test/shell.d/video-background-test.sh b/test/shell.d/video-background-test.sh index 7dd634ef9c19..4d95233708da 100755 --- a/test/shell.d/video-background-test.sh +++ b/test/shell.d/video-background-test.sh @@ -157,7 +157,7 @@ assert( lockService.includes('function screenBlank(screenName)') && lockService.includes('function applyMonitorDpms(text)') && lockService.includes('command: ["hyprctl", "monitors", "-j"]') && - lockService.includes('running: root.locked && root.videoBackground') && + lockService.includes('running: root.locked && (root.videoBackground || root.displaysBlank)') && /displaysBlank: root\.screenBlank\(lockSurface\.screen/.test(lockService) && /function runWake\([^)]*\) \{[\s\S]*?root\.monitorDpmsKnown = false/.test(lockService) && /function runBlank\(\) \{[\s\S]*?root\.monitorDpmsKnown = false/.test(lockService), @@ -168,7 +168,7 @@ assert( lockView.includes('&& !root.powerSaverActive') && /displaysBlank: root\.screenBlank\(/.test(lockService) && /powerSaverActive: root\.powerSaverActive/.test(lockService) && - /function runBlank\(\) \{\s*\n\s*root\.displaysBlank = true/.test(lockService) && + /function runBlank\(\) \{[\s\S]*?root\.displaysBlank = true/.test(lockService) && /function runWake\([^)]*\) \{[\s\S]*?root\.displaysBlank = false/.test(lockService), 'the lock screen stops playback once displays go dark or power-saver is active' ) From 5a27f2fcde4f2402bea81f8ed601998ba1eab59d Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sun, 27 Sep 2026 10:55:09 +1000 Subject: [PATCH 3/3] Drop DPMS answers that race a wake and poll a still lock less often --- shell/plugins/lock/Service.qml | 15 ++++++++------- test/shell.d/lock-lit-after-wake-test.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/shell/plugins/lock/Service.qml b/shell/plugins/lock/Service.qml index 383f52276448..723ce2a51e69 100644 --- a/shell/plugins/lock/Service.qml +++ b/shell/plugins/lock/Service.qml @@ -238,12 +238,11 @@ Item { return true } - // Hyprland lights the panels for input that never reaches the lock: the power - // button is a locked bind, and a lid can come back without a suspend. Every - // enabled panel lit while the lock thinks it is blank is such a wake, and gets - // the same run-up as a key. + // Hyprland lights the panels for input that never reaches the lock, such as + // the power button, which is a locked bind. Every enabled panel lit while the + // lock thinks it is blank is such a wake, and gets the same run-up as a key. function takeMonitorDpms(text, epoch) { - if (epoch !== dpmsEpoch || blankProcess.running) return + if (epoch !== dpmsEpoch || blankProcess.running || wakeProcess.running) return // A panel coming back mid-blank is the screen-change settle's to judge. if (screenDpmsSettleTimer.running || screenDpmsProcess.running) return if (!applyMonitorDpms(text)) return @@ -498,6 +497,7 @@ Item { Process { id: wakeProcess command: ["bash", "-c", "omarchy-system-wake"] + onExited: root.dpmsEpoch += 1 } Process { @@ -521,12 +521,13 @@ Item { Timer { id: monitorDpmsTimer - interval: 3000 + // Nothing re-blanks before a wake is noticed, so a still wallpaper can wait longer. + interval: root.videoBackground ? 3000 : 5000 repeat: true triggeredOnStart: true running: root.locked && (root.videoBackground || root.displaysBlank) onTriggered: { - if (monitorDpmsProcess.running || blankProcess.running) return + if (monitorDpmsProcess.running || blankProcess.running || wakeProcess.running) return monitorDpmsProcess.epoch = root.dpmsEpoch monitorDpmsProcess.running = true } diff --git a/test/shell.d/lock-lit-after-wake-test.sh b/test/shell.d/lock-lit-after-wake-test.sh index fc784ac9167e..ae1dc8b954f8 100755 --- a/test/shell.d/lock-lit-after-wake-test.sh +++ b/test/shell.d/lock-lit-after-wake-test.sh @@ -134,6 +134,12 @@ lock.state.blankProcess.running = true lock.poll([['eDP-1', true]]) assert(lock.state.displaysBlank && !lock.timer.running, 'an answer that races the blank itself is not a wake') +lock = makeLock() +lock.blank() +lock.state.wakeProcess.running = true +lock.poll([['eDP-1', true]]) +assert(lock.state.displaysBlank && !lock.timer.running, 'an answer that races a wake is left to that wake') + lock = makeLock() lock.blank() lock.state.screenDpmsSettleTimer.running = true @@ -152,12 +158,13 @@ lock.poll([['eDP-1', true]]) assert(lock.timer.dueAt() === due && lock.state.events.length === 0, 'a lit lock polled for its video wallpaper is not woken again') assert( - /id: monitorDpmsTimer[\s\S]*?running: root\.locked && \(root\.videoBackground \|\| root\.displaysBlank\)[\s\S]*?if \(monitorDpmsProcess\.running \|\| blankProcess\.running\) return\s*monitorDpmsProcess\.epoch = root\.dpmsEpoch/.test(service), + /id: monitorDpmsTimer[\s\S]*?running: root\.locked && \(root\.videoBackground \|\| root\.displaysBlank\)[\s\S]*?if \(monitorDpmsProcess\.running \|\| blankProcess\.running \|\| wakeProcess\.running\) return\s*monitorDpmsProcess\.epoch = root\.dpmsEpoch/.test(service), 'a blank lock polls the panels, tagging each answer with the state it was asked in' ) assert( /id: blankProcess[\s\S]*?onExited: root\.dpmsEpoch \+= 1/.test(service) && + /id: wakeProcess[\s\S]*?onExited: root\.dpmsEpoch \+= 1/.test(service) && /function runBlank\(\) \{\s*root\.dpmsEpoch \+= 1/.test(service) && /function runWake\([^)]*\) \{[\s\S]*?root\.dpmsEpoch \+= 1/.test(service) && /onStreamFinished: root\.takeMonitorDpms\(text, monitorDpmsProcess\.epoch\)/.test(service),