I have Windows 7 on Dual boot with Ubuntu 12.04. I have set swap file size to 0 on Windows, therefore hibernation is not possible, at least not to be done right. Sleep is done normally and resuming is instant, too. However, my computer is, by default, set to go on hibernation after 1-2 hours of sleeping.

So, whenever I boot Windows after many hours of sleeping, having apparently been on hibernation, it acts as if it had an unexpected shutdown and gives me options for normal boot or to go on safe mode.Of course, the system is not resumed where I left it, but starts from scratch. If I let it happen many times, it performs a disk checking on startup.

How can I disable the hibernation feature?
Although I set swap file to 0,I saw no setting explicitly giving me the choice to enable or disable the default hibernation setting, so is rational to assume that is is still enabled despite the non-existent swap file, and that causes the problem.

  • Hibernation does not go to swap. It goes to disk. Setting swap to zero will not disable hibernation. – Damon Aug 20 '13 at 9:05
  • 1. Swap IS at disk. 2. As far as I know, data is saved at swap when you hibenate, and is retrieved from there when you wake your system.No? – Noob Doob Aug 21 '13 at 14:52
  • It ,might be a swap file or a swap partition, depending on OS, but the idea is the same. – Noob Doob Aug 21 '13 at 14:55
  • 1. Yes, swap is on the disk. When I said it "goes to swap" I wasn't thinking the physical place, I was thinking the logical place. 2. No, last I checked, the data in memory goes to a file hiberfil.sys. Maybe they changed it though. – Damon Aug 22 '13 at 5:06
  • Perhaps you are right about it, since in the solution below the hiberfil.sys will be deleted. I was apparently missing this detail. I think that I am fully covered as regards my problem and my questions on the matter here. – Noob Doob Aug 22 '13 at 13:56

To Disable Hibernate
NOTE: This step will disable hibernation, delete the hiberfil.sys file, and remove the Allow hybrid sleep and Hibernate after Power Options under Sleep. This will also disable fast startup in Windows 8.
1) Open a Elevated Command Prompt.

2) In the elevated command prompt, type powercfg -h off and press Enter. (see screenshot below)

enter image description here

3) Close the elevated command prompt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.