I’m in the middle of lots of confused people about the nature of “System Sleep” and “Selective Suspend” capabilities, and what we need to do on our device and driver to make certain behaviors possible:
-
We want to fully support “USB Selective Suspend”, do we need to have the device implement these descriptors to ‘support’ this? http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
-
We want to support “Arm for Wake” from “System Sleep” in our device as well, same question as #1.
-
Is the Power Policy Owner driver for the device, responsible for implementing the back-en d functionality of these ‘registry’ settings? Are these common properties for KMDF + USB? Specific settings for specific drivers?
-Thanks in advance as always!
Roscoe Casita
Selective suspend has nothing to do with the ms os descriptor. Neither does wake from suspend. There are no registry settings. Yes, the driver needs to support usb ss, use kmdf. It then becomes as simple as one api call
d
Bent from my phone
From: xxxxx@gmail.commailto:xxxxx
Sent: ?10/?29/?2014 4:47 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] USB Selective Suspend
I’m in the middle of lots of confused people about the nature of “System Sleep” and “Selective Suspend” capabilities, and what we need to do on our device and driver to make certain behaviors possible:
1. We want to fully support “USB Selective Suspend”, do we need to have the device implement these descriptors to ‘support’ this? http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
2. We want to support “Arm for Wake” from “System Sleep” in our device as well, same question as #1.
3. Is the Power Policy Owner driver for the device, responsible for implementing the back-en d functionality of these ‘registry’ settings? Are these common properties for KMDF + USB? Specific settings for specific drivers?
-Thanks in advance as always!
Roscoe Casita
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>
Thank you for the help, this will help greatly for explanations in the
next meeting.
On Oct 29, 2014 6:26 PM, “Doron Holan” wrote:
> Selective suspend has nothing to do with the ms os descriptor. Neither
> does wake from suspend. There are no registry settings. Yes, the driver
> needs to support usb ss, use kmdf. It then becomes as simple as one api call
>
> d
>
> Bent from my phone
> ------------------------------
> From: xxxxx@gmail.com
> Sent: 10/29/2014 4:47 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] USB Selective Suspend
>
> I’m in the middle of lots of confused people about the nature of
> “System Sleep” and “Selective Suspend” capabilities, and what we need to do
> on our device and driver to make certain behaviors possible:
>
> 1. We want to fully support “USB Selective Suspend”, do we need to have
> the device implement these descriptors to ‘support’ this?
> http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
>
> 2. We want to support “Arm for Wake” from “System Sleep” in our device as
> well, same question as #1.
>
> 3. Is the Power Policy Owner driver for the device, responsible for
> implementing the back-en d functionality of these ‘registry’ settings? Are
> these common properties for KMDF + USB? Specific settings for specific
> drivers?
>
> -Thanks in advance as always!
> Roscoe Casita
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
On Oct 29, 2014, at 4:47 PM, xxxxx@gmail.com wrote:
I’m in the middle of lots of confused people about the nature of “System Sleep” and “Selective Suspend” capabilities, and what we need to do on our device and driver to make certain behaviors possible:
-
We want to fully support “USB Selective Suspend”, do we need to have the device implement these descriptors to ‘support’ this? http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
-
We want to support “Arm for Wake” from “System Sleep” in our device as well, same question as #1.
-
Is the Power Policy Owner driver for the device, responsible for implementing the back-en d functionality of these ‘registry’ settings? Are these common properties for KMDF + USB? Specific settings for specific drivers?
The registry settings apply only to apps (or UMDF drivers) that use WinUSB. If you have your own driver, you can do all of it yourself with the KMDF USB APIs.
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
For the sake of trying to convince people… What devices would WinUSB
normally load for?
On Wed, Oct 29, 2014 at 10:47 PM, Tim Roberts wrote:
> On Oct 29, 2014, at 4:47 PM, xxxxx@gmail.com wrote:
>
> > I’m in the middle of lots of confused people about the nature of “System
> Sleep” and “Selective Suspend” capabilities, and what we need to do on our
> device and driver to make certain behaviors possible:
> >
> > 1. We want to fully support “USB Selective Suspend”, do we need to have
> the device implement these descriptors to ‘support’ this?
> http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
> >
> > 2. We want to support “Arm for Wake” from “System Sleep” in our device
> as well, same question as #1.
> >
> > 3. Is the Power Policy Owner driver for the device, responsible for
> implementing the back-en d functionality of these ‘registry’ settings? Are
> these common properties for KMDF + USB? Specific settings for specific
> drivers?
>
> The registry settings apply only to apps (or UMDF drivers) that use
> WinUSB. If you have your own driver, you can do all of it yourself with
> the KMDF USB APIs.
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Thanks in advance,
Roscoe Casita
Roscoe Casita wrote:
For the sake of trying to convince people… What devices would WinUSB
normally load for?
I would use WinUSB for ANY device that doesn’t fall into a standard
driver class. One of my mantras is “don’t put anything in kernel mode
that can be done just as well in user mode.” If you have a custom USB
interface with no isochronous pipes, WinUSB with a user-mode DLL works
just as well as a custom driver, and it is WAY easier to debug.
With the new Microsoft extended descriptors, you don’t even need an
INF. You can include an extended descriptor that loads the driver and
defines your device interface GUID, all without any driver work at all.
WinUSB really is nifty.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Sorry for further confusion,… There are lots of people asking questions
that don’t make sense, and I’m doing my best to help them understand.
There is also this overly broad statement on MSDN that people are
referencing:
http://msdn.microsoft.com/en-us/library/windows/hardware/jj131716(v=vs.85).aspx
Windows 8 supports two methods for enabling Selective Suspend for HID USB
devices. They are as follows:
- *Microsoft OS Descriptor [PREFERRED]*: The Microsoft OS Descriptor’s
Extended Properties descriptor can be used to write the necessary registry
key(s) to support USB HID Selective Suspend.
- *Vendor Provided INF*: The Hardware manufacturer can provide an INF
file (that matches on the USB Hardware ID for the HID devnode) to install
the appropriate registry keys.
Lets start with that our device could run in several different modes, we
want our device to support selective suspend in all modes (it does not work
correctly currently, and we are making hardware changes)
- USB-Keyboard: Currently this device is never put into selective
suspend. Does WinUSB play a role in this? Other registry settings we
should set so we are selectively suspended?
- USB-IBM-OEM: Scanner Usage, Currently this is a HID class device, and
does get selectively suspended, (Again, does WinUSB play a role in this as
the settings show up under device properties?)
- USB-COM: Loading the usbser.sys for our device, we are not selectively
suspended. How would we get our device to be selectively suspended?
On Thu, Oct 30, 2014 at 10:50 AM, Tim Roberts wrote:
> Roscoe Casita wrote:
> > For the sake of trying to convince people… What devices would WinUSB
> > normally load for?
>
> I would use WinUSB for ANY device that doesn’t fall into a standard
> driver class. One of my mantras is “don’t put anything in kernel mode
> that can be done just as well in user mode.” If you have a custom USB
> interface with no isochronous pipes, WinUSB with a user-mode DLL works
> just as well as a custom driver, and it is WAY easier to debug.
>
> With the new Microsoft extended descriptors, you don’t even need an
> INF. You can include an extended descriptor that loads the driver and
> defines your device interface GUID, all without any driver work at all.
>
> WinUSB really is nifty.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Thanks in advance,
Roscoe Casita
Thank you for your time, please see below: (I’m a beginner kernel mode
dev, most of my tasks are explaining how these things work to people who
don’t write programs)
On Thu, Oct 30, 2014 at 3:16 PM, Tim Roberts wrote:
> Roscoe Casita wrote:
> > Sorry for further confusion,… There are lots of people asking
> > questions that don’t make sense, and I’m doing my best to help them
> > understand.
> >
> > There is also this overly broad statement on MSDN that people are
> > referencing:
> >
> >
> http://msdn.microsoft.com/en-us/library/windows/hardware/jj131716(v=vs.85).aspx
> > <
> http://msdn.microsoft.com/en-us/library/windows/hardware/jj131716(v=vs.85).aspx
> >
>
> Please remember that the selective suspend device is ENTIRELY up to the
> driver. This page is specifically referring to USB HID devices, which
> use the stock USB HID driver. That driver happens to recognize the one
> magic registry key installed by the INF changes they suggest.
>
Understood.
>
>
> > Lets start with that our device could run in several different modes,
> > we want our device to support selective suspend in all modes (it does
> > not work correctly currently, and we are making hardware changes)
>
> How do you switch “modes”? Are these separate interfaces? That adds
> yet another level of complexity, because each interface has its own
> power management behavior. The whole composite device cannot go into
> selective suspend unless ALL of the interfaces are in a low-power state.
>
In this case, its actually retained in the device, usually by scanning a
barcode, this changes the entire behavior of the device. One or the other,
but not a combination.
>
>
> > 1. USB-Keyboard: Currently this device is never put into selective
> > suspend. Does WinUSB play a role in this? Other registry settings we
> > should set so we are selectively suspended?
>
> Do you understand what WinUSB is? WinUSB is a generic USB driver for
> devices that do not have any other driver. If you have a HID device,
> then you use the HID driver. WinUSB is not involved.
>
Yes, I was reading about the Power Policy Owner in the case of winusb, and
trying to make sure that I was correct in the statement that:
“These registry settings do not control the USB-Keyboard Selective suspend
behavior.”
>
>
> > 2. USB-IBM-OEM: Scanner Usage, Currently this is a HID class
> > device, and does get selectively suspended, (Again, does WinUSB play
> > a role in this as the settings show up under device properties?)
>
> Again, a HID device uses the USB HID driver, not WinUSB.
>
And thus the USB-HID is the PPO, not WinUSB running as a filter driver.
>
>
> > 3. USB-COM: Loading the usbser.sys for our device, we are not
> > selectively suspended. How would we get our device to be selectively
> > suspended?
>
> Usbser has its own set of rules. I believe that as long as there is an
> open handle, it will stay in D0. When the last open handle closes, it
> should go to D2, which allows selective suspend.
>
> However, for a composite device, none of the interfaces can go to
> selective suspend unless they ALL do.
>
Thank you. I know some of these questions seem like nonsense, I’m trying to
ensure we are armed with enough information to prove it.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Thanks in advance,
Roscoe Casita
Roscoe Casita wrote:
> Lets start with that our device could run in several different modes,
> we want our device to support selective suspend in all modes (it
does
> not work correctly currently, and we are making hardware changes)
How do you switch “modes”? Are these separate interfaces? That adds
yet another level of complexity, because each interface has its own
power management behavior. The whole composite device cannot go into
selective suspend unless ALL of the interfaces are in a low-power
state.
In this case, its actually retained in the device, usually by scanning
a barcode, this changes the entire behavior of the device. One or the
other, but not a combination.
How do you do that? Do you have different VIDs and PIDs? Windows
associates a driver with a particular VID and PID, so if you used to be
a HID device, but this time you boot up as a CDC device, that won’t work.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Different PID’s, when you scan the barcode, it changes PID to the selected
‘mode’.
Each family of products, has a set of PID’s for the different ‘modes’ that
it supports.
1 PID for USB-KBD
1 PID for USB-COM
etc.
On Thu, Oct 30, 2014 at 4:02 PM, Tim Roberts wrote:
> Roscoe Casita wrote:
>
> > Lets start with that our device could run in several different modes,
>
>> > we want our device to support selective suspend in all modes (it does
>> > not work correctly currently, and we are making hardware changes)
>>
>> How do you switch “modes”? Are these separate interfaces? That adds
>> yet another level of complexity, because each interface has its own
>> power management behavior. The whole composite device cannot go into
>> selective suspend unless ALL of the interfaces are in a low-power state.
>>
>
> In this case, its actually retained in the device, usually by scanning a
> barcode, this changes the entire behavior of the device. One or the other,
> but not a combination.
>
>
> How do you do that? Do you have different VIDs and PIDs? Windows
> associates a driver with a particular VID and PID, so if you used to be a
> HID device, but this time you boot up as a CDC device, that won’t work.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Thanks in advance,
Roscoe Casita