Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Windows operating system provides a comprehensive and system-wide set of power management features. This enables systems to extend battery life and save energy, reduce heat and noise, and help ensure data reliability.
Modern Standby and application design
Modern Standby (S0 low-power idle) is the default sleep model on most Windows 11 devices. Unlike traditional S3 sleep, the system remains partially running—network connectivity can be maintained, and the system can wake instantly. This changes how applications should handle background work.
Important
Common anti-patterns that drain battery in Modern Standby:
- Holding
ES_SYSTEM_REQUIREDcontinuously — This prevents the system from entering low-power idle. Only hold this flag while actively performing work, then clear it immediately. - Periodic timer wake-ups — Timers that fire every few seconds keep the CPU active. Use coalescing timers or event-driven designs instead.
- Unbounded network polling — For packaged apps, use push notifications (WNS). For unpackaged Win32 apps, use event-driven sockets or network list change notifications rather than polling an endpoint.
- Audio/media streams left open — Even silent streams prevent audio-device power-down. Release audio devices when not actively rendering.
Best practices for Modern Standby
- Register for power notifications to detect transitions. Use PowerSettingRegisterNotification with
GUID_MONITOR_POWER_ONandGUID_POWER_SAVING_STATUS. - Defer non-critical work until the device is on AC power. Check with GetSystemPowerStatus before starting large operations.
- Use SetThreadExecutionState sparingly — Call with
ES_CONTINUOUS | ES_SYSTEM_REQUIREDonly for active operations (file transfers, media recording), and always clear withSetThreadExecutionState(ES_CONTINUOUS)once the operation finishes. - Batch network operations — Combine multiple small requests into one session to minimize radio wake time.
- Respect battery saver — When
GUID_POWER_SAVING_STATUSindicates battery saver is active, reduce or eliminate background activity.
The power management functions and messages retrieve the system power status, notify applications of power management events, and notify the system of each application's power requirements. This overview contains the following topics:
- Windows Power Management
- System Power Status
- System Power States
- System Power Management Events
- WM_POWERBROADCAST Messages
- System Sleep Criteria
- System Wake-up Events
- Battery Information
- Backlight Control Interface
- Power Schemes
- Device Power Management
Related topics