34

I've tried everything I can think off to turn off hibernation.

I have disabled it in power management, used powercfg -h off and it almost works. It works when I execute the command, but when I reboot the file hiberfil.sys is created again.

How do I do to turn off hibernation and delete the hiberfil.sys file forever?

10 Answers 10

23

You could also try to turn off Hybrid Sleep :

  1. At the command prompt run as administrator, type powercfg.exe /hibernate off
  2. Start menu > type Power options
  3. In the left pane, open the link labeled Change when the computer sleeps and then open the link Change advanced power settings.
  4. Under the Advanced Sleep options, expand the Sleep tree and turn off Hybrid Sleep.
  5. Press OK.
  6. Reboot.

image

4
  • Alreadu tried that, didn't work. Nov 15, 2011 at 11:14
  • I suggest then to (1) Look in all the Sleep branch and turn off everything possible, (2) Try to boot in Safe mode so if this doesn't happen then it is caused by a startup application.
    – harrymc
    Nov 15, 2011 at 12:27
  • that's a good tip to verify that it is a startup application... but it won't solve the problem. Nov 15, 2011 at 12:52
  • If it is really a startup application, then one can use Autoruns to turn them off selectively until finding the guilty one.
    – harrymc
    Nov 15, 2011 at 13:01
18

I don't know if it matters but I always turn it off with the following command:

powercfg -h off

as opposed to:

powercfg /h off
1
  • 1
    Sorry, this was not the issue. It was just a typo. My problem is that I manage to turn it off, but when I reboot it gets activated again. Nov 14, 2011 at 19:53
7

I asked the question at and got the answer here: Microsoft Answers. So here is how you really find what is turning your hibernation back on again using clean boot.

1. Start msconfig.exe
2. On the general tab select "Selective startup" and uncheck "Load startup items".
3. On the services tab unselect all first. 
4. Runt the command "powercfg -h off" to turn off hibernation.
5. Reboot
6. If hibernation is still deactivated start msconfig.exe again and activate half of the services.
7. Repeat 5 and 6 until you find the service causing hibernation to be turned back on (don't forget to do step 4 if it is activated again).
2
  • 2
    Autoruns is much easier to use than msconfig.
    – harrymc
    Dec 27, 2012 at 20:25
  • 1
    +1 for troubleshooting workflow, though I'd substitute with autoruns as per harrymc's comment. Jul 22, 2015 at 5:29
6

Something is turning it back on.

Try running Autoruns to see what is running automatically when you boot.
Is there a program or a scheduled task that does this?

If you don't see anything, run Process Monitor and enable boot logging (remove the filters to avoid filtering out the calls), then look for "hiber" and see/post what you find.

7
  • I don't want to try boot logging again, the last time I did so the computer get into a "permanent" blue screen. I couldn't even boot into safe mode after I activated boot logging with process monitor, but I will check up Autoruns. Nov 14, 2011 at 20:00
  • @TomasJansson: Oh that sucks... do you remember what the error code was? (Either the number or the STATUS_SOMETHING_HAPPENED message would be useful.)
    – user541686
    Nov 14, 2011 at 20:06
  • error code of the bsod? Nov 14, 2011 at 20:07
  • @TomasJansson: Yeah
    – user541686
    Nov 14, 2011 at 20:08
  • I guess you mean "BAD_POOL_CALLER". I'm not 100 % sure that Process Monitor caused it, but I don't want to try it just right now since I don't have the time to set the computer up again if it fails. Nov 14, 2011 at 20:09
6

the easiest way is Microsoft tool to enable hibernate.and Microsoft tool to disable hibernate.you do not have to write any commands.just follow this link please. Enable and Disable hibernate tools

Enable and Disable hibernate tools

Update to the previous answer:
 To make hibernation unavailable, follow these steps:
  * Click Start, and then type cmd in the Start Search box.
  * In the search results list, right-click Command Prompt, and then click Run as Administrator.
  * When you are prompted by User Account Control, click Continue.
  * At the command prompt, type powercfg.exe /hibernate off, and then press Enter.
  * Type exit, and then press Enter to close the Command Prompt window.

To make hibernation available, follow these steps:
 * Click Start, and then type cmd in the Start Search box.
 * In the search results list, right-click Command Prompt, and then click Run as Administrator.
 * When you are prompted by User Account Control, click Continue.
 * At the command prompt, type powercfg.exe /hibernate on, and then press Enter.
  * Type exit, and then press Enter to close the Command Prompt window.
1
  • 2
    That page now says to run powercfg.exe /hibernate off
    – wjandrea
    Dec 12, 2016 at 7:09
4

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.

Follow complete details on this link as Microsoft support

Use following command to turn of hibernation

 powercfg.exe /hibernate off 

and off hybrid sleep setting from Advanced Power Settings.. See the @harrymc answer to where to do this..

If you are having some issues with windows then use Microsoft Fixit. it is nice utility. I was using this with my Genuine Windows XP operating system.

2

Just delete the hiberfil.sys file from C:. As an added advantage you will save a few GB's of disk space too!

5
  • 1
    I don't think you can delete it if hibernation is activated, and the command powercfg -h off will turn off hibernation and delete the file. The problem is that when I reboot hibernation is re-enabled for some reason. Nov 15, 2011 at 11:15
  • well, I have a dual boot PC with Win7 and Ubuntu, and deleted hiberfil.sys with ubuntu. from that onwards i don;t have hibernate option on Win7. Nov 15, 2011 at 11:20
  • I can't, for some reason it says that the file is in use and I can't delete it that way. How ever, it works to delete it using the powercfg -h off, but it doesn't solve my problem. Nov 15, 2011 at 11:40
  • since you have already tried a lot of things, try to delete that file using some other OS (a linux live cd, if you wish). I don't know it will work or not, but give it a try. Nov 15, 2011 at 11:44
  • I will try that when I get home. It is a MacBook with dual boot, so I can just try to delete it from my OSX partition. Nov 15, 2011 at 11:58
2

To make hibernation unavailable, follow these steps:

  • Click Start, and then type cmd in the Start Search box.
  • In the search results list, right-click Command Prompt, and then click Run as Administrator.
  • When you are prompted by User Account Control, click Continue.
  • At the command prompt, type powercfg.exe /hibernate off, and then press Enter.
  • Type exit, and then press Enter to close the Command Prompt window.

To make hibernation available, follow these steps:

  • Click Start, and then type cmd in the Start Search box.
  • In the search results list, right-click Command Prompt, and then click Run as Administrator.
  • When you are prompted by User Account Control, click Continue.
  • At the command prompt, type powercfg.exe /hibernate on, and then press Enter.
  • Type exit, and then press Enter to close the Command Prompt window.
0

I create shortcut to turn it off without hibernation:

shutdown /s /t 0

How to create shortcut instruction

0

can't comment because stackoverflow/stackexchange/superuser/etc are all different systems and my rep is sometimes too low to comment. however, please read:

For anyone that is having issues with a power setting in windows being re-enabled after an update (or worse, every reboot due to some sneaky M$ application that hates us all), we have the power and final say. In my case, I am having the dreaded "Windows updates/reboots but gets stuck in hybrid sleep and can't leave BIOS splash screen without manual shutoff using power button". The solution was to disable both Hibernation AND Fast Boot. Problem is, these settings could technically be re-enabled by an update, which makes my PC hang again if I am away during an update (and subsequent auto-reboot). My approach is to just accept that M$ wants to screw everything up from time to time without actually fixing it...and go around them.

I created a batch script that runs the powercfg /H OFF command, then give a copy of that script to the GPM Shutdown Scripts folder (making it owned and run by administrator), and adding that script to the list of scripts to be run at system shutdown.

If anything re-enabled hibernation/fast-boot, simply going through the ACPI shutdown procedure just causes it to get disabled again just before flipping over the power state (regardless if anyone was logged in, and regardless of a restart or a full shutdown).

Once you verify that the Hibernation & Windows Fast Boot options no longer appear under advanced power settings (Control Panel\Hardware and Sound\Power Options > Choose what the power buttons do - Shutdown settings), you can use whatever measure you like to manually delete the Hiberfil.sys to reclaim disk space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .