Enabling USB Selective Suspend for HID Devices

Revision 2.0 of the Universal Serial Bus Specification specifies a USB selective suspend feature. By using this feature, the Windows operating system can selectively suspend idle USB devices. This allows Windows to efficiently manage the power requirements of the overall system. For more information about how Windows supports the USB selective suspend feature, see USB Selective Suspend. (This resource may not be available in some languages and countries.)

By default, USB selective suspend is disabled by Windows in order to provide a consistent user experience and to avoid resume latency from selective suspend.

A HID device that supports selective suspend must be designed to:

  • Retain the first input, touch, movement or key press when resuming from selective suspend.
  • Wake from selective suspend on movement.
  • Maintain the wireless link (if applicable).
  • Maintain power to any active status LEDs, such as NUM lock or CAPS lock.
  • Resume from selective suspend without any perceived delay by the user.

USB selective suspend can be enabled by a host software, such as the device driver. It can also be enabled by using a custom INF described in this topic. In addition, the capability to enable selective suspend can be programmed in the device‘s firmware. IHVs can do so by providing a properly formatted USB Microsoft OS extended property descriptor. When such a HID device is attached, Windows detects the descriptor and enables selective suspend automatically. For details about that descriptor and how Windows uses it to enable selective suspend, see Microsoft OS descriptor.

Independent hardware vendors (IHVs) can enable the USB selective suspend feature for their HID devices by using the device's information (INF) file. The following is a sample INF file that shows how to enable this USB feature in Windows:

; XYZ Vendor INF File for USB HID devices
; A sample INF for a stand-alone USB HID device that supports 
; selective suspend

Signature            = "$Windows NT$"
Provider             = %ProviderName%
Class                = HIDClass
CLASSGUID            = {745a17a0-74d3-11d0-b6fe-00a0c90f57da};
DriverVer            = 9/19/2008,                    
CatalogFile.NT       = HIDXYZ1.CAB



%ManufacturerName% = XYZHID,NT.6.0,NTx86,NTamd64

; Match on a hardware ID generated by the device, for x86 and x64.

%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy
%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy
%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy

; Windows Vista-specific sections -------------------------

include     = input.inf
needs       = HID_SelSus_Inst.NT

include     = input.inf
needs       = HID_SelSus_Inst.NT.HW

include     = input.inf
needs       = HID_SelSus_Inst.NT.Services

; While strings are localizable, in this sample INF, we have
; not created any localized strings.
ProviderName     = "Vendor XYZ (c)"
ManufacturerName = "Vendor XYZ (c)"
BthRadio1        = "Selective Suspend HID from XYZ (c)"
SourceDisk       = "Vendor XYZ (c) source disk"


  1. The INF Version section should have the CLASSGUID and DriverVer directives set as follows:

    • The CLASSGUID directive must specify the Microsoft class GUID for HID devices. This GUID has the value {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.

    • The DriverVer directive must have a value that has a newer date and greater version number than the value specified by the DriverVer directive in Input.inf.

  2. The ZYXHID.NT.6.0, ZYXHID.NTx86, and ZYXHID.NTamd64 sections specify the hardware identifier (ID) for the vendor's HID device. The hardware ID consists of a vendor identifier (VID) and product identifier (PID). Each hardware ID for a device must have VID/PID values that are unique to the vendor and device. This ensures that the same hardware ID does not correspond to multiple names and settings.

  3. The HIDSelSusp1.NT.6.0 and HIDSelSusp1.NT.6.0.HW sections are INF DDInstall sections. In this example, these sections contain INF Include and Needs directives.

    The Include directives reference the system-supplied Input.inf file, which contains INF sections needed to enable the USB selective suspend feature for the vendor's HID device.

    The Needs directives indicate which sections from Input.inf should be processed during device installation. In this case, the HID_SelSus_Inst section is selected instead of the default HID_Inst section, which does not support selective suspend.

  4. The HIDSelSusp1.NT.6.0.Services section is an INF DDInstall.HW section. In this example, the section also contains the same values for the INF Include and Needs directives.



Send comments about this topic to Microsoft

Build date: 4/28/2012