You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- locked + system enters Modern Standby: On Wake task asks the controller to promote `VIDEOCONLOCK` to wake timeout (default 300 seconds, configurable)
20
20
- unlocked again: controller resets `VIDEOCONLOCK` to baseline timeout
4. Sets `VIDEOCONLOCK` AC and DC to the baseline timeout. Reapplies the active power scheme.
162
+
163
+
Setting `VIDEOCONLOCK` at lock time forces Windows to re-arm its internal display-off countdown from the moment of lock, preventing stale idle time accumulated before the lock event from causing the screen to turn off earlier than configured.
161
164
162
165
### 4. Display turns off
163
166
164
-
`VIDEOCONLOCK` is still at the baseline (default 5 seconds), so Windows turns the display off shortly after lock.
167
+
Windows turns the display off after the baseline timeout (default 1 second) has elapsed since the lock event.
165
168
166
169
### 5. System enters Modern Standby
167
170
@@ -257,7 +260,7 @@ All three share the same principal and settings listed here. Per-task sections b
257
260
258
261
#### Purpose
259
262
260
-
Marks the start of a new lock cycle. Updates `state.json` with a fresh generation ID and `locked` status. Leaves`VIDEOCONLOCK`untouched.
263
+
Marks the start of a new lock cycle. Updates `state.json` with a fresh generation ID and `locked` status. Re-applies`VIDEOCONLOCK`to the baseline timeout to re-arm Windows's display-off countdown from the moment of lock.
261
264
262
265
#### Trigger
263
266
@@ -400,7 +403,7 @@ It bridges the gap between the GitHub Release and `installer.ps1`.
400
403
Parse the hex values after "Current AC Power Setting Index" and "Current DC Power Setting Index", convert to decimal, and write `baseline.json`. If a valid `baseline.json` already exists, preserve it so the true originals are never lost on re-install.
401
404
402
405
7.**Create or preserve `config.json`**
403
-
If missing or malformed, create with defaults (`baselineTimeoutSeconds = 5`, `wakeTimeoutSeconds = 300`). If valid, preserve it. Read the effective baseline timeout for the next step.
406
+
If missing or malformed, create with defaults (`baselineTimeoutSeconds = 1`, `wakeTimeoutSeconds = 300`). If valid, preserve it. Read the effective baseline timeout for the next step.
404
407
405
408
8.**Apply the baseline `VIDEOCONLOCK` setting**
406
409
Log the applied value. If the value came from an existing `config.json`, indicate that in the message.
@@ -577,14 +580,14 @@ The controller reads `%LOCALAPPDATA%\Turn-off-screen-on-lock\config.json` on eac
577
580
578
581
```json
579
582
{
580
-
"baselineTimeoutSeconds": 5,
583
+
"baselineTimeoutSeconds": 1,
581
584
"wakeTimeoutSeconds": 300
582
585
}
583
586
```
584
587
585
588
| Field | Type | Range | Default | Description |
586
589
|---|---|---|---|---|
587
-
|`baselineTimeoutSeconds`| integer | 1–86400 |5| Seconds before the screen turns off after locking. Also the value restored on unlock. |
590
+
|`baselineTimeoutSeconds`| integer | 1–86400 |1| Seconds before the screen turns off after locking. Also the value restored on unlock. |
588
591
|`wakeTimeoutSeconds`| integer | 1–86400 | 300 | Seconds the screen stays on when waking from Modern Standby to unlock. |
589
592
590
593
Loading rules:
@@ -605,7 +608,7 @@ Loading rules:
605
608
powercfg /q SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK | findstr /i "Current AC Current DC"
0 commit comments