Windows Hibernate enable / disable

Across operating systems, “hibernate” is a power-saving state that saves the current session to disk and powers down the computer, allowing for a quick resume later while not having the long-term battery drain of suspend mode that keeps the RAM powered. Sometimes as part of diagnosing problems or ensuring that a remote computer stays powered on, hibernate might be disabled. If restoring such a computer to personal use, or if experiencing issues where a laptop computer has a drained battery after a couple days of non-use, it may be useful to enable hibernate mode.

Check the current state of hibernate mode by running the following command in Windows Terminal:

powercfg /availablesleepstates

If hibernate is enabled, the output will include “Hibernate” in the list of available sleep states. To enable hibernate mode:

powercfg /hibernate on

However, the option in Control Panel → Power Options → Change plan settings → Change advanced power settings → Sleep → “Hibernate after” may not be available until making the following registry change:

REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\9d7815a6-7ee4-497e-8888-515a05f02364 /v Attributes /t REG_DWORD /d 2 /f

Reboot.

Enable the hibernate timer setting, where the values are in minutes:

powercfg /setACvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 43200
# 12 hours hibernate while plugged into AC power (or set to 0 for never)

powercfg /setDCvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 10800
# 3 hours hibernate while on battery (or set to 0 for never)

powercfg /setactive SCHEME_CURRENT
# Set the current power scheme to apply changes