Converted Windows 7 to UEFI, now fails to do hybrid sleep

1

I have two hard drives, 3TB and 2TB. 2TB drive uses MBR, 3TB uses GPT. My Windows 7 OS is installed in the 2TB hard drive. I wanted to try out Elementary OS so I installed it on the 3TB drive in UEFI mode. Now I wanted to boot into Windows but the then I saw my Windows 7 boots in legacy BIOS. So I converted my 2TB drive without nuking my whole drive using gdisk. After that I followed the steps in this guide:

http://www.hasper.info/repair-a-destroyed-windows-7-uefi-boot-sector/

to build my Windows 7 EFI system partition (ESP) and the Microsoft Reserved Partition (MSR). Windows 7 UEFI boot success.

I have two problems, which may or may not be connected. bcdedit does NOT work unless I manually specify the location of the BCD store; which involves mounting the EFI system partition. The error shown is:

The boot configuration data store could not be opened.
The volume for a file has been externally altered so that the opened file is no longer valid.

So I mounted the EFI system partition and used bcdedit to fix my strange Vista loader.

bcdedit /store R:\EFI\Microsoft\Boot\BCD /set {default} locale en-US

I digress.

Now, the main problem. Hybrid sleep does not work (yes, before I did the bcdedit commands.) It simply goes straight to my user lock screen. I am thinking this may have to do with Windows not being able to access the BCD.

Because according to the Windows Vista startup process, the BCD should have an option to resume from hibernation (yes, I do know the difference between sleep and hibernation.) And apparently the windows boot loader should have a path to winresume.efi.

Please correct me if my thinking is wrong.

I turned on hibernate powercfg -h on, change the hiberfil.sys to 100% my RAM (8gb) powercfg -h -size 100. Here's the result of powercfg -a

The following sleep states are available on this system: Standby ( S3 ) Hibernate Hybrid Sleep
The following sleep states are not available on this system:
Standby (S1)
        The system firmware does not support this standby state.
Standby (S2)
        The system firmware does not support this standby state.

I really miss this feature as it's a heck of a lot more convenient than restarting. I'm also a pretty poor guy, so nothing about reinstalling my W7 installation would be nice.

pinix

Posted 2016-04-22T05:07:04.307

Reputation: 13

Answers

-1

although this might not help the original poster - after quite some frustration and time I figured it out. By all accounts, it seems that for UEFI in general, and even more for hibernation on UEFI, Windows needs certain bios/uefi features enabled, in addition to the partition layout. Most of these are well documented, but what I found less well documented is the fact that for hibernation to work, Windows Boot Manager needs to be at the top of the boot priority list. With a dual boot or other combination, it is likely that another partition/boot manager is at the top. After I switched the Windows Boot Manager to the top position, hibernation worked again. If it does not, check the other requirements for UEFI boot, though if Windows generally boots they should be met.

step21

Posted 2016-04-22T05:07:04.307

Reputation: 1

Hybrid sleep and hibernation are not necessarily the same thing. Are you sure this is a solution to the question actually posed? – music2myear – 2017-06-12T23:09:05.157

Yes, I am sure. Of course other things can be wrong too, but one thing that was hard to find is that the boot order has to be correct. I didn't want to say hibernation and hybrid-sleep are the same, but for hybrid sleep similar requirements with regard to bios settings apply. – step21 – 2017-06-14T01:40:39.220