Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Getting display event notification in kmdf mode driver

aadit0402aadit0402 Member Posts: 4
I am trying to retrieve the display event notification, for that I am using IoRegisterPlugPlayNotification and I am registering this event GUID_DISPLAY_DEVICE_ARRIVAL. So during the device hardware preparation, I am registering this. And the callback is defined is global scope and during release hardware, I am un-registering this.

Using this approach, I am able to see the display event notification but only during restart that is s0 state. It was expected to notify the display device arrival and removal in hibernate case also.

I did some changes and instead of registering the event in prepare hardware, we did registration in self managed io initialization and unregistered the same in self managed io suspend. After this change, I am able to see the display event notification in hibernate case also, with delay.

I have tried using GUID_CONSOLE_DISPLAY_STATE for monitor off and on status retrieval.

I am still not sure which guid I should use for display event notification. Any leads will be highly appreciated.



  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,716

    You will, of course, not get any notifications during hibernation, because the power is off. You should get a notification when the machine comes out of hibernation if the state is different than when it went under. If you plug and then unplug, you won't get any notification, because no one was awake to know that.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • liamhellen55liamhellen55 Member Posts: 1

    I tried your way and it worked, thanks for sharing

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online