Supporting System Wake-Up in UMDF Drivers

Warning

UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2.

For more info, see Getting Started with UMDF.

While the system is in a low-power state, some devices can detect an external event, such as an incoming network packet, and then wake the system. For example, if a PCI device has a system wake-up capability, as indicated in the device's Power Management Capabilities (PMC) register, it wakes the system by raising the Power Management Event (PME) signal on the PCI bus.

If your device can wake the system from a system-wide low-power state, the IDriverEntry::OnDeviceAdd callback function in the power policy owner must perform the following two steps:

  1. Call IWDFDevice2::AssignSxWakeSettings to specify:

    • The low-power state that the device will enter
    • Whether users can control the device's idle settings
    • Whether the device's wake capability is enabled or disabled
  2. Implement the IPowerPolicyCallbackWakeFromSx interface and the following event callback functions, if you need them for your device:

Bus drivers also participate in waking up the system. The kernel-mode driver for the device's bus does whatever is necessary on the bus adapter to enable and disable a device's ability to wake from a low-power state.

For information about registry entries that control a device's wake capabilities, see User Control of Device Idle and Wake Behavior in UMDF.