Disabling USB Selective Suspend via a GPO on Windows 7

I thought I'd written about this earlier, but I searched today and couldn't find it.

My customer has a fidgety business-specific printer that doesn't seem to care for USB selective suspend.  They wanted to turn it off for all of their print machines with a GPO.

Windows includes the PowerCfg.exe tool for configuring power management. 

To Change a single setting in a Windows 7 power plan for AC mode run:
PowerCfg.exe -setacvalueindex (Guid of Power Plan) (Guid of Category) (Guid of Setting) (Value)

To Change a single setting in a Windows 7 power plan for DC/Battery mode run:
PowerCfg.exe -setdcvalueindex (Guid of Power Plan) (Guid of Category) (Guid of Setting) (Value)


My power plan is set to the out-of-box High Performance profile.
I run PowerCfg.exe /L to list the guids of my power plans.
I run PowerCfg.exe /Q to list the categories, settings, and values available in the power plans.

This yields:
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High Performance)
2a737441-1930-4402-8d77-b2bebba308a3  (USB settings)
48e6b7a6-50f5-4782-a5d4-53bb8f07e226  (USB selective suspend setting)


So, for me, to Disable selective suspend on Windows 7 in the High Performance Power plan when plugged in, I run:
Powercfg.exe -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0

I ran ProcMon while running this and found it creates a single registry entry:
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c\2a737441-1930-4402-8d77-b2bebba308a3\48e6b7a6-50f5-4782-a5d4-53bb8f07e226]
"ACSettingIndex"=dword:00000000

... and that's what goes in the GPO.  Magic.

Note: The procedure is different for Windows 7 and XP.  The above is Win7+.  If you need to change it on XP then use the following registry key per MS kb895962

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USB
Entry: DisableSelectiveSuspend
Type: DWORD
Value: 1 disables selective suspend mode. 0 enables selective suspend mode.

Comments

Lewis said…
"Doesn't care for selective USB" lol love it :)
dave said…
Hi There,

I used regshot (freeware) to compare my reg pre- and post of the selective usb suspend.

however my registry wont allow me to edit the dword values.

any suggestion how i can manage to change this reg value?

I need to remotely change some computers in my network and lazy as I am i'd like to do this all at once :)

thanks in advance for your reply.
Hi Dave!

These settings live under Hkey_Local_Machine, so you'll have to be an administrator to edit them. Could that be why you can't edit them?

If this is for a domain you can configure this really easily with group policy preferences power policies. That's really the best way to go.
touch0ph said…
Thank you for the write up! Saved us a lot of work!