How to stop USB devices from disconnecting on sleep?
Solution 1
Perhaps you can try this:
Refer to the following steps.
- Open
Control panel
, and clickview by
to selectsmall icons
- Click
Power Options
- Find the current plans (in my PC is
Balanced
) - Click
Change plan settings
- Click
Change advanced power settings
in the new Window - In the new Window, click Change settings that are current unavailable
- Then find
USB settings
->USB selective suspend settings
- 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.
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:
- Enable the power plan you wish to change
- Open
cmd
- 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
- 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
[...]
Related videos on Youtube
Newbie Noob
Updated on September 18, 2022Comments
-
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 almost 6 yearsUSB 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.