How to stop USB devices from disconnecting on sleep?

8,854

Solution 1

Perhaps you can try this:

Refer to the following steps.

  1. Open Control panel, and click view by to select small icons
  2. Click Power Options
  3. Find the current plans (in my PC is Balanced)
  4. Click Change plan settings
  5. Click Change advanced power settings in the new Window
  6. In the new Window, click Change settings that are current unavailable
  7. Then find USB settings -> USB selective suspend settings
  8. Disable it

Hope it can help you.

Solution 2

Start the Device Manager (devmgmt.msc) in System Control.

Most USB devices have configurable energy settings. You can change them to disallow energy saving in sleep mode.

enter image description here

This post might also be relevant.

Solution 3

OOOO's answer is great but in some circumstances Windows might hide the Change settings that are current unavailable option. It is possible to change the USB selective suspend settings via the command line:

  1. Enable the power plan you wish to change
  2. Open cmd
  3. To disable:
REM (On battery: Disabled)
powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
REM (Plugged in: Disabled)
powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
  1. To re-enable:
REM  (On battery: Enabled) - Default
powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
REM (Plugged in: Enabled) - Default
powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1

Adapted from: How to Turn On or Off USB Selective Suspend in Windows 10

Note: The GUIDs are well known GUIDs defined by Windows:

> powercfg -list
> powercfg -query <your_power_plan_GUID>

[...]
  Subgroup GUID: 2a737441-1930-4402-8d77-b2bebba308a3  (USB settings)
    Power Setting GUID: 48e6b7a6-50f5-4782-a5d4-53bb8f07e226  (USB selective suspend setting)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Disabled
      Possible Setting Index: 001
      Possible Setting Friendly Name: Enabled
[...]
Share:
8,854

Related videos on Youtube

Newbie Noob
Author by

Newbie Noob

Updated on September 18, 2022

Comments

  • Newbie Noob
    Newbie Noob almost 2 years

    I have a Dell Precision 5520 (laptop) and as it's my only Windows PC I'm unable to see if it's a Dell or Windows problem.

    I use various types of hardware such as CAN bus analyzers, MCU programmers and various others which each has their own software.

    The problem I have is that if the PC sleeps, upon wake up the software sees the hardware as disconnected. Some software crashes and some I have to reconfigure or mess around to get it to work again.

    Is there a way I can get the PC to sleep without disconnecting USB devices?

  • Ale..chenski
    Ale..chenski almost 6 years
    USB devices don't disconnect when put into "sleep" mode, aka USB SUSPEND. They disconnect when internal hubs are turned OFF. Originally the USB tree was not supposed to turn power off ever, but in laptop world even a small drain would cause user experience problem, so laptops invented this extra power state, "D3(cold)". That's where the disconnect happens. The above solution might solve the problem, but the marketing image of "power savvy laptop" might silently override this function.