Jump to content

Recommended Posts

Posted

Greetings

 

I need to disable the usb selective suspend on clients to test whether this is causing crashes. For some reason this option is missing in the power gpo. I have tried using powercfg to some success, however since the custom power plan I created is being given different guids on different computers I can't reliably use this method either.

 

Is there any way I can somehow enable this option in the gpo editor or is there another method I can use to disable it on the clients. There is a posted way to do this by adding a key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USB however a number of people reported that this didn't work.

 

Has anyone else come across this and have an idea how to solve it?

Thanks

Posted (edited)

You can use Windows' inbuilt powercfg tool to disable it as an alternative.

 

Typing powercfg /L into a console will list all the power plans available on your device, as well as highlighting which one is in use.

 

The default power plans and their corrosponding GUIDs are:

GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)

GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance) *

GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)

 

The asterisk indicates the currently selected power plan.

 

With your active power plan GUID in hand you can then run the following command(s) to disable selective suspend.

 

To disable selective suspend on plugged in laptops/desktops:

Powercfg.exe -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0

 

To disable selective suspend on laptops running on their battery:

Powercfg.exe -setdcvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0

 

███ -- AC = device is plugged into mains, DC = device is running on battery

 

███ -- Specifies the power plan GUID you found via powercfg /L

 

███ -- Specifies the USB settings GUID within the power plan

 

███ -- Specifies the USB selective suspend options within the power plan

███ -- Specifies the boolean value to disable selective suspend (1 is to enable selective suspend)

 

Hope that helps as an alternative.

Edited by v01d
  • Thanks 1
Posted

Thanks for your reply v01d, as in my post I have tried this approach without success due to the guid for my custom plan being different on various machines. Any other suggestions? I didn't really want to bugger around with the default plans if I didn't need to.

 

Cheers

Posted (edited)

Without knowing the sheer amount of custom power plans you have created, you could just opt for a kludge method of setting those powercfg attributes for each of the custom power plan GUIDs you have in a startup/logon script. Unless, of course, you are able to target specific groups/OUs of machines that have a common custom power plan.

 

Outside of that I'm afraid I can't offer an easier alternative in your case. :(

 

 

Edit: Since I'm on holidays at the moment (yay!) I'll do some tinkering in Visual Studio to see if I can knock up something to handle this scenario of various GUIDs.

Edited by v01d
  • Thanks 1
Posted
I've only created the one additional power plan but of the 5 machines it was tested on, 3 of them ended up with different guid's for that plan. Before I'd realised that I thought it was a good solution I'd come up with. I think you're right though that fudging it across all of them (or at least the high performance one as that's the most unlikely to be used) may be the only option. Thank you for your help v01d :)
Posted

If its of any use to anyone, I've quickly knocked up a console app that will disable selective suspend on the currently active power plan when run.

 

I've attached the Visual Studio project which includes a compiled binary in the "Disable Selective Suspend\bin\Release" folder.

 

Wouldn't be hard to convert the code to VBScript and its easy enough to accomplish in powershell as well.

Disable USB Selective Suspend.zip

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...