Turn On or Off USB Selective Suspend in Windows 10  

    Turn On or Off USB Selective Suspend in Windows 10

    Turn On or Off USB Selective Suspend in Windows 10

    How to Turn On or Off USB Selective Suspend in Windows 10
    Published by Category: Performance & Maintenance
    08 Dec 2019
    Designer Media Ltd

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


    The USB selective suspend feature allows the hub driver to suspend an individual port without affecting the operation of the other ports on the hub. Selective suspension of USB devices is especially useful in portable computers, since it helps conserve battery power. Many devices, such as fingerprint readers and other kinds of biometric scanners, only require power intermittently. Suspending such devices, when the device is not in use, reduces overall power consumption.

    For more information about USB selective suspend, see:

    This tutorial will show you how to turn on or off USB selective suspend for your power plan in Windows 10.


    Contents

    • Option One: To Turn On or Off USB Selective Suspend Setting in Power Options
    • Option Two: To Turn On or Off USB Selective Suspend Setting in Command Prompt






    OPTION ONE

    To Turn On or Off USB Selective Suspend Setting in Power Options


    1 Open your advanced power plan settings.

    2 Expand open USB settings and USB selective suspend setting, select Enabled (default) or Disabled for what you want, and click/tap on OK. (see screenshot below)

    Turn On or Off USB Selective Suspend in Windows 10-usb_selective_suspend_setting.png





    OPTION TWO

    To Turn On or Off USB Selective Suspend Setting in Command Prompt


    1 Open a command prompt.

    2 Enter the command(s) below you want to use into the command prompt, and press Enter. (see screenshots below)

    (On battery: Enabled) - Default
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1

    OR

    (On battery: Disabled)
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0


    AND/OR


    (Plugged in: Enabled) - Default
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1

    OR

    (Plugged in: Disabled)
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0

    Turn On or Off USB Selective Suspend in Windows 10-usb_selective_suspend_setting_command-dc.png
    Turn On or Off USB Selective Suspend in Windows 10-usb_selective_suspend_setting_command-ac.png


    That's it,
    Shawn






  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Hello @Brink,

    Here is a batch script [ menu based ] for the above if you want to add it to the Tutorial . . .

    Code:
    @echo off
    :: ##########################################################################################################
    :: # Title     : Turn On Or Off USB Selective Suspend                                                       #
    :: # Created By: Paul Black at TenForums.com/members/paul-black.html                                        #
    :: # Created In: November 2020                                                                              #
    :: # Tutorial  : https://www.tenforums.com/tutorials/73187-turn-off-usb-selective-suspend-windows-10-a.html #
    :: ##########################################################################################################
    title Turn On Or Off USB Selective Suspend - Written by Paul Black.
    mode con: cols=80 lines=25 & color 17
    set "params=%*"
    cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /b)
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo  ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo         Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit )
    
    :Options
    echo. & echo  ==============================================================================
            echo  Turn On Or Off USB Selective Suspend.
            echo  ==============================================================================
    echo. & echo  Options:
    echo. & echo  [0] EXIT this Program.
    echo. & echo  [1] On Battery - Enabled [ Default ].
            echo  [2] On Battery - Disabled.
    echo. & echo  [3] Plugged In - Enabled [ Default ].
            echo  [4] Plugged In - Disabled.
    echo. & echo  ==============================================================================
    echo.
    
    CHOICE /N /C 01234 /M ">Enter an Option:"
    if %errorlevel%==5 goto Plugged_Dis
    if %errorlevel%==4 goto Plugged_Ena
    if %errorlevel%==3 goto Battery_Dis
    if %errorlevel%==2 goto Battery_Ena
    if %errorlevel%==1 goto Exit
    goto :Options
    
    :Battery_Ena
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    
    :Battery_Dis
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    
    :Plugged_Ena
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    
    :Plugged_Dis
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    
    echo. & echo  Processing COMPLETE.
    echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit
    :Exit

    Last edited by Paul Black; 24 Nov 2020 at 08:32.
      My Computer


  2. Posts : 7,606
    Windows 10 Home 20H2
       #2

    @Paul Black, the VBScript code in your script can be largely simplified as below:

    Code:
    (Net session >nul 2>&1)&&Goto:#||Echo CreateObject^("Shell.Application"^). ^
    ShellExecute "%~0","✶","","RunAs",1 >"%temp%\(+).vbs"&&"%temp%\(+).vbs"&Exit
    :#
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @Matthew Wai,

    Matthew Wai said:
    @Paul Black, the VBScript code in your script can be largely simplified as below:

    Code:
    (Net session >nul 2>&1)&&Goto:#||Echo CreateObject^("Shell.Application"^). ^
    ShellExecute "%~0","✶","","RunAs",1 >"%temp%\(+).vbs"&&"%temp%\(+).vbs"&Exit
    :#

    The reason I use the code that I do is because it also works on Win Vista, Win 7, and Win 10. I have used the code that you provided [ and a couple of others ] on non Win 10 machines and it opens many many blank cmd windows. Each of these windows needs to be closed with CTRL+C. Therefore the code I use works best across different systems.

    BTW, the code you posted has special characters. Is that correct? . . .
    Turn On or Off USB Selective Suspend in Windows 10-mw-image.jpg
      My Computer


  4. Posts : 7,606
    Windows 10 Home 20H2
       #4

    Yes, I have used a special character.
    I did not know your scripts were run on Windows Vista and 7.
      My Computer


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #5

    Matthew Wai said:
    Yes, I have used a special character.
    I did not know your scripts were run on Windows Vista and Win 7.
    I have always tried to make them as generic as possible, just in case. That way, I don't need to adapt the code for a specific system.
      My Computer


  6. Posts : 1
    W10 / ArchLinux
       #6

    @Paul Black,
    I think there is a bug in your code, I propose to add some (so hated) goto at the end of each option:

    Code:
    @echo off
    :: ##########################################################################################################
    :: # Title     : Turn On Or Off USB Selective Suspend                                                       #
    :: # Created By: Paul Black at TenForums.com/members/paul-black.html                                        #
    :: # Created In: November 2020                                                                              #
    :: # Tutorial  : https://www.tenforums.com/tutorials/73187-turn-off-usb-selective-suspend-windows-10-a.html #
    :: ##########################################################################################################
    title Turn On Or Off USB Selective Suspend - Written by Paul Black.
    mode con: cols=80 lines=25 & color 17
    set "params=%*"
    cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /b)
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo  ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo         Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit )
    
    :Options
    echo. & echo  ==============================================================================
            echo  Turn On Or Off USB Selective Suspend.
            echo  ==============================================================================
    echo. & echo  Options:
    echo. & echo  [0] EXIT this Program.
    echo. & echo  [1] On Battery - Enabled [ Default ].
            echo  [2] On Battery - Disabled.
    echo. & echo  [3] Plugged In - Enabled [ Default ].
            echo  [4] Plugged In - Disabled.
    echo. & echo  ==============================================================================
    echo.
    
    CHOICE /N /C 01234 /M ">Enter an Option:"
    if %errorlevel%==5 goto Plugged_Dis
    if %errorlevel%==4 goto Plugged_Ena
    if %errorlevel%==3 goto Battery_Dis
    if %errorlevel%==2 goto Battery_Ena
    if %errorlevel%==1 goto Exit
    goto :Options
    
    :Battery_Ena
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    echo. Battery Enabled
    goto :Complete
    
    :Battery_Dis
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    echo. Battery Disabled
    goto :Complete
    
    :Plugged_Ena
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    echo. Plugged Enabled
    goto :Complete
    
    :Plugged_Dis
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    echo. Plugged Disabled
    goto :Complete
    
    :Complete
    echo. & echo  Processing COMPLETE.
    echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit
    :Exit
    I will also try to mix this idea with the one in Remove 'USB selective suspend setting' in Power Options in Windows

    Berbigou (it's my first post here, I hope I did nothing wrong)

    - - - Updated - - -

    Here is a mixed tool from this thread and Remove 'USB selective suspend setting' in Power Options in Windows
    Many thanks and credits to Paul Black (Gold Member, 4 star-Guru, VIP Member ! View Profile: Paul Black - Windows 10 Help Forums)

    Code:
    @echo off
    :: ##########################################################################################################
    :: # Title     : Turn On Or Off USB Selective Suspend                                                       #
    :: # Created By: Paul Black at TenForums.com/members/paul-black.html                                        #
    :: # Created In: November 2020                                                                              #
    :: # Modified  : Berbigou                                                                                   #
    :: #           : February 2022                                                                              #
    :: # Tutorial  : https://www.tenforums.com/tutorials/73187-turn-off-usb-selective-suspend-windows-10-a.html #
    :: ##########################################################################################################
    title Turn On Or Off USB Selective Suspend - Written by Paul Black & Berbigou.
    mode con: cols=80 lines=25 & color 17
    set "params=%*"
    cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /b)
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo  ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo         Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit )
    
    :Options
    echo. & echo  ==============================================================================
            echo  Turn On Or Off USB Selective Suspend, Remove or Show 'USB selective suspend'
            echo  	('USB selective suspend' appears in Power Options, see above)
            echo  	(cf https://www.tenforums.com/tutorials/
            echo  	100643-remove-usb-selective-suspend-setting-power-options-windows.html)
            echo  ==============================================================================
    echo. & echo  Options:
    echo. & echo  [0] EXIT this Program.
    echo. & echo  [1] On Battery - Enabled [ Default ].
            echo  [2] On Battery - Disabled.
    echo. & echo  [3] Plugged In - Enabled [ Default ].
            echo  [4] Plugged In - Disabled.
    echo. & echo  [5] 'USB selective suspend' - Enabled.
            echo  [6] 'USB selective suspend' - Disabled [ Default in W10 Family Edition ].
    echo. & echo  ==============================================================================
    echo.
    
    CHOICE /N /C 0123456 /M ">Enter an Option:"
    if %errorlevel%==7 goto Option_Dis
    if %errorlevel%==6 goto Option_Ena
    if %errorlevel%==5 goto Plugged_Dis
    if %errorlevel%==4 goto Plugged_Ena
    if %errorlevel%==3 goto Battery_Dis
    if %errorlevel%==2 goto Battery_Ena
    if %errorlevel%==1 goto Exit
    goto :Options
    
    :Battery_Ena
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    echo. Battery Enabled
    goto :Complete
    
    :Battery_Dis
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    echo. Battery Disabled
    goto :Complete
    
    :Plugged_Ena
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1
    echo. Plugged Enabled
    goto :Complete
    
    :Plugged_Dis
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
    echo. Plugged Disabled
    goto :Complete
    
    :Option_Ena
    REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\2a737441-1930-4402-8d77-b2bebba308a3\48e6b7a6-50f5-4782-a5d4-53bb8f07e226 /v Attributes /t REG_DWORD /d 2 /f
    echo. Option Enabled
    goto :Complete
    
    :Option_Dis
    powercfg -attributes 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 +ATTRIB_HIDE
    echo. Option Disabled
    
    
    :Complete
    echo. & echo  Processing COMPLETE.
    echo. & echo ^>Press ANY key to EXIT . . . & pause >nul
    :Exit
    Berbigou, hope that helps
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #7

    Hello @Berbigou,
    Welcome to TenForums.

    Berbigou said:
    It's my first post here, I hope I did nothing wrong?
    NOT at all. In fact, an excellent first Post.

    This is a Public Forum, therefore any Commands or Scripts [ CMD, PS, BAT, VBS etc ] that are posted are open to being updated, changed, amended, etc.

    At the end of the day, we are all here to try and make EVERYBODY'S computing experience as easy and as smooth as possible.

      My Computer


 

Tutorial Categories

Turn On or Off USB Selective Suspend in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:05.
Find Us




Windows 10 Forums