How to Change Default Lid Close Action in Windows 10  

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 3
    win10
       #10

    Tried it two ways: Ran the script/shortcut+restart and made the change manually+restart (option 3 and 1)

    After running the script and restarting, the setting stuck at Do Nothing (display and behavior)... at least until policy resets it again in <1hr.
    After a manual change, the setting also stayed at Do Nothing (display and behavior).

    (But... It defeats the purpose if i have to reboot to get my 'please dont turn off!' action to work ;) )

    wonder if there's a way to 'apply' or 'activate' after making the change, maybe /SETACTIVE on the current scheme?? Will investigate once i get reset...
      My Computer


  2. Posts : 62,234
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #11

    slakr said:
    Tried it two ways: Ran the script/shortcut+restart and made the change manually+restart (option 3 and 1)

    After running the script and restarting, the setting stuck at Do Nothing (display and behavior)... at least until policy resets it again in <1hr.
    After a manual change, the setting also stayed at Do Nothing (display and behavior).

    (But... It defeats the purpose if i have to reboot to get my 'please dont turn off!' action to work )

    wonder if there's a way to 'apply' or 'activate' after making the change, maybe /SETACTIVE on the current scheme?? Will investigate once i get reset...
    /SETACTIVE is normally required to apply in the steps.

    You could create a BAT file to use with all of the needed commands on your desktop instead of the shortcut to help make it easier.
      My Computers


  3. Posts : 3
    win10
       #12

    Yep, that worked... and a quick review of your guide said as much, multiple times. facepalm
    thanks
      My Computer


  4. Posts : 62,234
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #13

    slakr said:
    Yep, that worked... and a quick review of your guide said as much, multiple times. facepalm
    thanks
    No worries. I'm just glad you have a working solution.
      My Computers


  5. apb
    Posts : 94
    win 7 64bit
       #14

    My problem is that the control panel ui for setting the lid action does not include hibernate as one of the options, even though hibernate is in fact enabled and a hibernate time is set in power options. Group policy editor does offer me this option, and that does appear to work, but I am confounded as to why the standard control panel ui does not offer it when group policy is not configured. Also, the actual result of closing the lid does not seem consistent, i.e. sometimes it hibernates the machine, sometimes it apparently does not.

    (This is on a Dell xps15 9500 laptop. win10 20h2 latest as of 0600pdt today.)

    It would help me to troubleshoot this if, once I know the power plan guid, you could tell me where the lid setting is located in the registry. If it's part of some giant binary value as is ms's wont, maybe you know which bytes are which?

    Thanks.

    --peter

    - - - Updated - - -

    Update. It turns out a reboot fixed my problem. But... I still need to figure out what caused it in the first place. For example, I have a backup script that turns hibernation off, does the backup, then turns it back on. (i.e., powercfg /h on|off). So, I'd still like to know the registry key. Thanks.

    --peter
      My Computers


  6. Posts : 23
    All Windows Versions
       #15

    Just an FYI
    this is what we use for the Lid Close action, it run in our setup scripts

    ********************************
    ECHO Lid Close Action

    powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2
    powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2
    powercfg -setdcvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    powercfg -setacvalueindex a1841308-3541-4fab-bc81-f71556f20b4a 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2
    powercfg -setdcvalueindex a1841308-3541-4fab-bc81-f71556f20b4a 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2


    powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2
    powercfg -setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2
    powercfg -SetActive SCHEME_CURRENT
      My Computer


  7. apb
    Posts : 94
    win 7 64bit
       #16

    Thanks, but I'm looking for the registry location of the setting value, not for the powercfg command that sets it.
      My Computers



  8. Posts : 62,234
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #17

    apb said:
    Thanks, but I'm looking for the registry location of the setting value, not for the powercfg command that sets it.
    Hello,

    The registry key location for this setting is:

    (Balanced)
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\381b4222-f694-41f0-9685-ff5bb260df2e\4f971e89-eebd-4455-a8de-9e59040e7347\5ca83367-6e45-459f-a27b-476b1d01c936

    (Power saver)
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\a1841308-3541-4fab-bc81-f71556f20b4a\4f971e89-eebd-4455-a8de-9e59040e7347\5ca83367-6e45-459f-a27b-476b1d01c936

    (High performance)
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c\4f971e89-eebd-4455-a8de-9e59040e7347\5ca83367-6e45-459f-a27b-476b1d01c936

    (Ultimate Performance)
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\e9a42b02-d5df-448d-aa00-03f14749eb61\4f971e89-eebd-4455-a8de-9e59040e7347\5ca83367-6e45-459f-a27b-476b1d01c936
      My Computers


  9. apb
    Posts : 94
    win 7 64bit
       #18

    Aha, thanks! Actually, I created a custom power scheme that may or may not be identical to ultimate performance, but I think I will be able to go from there, just finding the right guid in the parent key.

    BTW, my problem with the UI for setting the button and lid action continues to occur, so I'm still working on finding the source of the problem. Also, hibernation does not seem to happen as promised. Some of this, I suspect, is not so much the fault of Windows as it is some bugginess in the laptop firmware or Dell's power management.

    --peter

    Update: It seems that hibernation will not happen if "sleep" is set to 'never'. (In this case, "sleep" means "modern standby")
    Last edited by apb; 27 Jun 2022 at 18:52.
      My Computers


  10. Posts : 11,958
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #19

    apb said:
    Update: It seems that hibernation will not happen if "sleep" is set to 'never'. (In this case, "sleep" means "modern standby")
    If this command says you have S0 Modern standby [aka S0 Low power idle] then it will also say that you do not have S3 Sleep, which is what people normally mean when they refer to "sleep".
    Code:
    PowerCfg -a

    S0 Modern standby is an idle condition not a sleep state.

    S0 Modern standby kicks in as soon as your Power options turns off your monitor.

    S0 Modern standby is a curse but it does not affect your ability to use hibernation. Whatever is causing your problem, it is not that.


    There are, in effect, four Power/Computer states for an S0 Modern standby [aka S0 Low power idle] computer
    - Computer on, Monitor on {Work can be done on the computer}
    - Computer on, Monitor off = S0 {The monitor turning off initiates S0 Modern standby i.e. idle}. S0 progressively shuts down user-initiated processes. No user-desired activities start, only MS-desired ones such as WU & their built-in email app.
    - Hibernate
    - Off


    All the best,
    Denis
      My Computer


 

Tutorial Categories

How to Change Default Lid Close Action 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 15:04.
Find Us




Windows 10 Forums