4/14/2024

How to set Windows 11 to hibernate automatically (hibernate after)

Just to be clear, Windows has two low-power modes:

Sleep - All non-essential activities and drivers are stopped and the processor goes into power-conservation mode

Hibernate - The current system state is stored to hard drive, and the system powers off

Sleep is enabled OOTB and can be controlled by control panel.

You can enable hibernate from the advanced power settings in control panel.

In Windows 10, you can set the timeout so that after sleeping for a certain duration, the PC automatically hibernates to go to deep power saving.

Windows 11 seems to be missing the UI feature to set that time out and by default it's set to a very long time (like 16 hours)

Here's how to enable hibernate and set the timeouts by the command line.


Open an elevated command prompt (run as administrator)

Enable hibernate:  powercfg /HIBERNATE ON

Query the current hibernate idle settings: powercfg /Q

Look for a section that looks like:


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

  GUID Alias: SCHEME_BALANCED 

  Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20  (Sleep) 


    GUID Alias: SUB_SLEEP 


    Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364  (Hibernate after) 


      GUID Alias: HIBERNATEIDLE 


      Minimum Possible Setting: 0x00000000 


      Maximum Possible Setting: 0xffffffff 


      Possible Settings increment: 0x00000001 


      Possible Settings units: Seconds 


    Current AC Power Setting Index: 0x00000000 


    Current DC Power Setting Index: 0x00000e10


0x00000e10 = 3600 seconds


To set the DC power (battery power) timeout: powercfg /x  hibernate-timeout-dc 60

This will set it to 60 min or 3600 seconds or 0x00000e10 seconds

You can even make it work when on AC power (plugged in): powercfg /x  hibernate-timeout-ac 60 

No comments: