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

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

Tracking Wake Source in Usermode driver!

sunil_kumarsunil_kumar Member Posts: 103

Hi Gurus,

I am implementing one feature in my user mode driver where I need to know Wake Up source. The device which made the system to wake up.

I need to enable the feature depending on the wake source.

Can anybody suggest if any powercallback/API to check this?

We can trap keyboard and mouse event in Service but I don't want to go for that as I have to implement service in addition to the driver and keyboard/mouse may not be only wake sources.

Thanks

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 6,836

    I need to know Wake Up source

    Interesting question. I seem to recall that this isn't something that's possible to do reliably from the OS, at least not without specific BIOS changes.

    For example, there's a callback that you can use for a USB driver for devices that support waking the system... you can be called back if YOUR device was the one that woke the system. However, I seem to recall that this callback isn't 100% reliable, it's more like a guess or a hint.

    I'll be happy to discover that I'm wrong, but that's what I seem to recall from my distant memory of this issue. Sorry to not have anything more definitive to share.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • sunil_kumarsunil_kumar Member Posts: 103

    Thanks, Peter for the reply.

    For example, there's a callback that you can use for a USB driver for devices that support waking the system... you can be called back if YOUR device was the one that woke the system. However, I seem to recall that this callback isn't 100% reliable, it's more like a guess or a hint.

    Yes, I agree there is one in "IPowerPolicyCallbackWakeFromSx::OnWakeFromSxTriggered" which gets triggered when your device is wake up source. I am not sure about reliability.

    But my question still remains.

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,379
    via Email
    AFAIK there is no documented way to query for the wake source in either UM or KM. At best, your wait wake request in the driver completed with success, but that is not definitive.

    d
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!