I’ve got a Tumbleweed distro installed and working okayish but when I use the Opensuse boot manager it prevents windows resuming from hibernate. I’ve got Grub2-efi set to auto-boot Windows , so it never actually passes into OpenSUSE but it still stops Windows resuming from hibernate. If I set the Windows Boot Manager (instead of Opensuse) as priority in my UEFI however it resumes from hibernate fine. Seems like there’s some kind of problem with loading from GRUB2-efi into Windows. The Grub2 menu is setup by using the Yast auto-setup with the option to scan for other operating systems.
(I’m using Windows 8.1 Pro for reference but I suspect this is an issue with all EFI Windows).
(Obviously I’m not going to hibernate or shutdown with fastboot enabled and then go into Opensuse since that might cause issues)
I’ve never tried that, mostly because I tend to think of hibernating as an ugly hack. Also, I don’t much use Windows 8.1 on this box anyway. But let me make a wild guess:
The EFI boot entry for Windows uses “\EFI\Microsoft\Boot\bootmgfw.efi”, but it also passes that efi program a parameter which has something to do with the Windows BCD (boot configuration database).
The grub2-efi entry for Windows uses the same efi program, but it does not pass that program a parameter. Maybe Windows needs that parameter to restore from hibernation.
I suppose that it is a linux bug, that it does not pass that parameter to the windows boot manager.
On the other hand, it is possible within Windows to set bootnext – the next system to be booted. I think you can set that with the BCDEDIT command. I suppose that it is a Windows bug that it does not automatically set that to next boot Windows as part of hibernating. But you could probably create a Windows .CMD script to set it. Then call that script just before you hibernate.
It puts an entry about not being able to resume from hibernate into the event log with the generic error code and then it boots as if from a hard shutdown.
I don’t know if this is what you are doing
But it’s always been taboo to hibernate windows, then boot Linux, I guess for similar reasons it is also highly reported on and solutions given to disable the quick boot in the windows power settings, that actually prevents windows from properly powering off.
I’m not booting Linux though. I’m hibernating windows and then restarting which passes through the opensuse bootloader (grub2-efi) on it’s way to booting windows , which stops me from resuming from hibernation (and since it uses the same mechanism it also stops fastboot working) even though I at no point go into Linux.
I’m just so in the habit of only powering off windows, if I ever boot it, I never actually use it in the sense of use/work with, I just on rare occasions may have to boot it.
And if I were going to do anything related to what you are doing, my choice would be suspend, as that doesn’t involve the bootloader.
I quite simply would never hibernate, lest I forgot and shifted to openSUSE from the grub menu of a hibernated windows.
That’s just the way I do things
Sounds like windows does work well with other OS’s
I wonder how another lInux distro would be with hibernation etc… scenario
What Neil suggested may be correct - we miss necessary arguments for Windows bootloader. One more possibility is, Windows modifies arguments on the fly.
Could you
boot and shutdown Windows normally
collect “efibootmgr -v” output from Linux
boot and hibernate Windows
collect “efibootmgr -v” output from Linux again
so we can see if there is any change.
If you are willing to test patches, I can create GRUB command that is using exact binary and arguments as specified in EFI boot menu. If it helps, we can then think about how to integrate it.
I expect it to work, at least as long as hibernation does not involve system firmware. You load another Linux kernel/initrd, it looks for hibernation image and loads it. As long as you did not touch filesystems in between everything should be OK.
If hibernation requires platform firmware support, and you booted into another Linux instance in between, firmware probably “forgets” about hibernation attempt, so resume likely fails.
I’d be happy to get that information and test for you. However it will probably have to wait until tomorrow. I’m in the middle of setting up a new phone at the moment.
I finally return to this issue (apologies, my OpenSUSE install at the time had many other issues (primarily with LAN / WiFi drivers but also sleep/suspend/hibernate) that made using it really frustrating so I gave up. Those issues have all been resolved now, so I’ll get back to this.
You can find the EFIBootMgr -v output for Full Shutdown, Fast boot Shutdown and Resume from Hibernate attached.
Unfortunately the EFI output for all seem to the same. Interestingly I returned to the Windows Boot Manager after dumping the Hibernate one and Hibernate resumed normally (which I realize is dangerous, I wasn’t expecting that outcome) it’s only passing through GRUB-EFI2 to Windows that causes the problem (as I passed through GRUB-EFI2 to return to Windows after the Fast Boot shutdown, and it triggered the error).