Turn Off Display Without Sleep
Turns the display off without entering Modern Standby sleep, keeping background audio playback, downloads, and mobile hotspots alive.
Author: mirukurusan
On Modern Standby (S0ix) laptops, user-initiated actions—such as clicking "Sleep"
in the Start menu, pressing a power button configured for sleep, or invoking
display-off shortcuts—instruct the Windows Power Dependency Coordinator (PDC) to
transition to sleep. This suspends desktop apps (DAM) and disconnects mobile hotspots.
However, when Windows turns the display off through a natural idle timeout, Modern
Standby keeps audio streams, downloads, and mobile hotspots running indefinitely.
Turn Off Display Without Sleep triggers this natural idle path on demand:
- Instant Pitch-Black Screen: Creates an instant fullscreen topmost blackout
overlay across all monitors so the screen appears turned off immediately.
- Dynamic 1-Second Timeout: Saves your current timeouts and temporarily injects
a 1-second display idle timeout (
VIDEOIDLE) into the active power scheme. Windows
naturally powers down the monitors via the idle path within ~1–2 seconds without
suspending background tasks.
- Automatic Restoration: When hardware display-off (
GUID_CONSOLE_DISPLAY_STATE == 0)
is detected, the original display timeout is immediately restored, and the overlay
is dismissed.
- Direct-to-Desktop Wake or Optional Lock:
- By default, your workstation stays unlocked so you return directly to your active
desktop upon waking the screen—no PIN or Windows Hello delay.
- If desired, enable Lock workstation after display turns off to silently lock the
session in the dark once the screen is powered down.
- Failsafe Watchdog: If the display does not power down within 3 seconds (e.g. due
to mouse movement or an application holding
ES_DISPLAY_REQUIRED / active video playback),
the overlay is removed and timeouts are restored automatically.
What happens on an unclean exit?
The 1-second timeout only exists in the power plan for the 1–3 seconds between trigger
and display power-down. If the tool process is forcefully terminated during those few
seconds (system crash, power loss, or process kill), the 1-second timeout remains in the
active power plan until the mod runs again and automatically restores it from storage.
If the screen turns off after one second of idle while the mod is disabled or uninstalled,
simply re-adjust "Turn off my screen after" in Windows Settings.
Prerequisites
To allow this mod to take control of lid-close or power button events, Windows native actions
must be set to "Do nothing" (0) so Windows does not trigger its built-in sleep transition.
Run this in an elevated Command Prompt:
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 0
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 0
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg /setactive SCHEME_CURRENT
Warning: With the lid action set to "Do nothing", closing the lid and putting the laptop
into a backpack or bag will keep the system running (until the regular system sleep timeout).
Make sure to explicitly sleep or shut down your laptop before bagging it.
Reverting prerequisites
If you disable or uninstall this mod and want to restore the native sleep behavior:
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 1
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS PBUTTONACTION 1
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 1
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 1
powercfg /setactive SCHEME_CURRENT
Triggers
- Keyboard Shortcut: Default is
Win+Alt+L. Customizable in settings.
- Lid Close: Triggered automatically when closing the laptop lid. Requires native lid
close action set to "Do nothing".
- Power Button: Supported on devices where the power button is exposed via HID System Control
(Usage Page
0x01, Usages 0x80/0x81/0x82 or 0x0D, such as Microsoft Surface Pro).
Requires native power button action set to "Do nothing".
Not detectable on laptops with ACPI-only power buttons, use Trigger hotkey or Lid close instead.
- External Window Message: Broadcast
WindhawkScreenOffNoSleep_Trigger from external scripts or taskbar shortcuts.
Settings
- Lock workstation after display turns off: Silently lock in the dark after screen is off.
- Trigger hotkey: Global hotkey to turn off display (default
Win+Alt+L).
- Turn off display on lid close: Trigger when laptop lid closes.
- Turn off display on power button (HID devices): Capture HID power button events.