How to disable and re-enable hibernation on a computer that is running Windows

Applies to: Windows 10, version 1809Windows Server 2019, all versionsWindows Vista Business More

Introduction


This article describes how to disable and then re-enable hibernation on a computer that is running Windows.

Warning You may lose data if you make hibernation unavailable and a power loss occurs while the hybrid sleep setting is turned on. When you make hibernation unavailable, hybrid sleep does not work.

More Information


The Hiberfil.sys hidden system file is located in the root folder of the drive where the operating system is installed. The Windows Kernel Power Manager reserves this file when you install Windows. The size of this file is approximately equal to how much random access memory (RAM) is installed on the computer.

The computer uses the Hiberfil.sys file to store a copy of the system memory on the hard disk when the hybrid sleep setting is turned on. If this file is not present, the computer cannot hibernate.

Resolution


To make hibernation unavailable, follow these steps:

  1. Press the Windows button on the keyboard to open Start menu or Start screen.
  2. Search for cmd. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate off, and then press Enter.
  5. Type exit, and then press Enter to close the Command Prompt window.

To make hibernation available, follow these steps:

  1. Press the Windows button on the keyboard to open Start menu or Start screen.
  2. Search for cmd. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate on, and then press Enter.
  5. Type exit, and then press Enter to close the Command Prompt window.