Hibernation - Enable or Disable

ByLine
How to Enable or Disable Hibernation in Vista
Synopsis
This will show you how to enable or disable Hibernate in Vista. This can be easily done if you accidentally wiped out the hiberfil.sys file Cleaner in Disk Cleanup.
How to Enable or Disable Hibernation in Vista

information   Information
If you accidentally wiped out the Hibernation file Cleaner in Disk Cleanup and caused your hybrid sleep or hibernate mode to stop working, then you accidentally disabled the hiberfil.sys file. By default, the size of the hiberfil.sys file is 75% of the total amount of installed RAM (memory) when hibernate is enabled in Vista.

For more information, see: Microsoft Help and Support: KB929658 and Microsoft Help and Support: KB928897

Note   Note
If you cleaned (disabled) this, all Hybrid and Hibernate settings will also be removed from the Advanced Power Options window. You will still be able to use normal Sleep mode though.

Tip   Tip
To set your computer to either use or not use Hybrid or Hibernate sleep mode, make sure that the Power Plan Options in steps 7 and 8 in STEP TWO here: How to Troubleshoot a Vista Sleep Mode Problem and Find a Solution, then either enable (use) or disable (not use) hibernation below.






METHOD ONE
Using an Elevated Command Prompt

2. Click on Continue in the UAC prompt.​
3. To Enable or Restore the Hibernation File
A) In the elevated command prompt, type powercfg -h on and press Enter. (See screenshot below step 4)​
B) Set the recommended settings for Hibernation in STEP TWO here.​
C) Go to step 5.​

4. To Disable or Remove the Hibernation File
NOTE: Using Disk Cleanup in METHOD TWO below is another way to disable or remove the hibernation file.​
A) In the elevated command prompt, type powercfg -h off and press Enter.​

5. Close the elevated command prompt when it is finished.​
NOTE: The Hibernation File Cleaner is now added back or removed from Disk Cleanup and the hibernate sleep mode is enabled or disabled again.​
Command_Prompt.jpg




METHOD TWO
Using Disk Cleanup

2. To Disable or Remove the Hibernation File
A) Check the Hibernation File Cleaner box and click OK. (See screenshot below)​
Disk_Cleanup.jpg

B) Click on Delete Files to confirm. (See screenshot below)​
NOTE: Disk Cleanup will now delete the Hibernation file and close.​
Confirmation.jpg


That's it,
Shawn






 
Last edited by a moderator:
Shawn Brink

Comments

Is there any way to bring hibernation back if that hiberfil.sys file gets deleted, accidentally or on purpose? Short of a complete reinstall?
 
Hmmm. SFC is a good idea.

I ask because I'm currently doing some research on this for a problem I have with hibernation, and have read that Windows puts that file in a reserved space at the beginning of your installation partition. So I got the impression that if it gets deleted (and then replaced by other files, since the whole point is to free up some space) that it couldn't be set back up since those other files would be taking up that space it needs. So I'm curious about if I'm right about that or if it can be put anywhere on the partition, or if once you delete it you're just out of luck.

I don't actually have this problem though, so I can't test out your SFC idea. Darn :)
 
Is there any way to bring hibernation back if that hiberfil.sys file gets deleted, accidentally or on purpose? Short of a complete reinstall?
Hello Adam,

The hiberfil.sys file is only the file where memory is stored at when the system goes into hibernation. To restore it, you would just need to disable and enable hibernation to reset it. Afterwards, it will be restore the next time the system goes into hibernation. :)
 
Oh ok, thanks Brink. I didn't think it would be that easy. It must have much less stringent rules for using it than the darn page file does.

And thanks to Yard Dog and Rich for the info about extracting the files, I had no idea you could do that!
 
You're most welcome Adam.

Nar, you could pretty much do the same with the page file except it requires a restart after each off/on. :)
 
Well I'll be darned. Here I was thinking that these two files could hardly be looked at without causing some sort of system failure.
 
Top