J
J.Yankee
Guest
Using PowerSettingRegisterNotification, I was able to listen to Display States on the following System Power Events (using GUID_CONSOLE_DISPLAY_STATE as SettingGUID):
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.
Continue reading...
- 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.
Continue reading...