How to really turn off hibernation in Windows 7

33

6

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?

Tomas Jansson

Posted 2011-10-18T12:36:00.890

Reputation: 805

Answers

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).

Tomas Jansson

Posted 2011-10-18T12:36:00.890

Reputation: 805

1+1 for troubleshooting workflow, though I'd substitute with autoruns as per harrymc's comment. – matt wilkie – 2015-07-22T05:29:46.083

2Autoruns is much easier to use than msconfig. – harrymc – 2012-12-27T20:25:30.313

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

harrymc

Posted 2011-10-18T12:36:00.890

Reputation: 306 093

Alreadu tried that, didn't work. – Tomas Jansson – 2011-11-15T11:14:17.453

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 – 2011-11-15T12:27:22.377

that's a good tip to verify that it is a startup application... but it won't solve the problem. – Tomas Jansson – 2011-11-15T12:52:24.417

If it is really a startup application, then one can use Autoruns to turn them off selectively until finding the guilty one.

– harrymc – 2011-11-15T13:01:14.543

17

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

joeqwerty

Posted 2011-10-18T12:36:00.890

Reputation: 5 259

1Sorry, 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. – Tomas Jansson – 2011-11-14T19:53:16.663

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.

user541686

Posted 2011-10-18T12:36:00.890

Reputation: 21 330

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. – Tomas Jansson – 2011-11-14T20:00:57.953

@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 – 2011-11-14T20:06:28.967

error code of the bsod? – Tomas Jansson – 2011-11-14T20:07:55.563

@TomasJansson: Yeah – user541686 – 2011-11-14T20:08:50.370

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. – Tomas Jansson – 2011-11-14T20:09:37.920

@TomasJansson: Oh I see, yeah that's the message I was referring to. Curious to see what might've caused it... will do some searches online. – user541686 – 2011-11-14T22:22:36.170

@Mehrdad: Spare yourself the work, to get more information on pool-related crashes you need to use Driver Verifier to identify what driver is incorrectly accessing the pool. In the crash itself one is unlikely to find out the cause of the crash. Given that this occurs early in the boot there must be some serious interference between one of his drivers and the Process Monitor driver... – Tamara Wijsman – 2011-11-16T11:40:54.360

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.

ashraf mohammed

Posted 2011-10-18T12:36:00.890

Reputation: 189

2That page now says to run powercfg.exe /hibernate off – wjandrea – 2016-12-12T07:09:24.427

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.

Niranjan Singh

Posted 2011-10-18T12:36:00.890

Reputation: 1 653

2

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

Vineet Menon

Posted 2011-10-18T12:36:00.890

Reputation: 698

1I 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. – Tomas Jansson – 2011-11-15T11:15:35.033

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. – Vineet Menon – 2011-11-15T11:20:16.057

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. – Tomas Jansson – 2011-11-15T11:40:10.957

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. – Vineet Menon – 2011-11-15T11:44:06.467

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. – Tomas Jansson – 2011-11-15T11:58:22.637

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.

ashraf mohammed

Posted 2011-10-18T12:36:00.890

Reputation: 189

0

I create shortcut to turn it off without hibernation:

shutdown /s /t 0

How to create shortcut instruction

Eugen Konkov

Posted 2011-10-18T12:36:00.890

Reputation: 413