UMDF Detect Display State (On/Dim/Off) from System Reboot/Restart Events RRS feed

  • Question

  • Using PowerSettingRegisterNotification, I was able to listen to Display States on the following System Power Events (using GUID_CONSOLE_DISPLAY_STATE as SettingGUID):

    • System Shutdown
    • Sleep
    • Hibernate
    • User Idle (Turn screen off after n-minutes)

    What I was not able to receive a Display State from is when a system restart is performed. My Power Setting Notify Callback was not called, neither from Display State Off before restart, nor Display State On after restarting.

    Is this a normal behavior? Or should I be listening to another event, specifically to handle this kind of scenario?

    I also tried GUID_MONITOR_POWER_ON as my SettingGUID, the same behavior was produced.

    I also tried usingEvtWdfDeviceD0Exit for that, with WdfPowerDeviceD3Final as WDF_POWER_DEVICE_STATE. The driver was not notified of such exit from D0 during system restart or system shutdown. I also tried the other states, the only D0 Exit event the driver received was from WdfPowerDevicePrepareForHibernation for pre-hibernation.

    Wednesday, March 11, 2020 9:34 AM

All replies

  • Some additional questions -

    • Why do you need these display state notifications in your driver?
    • What type of UMDF driver is this? i.e. please provide more information on the device class, bus, type of device etc 

    As far as EvtDeviceD0Exit please see the documentation on power policy ownership here:

    You should not acquire power policy ownership if another driver in your device stack is the power policy owner owner.

    Thursday, March 19, 2020 3:54 AM