0.8.1: saver exits near display-off without restoring brightness (left at 0 after 'BACKLIGHT: dimmed 51 -> 0')
adom-screensaver 0.8.1 (signed, Valid) · Windows 11 Home 22631 · Dell XPS 15 9510 (Intel UHD, 3456x2160 OLED) · on AC the whole time, no sleep, no dock change
Related to #1, but this is a separate path. Here 0.8.1 sets the brightness to 0 itself, and the saver then disappears without putting it back. There was no sleep and no monitor change.
What I did
Fresh deploy of the 0.8.1 dist/win files to %LOCALAPPDATA%\adom-screensaver. Saver timeout set to 120 s, monitor-timeout-ac set to 10 min, adom-stayawake.exe running. Then I left the laptop completely idle for about 11.5 minutes while a full-screen recording ran.
Expected
When the saver ends for any reason (wake, display-off, crash), the panel brightness goes back to what it was before the dim.
What happened
wv.log (complete from saver start; nothing was written after the last line):
13:56:04.608 MAIN mode=/s args=/s
...
13:56:17.737 WIKI: run done, 0 reused (delta-skip), 150 fetched, 150 total
13:57:12.037 HB: power=plugged in off=412 rested=False slides=150 cacheKB=123067
...
14:01:05.538 DIM: AC -> backlight to 0 + content near-black, display stays ON
14:01:05.675 BACKLIGHT: dimmed 51 -> 0
14:01:06.587 DIM: handing off to lightweight GDI dim logo + disposing WebView2 (frees Chromium for the night)
14:01:12.578 HB: power=plugged in off=172 rested=True slides=150 cacheKB=123068
14:02:12.665 HB: power=plugged in off=111 rested=True slides=150 cacheKB=123068
14:03:12.662 HB: power=plugged in off=51 rested=True slides=150 cacheKB=123068
The heartbeat stops after 14:03:12, about 50 s before the off= countdown reached 0. When I checked a few minutes later:
- No
adom-screensaverprocess was running (adom-stayawakewas still running). WmiMonitorBrightness.CurrentBrightness= 0.- Nobody had touched the keyboard or mouse.
So the saver exited at or near the display-off mark with no exit, wake or REST line in wv.log, and the backlight stayed at 0. A user coming back would see what looks like a dead screen until they press brightness-up. I restored it by hand with WmiSetBrightness(51).
Suggested fix
- Persist the pre-dim brightness (51 here) to disk when
BACKLIGHT: dimmedhappens. - Have
adom-stayawake(which is always running) restore it if the saver process goes away while brightness is still at the dimmed value. That also covers a crash, which the saver's own exit path can't. - Log something on every exit path so a silent exit shows up in
wv.log.
Good news from the same run
A full-screen native recording (Hydrogen / Adom Bridge, DXGI) ran through all of it at a steady 30 fps. It captured the live desktop for the whole 11.5 min, and neither the billboard nor the dim logo appears in it. Without the saver, the same test on this laptop records pure black from the moment the Windows display-off timeout fires. So the "dim but stay ON" design is exactly what makes unattended screen recording possible, which is worth keeping.