My driver is based upon Microsoft’s IddCx example, and I don’t provide any power management callbacks except for D0Entry and D0Exit:
NTSTATUS CAdapter::Create(WDFDRIVER hWdfDriver, PWDFDEVICE_INIT pDeviceInit)
{
. . .
///////////////////////////////////////////////////////////////////////////
// Register this driver's Plug-n-Play and Power Management event callbacks
WDF_PNPPOWER_EVENT_CALLBACKS pnpPowerCallbacks{};
WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&pnpPowerCallbacks);
pnpPowerCallbacks.EvtDeviceD0Entry = OnWdfDeviceD0Entry;
pnpPowerCallbacks.EvtDeviceD0Exit = OnWdfDeviceD0Exit;
::WdfDeviceInitSetPnpPowerEventCallbacks(pDeviceInit, &pnpPowerCallbacks);
For a small percentage of (Windows 10) users, when a (software) display adapter device is created, it shows up in Device Manager under Display Adapters with a yellow triangle. Looking at the status, it says “This device cannot start. (Code 10) STATUS_DEVICE_POWER_FAILURE”
I haven’t been able to reproduce this in a testing environment, and I’m struggling to understand what might be causing this.
Can anyone offer any clues?