Adom Screensaver
Public Made by Adomby adom
Turn your laptop into an always-on vibe coding server: branded screensaver + native keep-awake (no PowerToys) + honest, hardware-aware power management.
Panel stuck at ~10% brightness after sleep during saver + wake-while-docking; wake path never restores brightness
Type: Bug (wake path) · laptop panel stuck at ~10% brightness after sleep during the screensaver, needs manual brightness-up every time
Repro (happens to me consistently)
- Laptop undocked (no external monitors), adom-screensaver active (deployed 0.7.10, signed).
- Put the laptop to sleep while the saver is up (or after it has rested).
- Wake it while connecting external monitors at the same time (dock + wake together).
- The internal panel comes back at roughly 10% brightness and stays there. I have to slide brightness back up by hand every time.
What I could verify from the shipped install (C:\Users\drew\adom-screensaver)
- The saver rewrites power-scheme values on its profile:
LIDACTION 0,STANDBYIDLE(0 on AC, REC_SLEEP_DC on battery), andVIDEOIDLEon both AC and DC (adom-screensaver.cs L259-264). It also holdsES_CONTINUOUS | ES_DISPLAY_REQUIREDwhile billboarding (L897, L909). - It does not set brightness anywhere: no
VIDEONORMALLEVEL, noVIDEODIM, no WmiMonitorBrightness calls. So the 10% is not the saver writing 10%. - There is also no brightness restore anywhere in the wake/exit path, which is the gap.
- wv.log confirms the saver was in
rested=Trueheartbeat state before the sleep in my case. - (Caveat: the .cs on disk may lag the 0.7.10 binary; please check against current source.)
Likely mechanism
The ~10% figure matches the Windows "Dimmed display brightness" power setting (SUB_VIDEO f1fbfde2...). Sequence: the saver rests and releases its display wake lock, Windows runs its dim-then-off path and drops the panel to the dimmed level, sleep captures that dimmed state, and the wake happens simultaneously with a display-topology change (external monitors attach, internal panel re-enumerates). Windows never fires the un-dim transition for the internal panel, so the dimmed level sticks as the new brightness. The saver does not cause the dim, but its rest path sets up the exact window where the un-dim gets lost, and nothing on our side repairs it.
Suggested fix
- On saver start (or stayawake start), snapshot the panel brightness (
WmiMonitorBrightness.CurrentBrightness). - On every wake/exit path (saver dismissal,
WM_POWERBROADCASTresume in stayawake, or display-topology change), compare current brightness to the snapshot and restore it viaWmiMonitorBrightnessMethods.WmiSetBrightnessif it dropped. stayawake is the natural home since it is always resident and already power-aware. - Alternatively (or additionally): while the profile is applied, set
VIDEODIMdim-brightness to match the user's normal level so a lost un-dim is harmless, and restore the original on profile revert.
Environment
adom-screensaver 0.7.10 (signed, Valid) · Windows laptop adom_drew2, user drew · AC at repro time per wv.log (power=plugged in) · rest path healthy otherwise (billboard, rest, and keep-awake all working as designed).
Happy to run any diagnostic on my machine to confirm, including logging brightness at rest/wake transitions.