Why can't I use the BIOS after a Windows hibernation?


Recommended Posts

So I read this blog post, and apparently when you Hibernate Windows, it doesn't actually turn the computer off.  It doesn't go into S5 (fully off), it goes into S4 (so close to fully off that we will just pretend it's fully off)  It also prevents you from loading the BIOS setup options, or the boot selection dialog, when you turn on the system.  Somehow Windows is setting a flag in the BIOS that forces it to boot only from the Windows hard drive/partition.  

 

However, that blog post says you can get around this limitation by pulling the power cord/battery and pressing and holding the power button to empty the capacitors or whatever, to fully turn off the system, and apparently the hibernation is unaffected and still works just fine.  Well I hibernated my Windows 8.1 system, and then I turned the power switch on the PSU off and pulled the cord (desktop PC, not a laptop).  Sure enough the light on my motherboard was still on, and the lights on my network ethernet port were still blinking.  For a solid 5 minutes.  Those must be some damn efficient capacitors in my system to be able to power my motherboard and NIC for 5 minutes without any power source, unless they're using the CMOS battery.  I gave up waiting on the residual power to empty, and I pressed the power button.  The fans spun for a split second like the computer was going to try and turn on, and then gave up.  I held the power button for another good 30 seconds.  Confident that I had now emptied all residual power and totally turned the computer off, I then plugged the power cord back in and turned it on.  I was still not able to access the BIOS!  The BIOS post messages appeared, but the "Press DEL to enter setup" message was missing, pressing 'del' did nothing, and the POST went by much faster than usual, skipping the USB device tests and checks, and the Windows 8 hibernation restored just fine.

 

So what if I want to be able to hibernate my Windows system, then boot onto my Linux partition to work on something or check something, and then reboot and restore the Windows hibernation?  Windows has decided that is impossible!  I can do it the other way around, because Linux does not have this limitation.  If I hibernate my Linux OS, and reboot, I am able to access the BIOS, boot to Windows, reboot, and then restore the Linux hibernation.  But Windows is somehow editing my BIOS!  Wtf?!

Link to comment
Share on other sites

As I understand, Windows is not editing your BIOS.  It's taking advantage of a feature that allows faster restoration from a seemingly off configuration.  The configuration is stored in the volatile storage space (CMOS configuration) and held there by the motherboard CMOS battery.  You could check your BIOS settings to see if you can change the S4 state off (disable) and then Windows go old school.  

 

Regarding the LAN lights, etc. after you pull the plug... you didn't disconnect the power supply from the motherboard, and the PS is the one supplying power to the motherboard in this state.  And yes, the PS does have large power capacitors.  In my case, my computer will usually stay on (without the benefit of a UPS) when the light flicker.  Nice power supply! :)

Link to comment
Share on other sites

Maybe Windows doesn't want you to modify any settings in the BIOS which could potentially cause any problems for it when it resumes from hibernation again.

 

I noticed it's always done this on my Asus board that has AMI BIOS. I assumed it was the "ATK0110 ACPI UTILITY" that I install (to be able to allow my computer to hibernate when I re-install windows), that could possibly allow Windows to interact with the BIOS? (or perhaps it just simply handles ACPI states, I don't know?).

 

I do understand your frustration that you should be allowed to at least select another boot device, however, it might as well allow access to the BIOS again, as what if you wanted to modify a BIOS setting before booting into Linux?

 

I've personally never had the time to research this as I've never been in the situation of hibernating then switching to another OS.

 

As for draining the power, try switching the switch on the back of the PSU off (if you have one), or pulling the cord, then plugging in a USB device such as a desk fan or similar?

Link to comment
Share on other sites

Linux only have sleep state as far as I know. Hibernation is very different. With sleep the device is just powered down with limited power usage and is still on. RAM still have power to preserve data. With hibernation the RAM is stored on the disk (hiberfile.sys) and the PC is turned off.

 

Changing BIOS settings while a the machine is in hibernation would make the system unstable and potentially crash.

 

edit: there is also hybrid sleep, which is the two combined. Here is an article on it: http://www.howtogeek.com/102897/whats-the-difference-between-sleep-and-hibernate-in-windows/

Link to comment
Share on other sites

Linux only have sleep state as far as I know. Hibernation is very different. With sleep the device is just powered down with limited power usage and is still on. RAM still have power to preserve data. With hibernation the RAM is stored on the disk (hiberfile.sys) and the PC is turned off.

 

Changing BIOS settings while a the machine is in hibernation would make the system unstable and potentially crash.

 

edit: there is also hybrid sleep, which is the two combined. Here is an article on it: http://www.howtogeek.com/102897/whats-the-difference-between-sleep-and-hibernate-in-windows/

I know exactly what sleep/suspend, hibernation, and hybrid sleep are.  I am running Lubuntu.  It has hibernation.  I don't know if it names the file hiberfil.sys, but it definitely saves the RAM to a file on the HDD so that it can power off the computer, instead of using a small amount of power like sleep mode.  

 

https://help.ubuntu.com/community/PowerManagement/Hibernate

 

Windows, unlike Linux, uses a small amount of power in hibernation mode as well.  Not as big as sleep mode, but the only OS that completely turns off the computer and uses 0 watts after hibernating is Linux (or possibly Mac, but I don't go near that stuff).

Link to comment
Share on other sites

Doing further reading, it appears that there are two types of hibernation, only one of which actually turns off the computer:

 

 

There are two modes of 'kernel' hibernation: platform and shutdown. If one does not work, you can try the other:

sudo -secho platform > /sys/power/diskecho disk > /sys/power/state

Or:

sudo -secho shutdown > /sys/power/diskecho disk > /sys/power/state

Platform is the default and recommended mode of hibernation. Unfortunately, the "platform" mode of hibernation does not work on some systems with broken BIOSes. In such cases the "shutdown" mode of hibernation might work.

 

I think because I'm using Lubuntu, not Ubuntu (for which the quoted article was written), Lubuntu is defaulting to the 'shutdown' hibernation mode, which is why I can still access the BIOS afterwards.

 

Apparently most newer BIOSes check for some kind of flag, ACPI probably, that the OS sets to tell the BIOS that the system has been hibernated, not shut down.  But Linux has the ability to hibernate on even older BIOSes that have never heard of hibernation, and do not check for the flag.

Link to comment
Share on other sites

Almost all ACPI compliant systems are capable of at least three states of power management: 1. Full shutdown. 2. Hybrid sleep (name for this varies from OS to OS) and 3. Normal sleep. Any modern OS, be it Linux, Windows or OSX are capable of all three and will usually default to either 2 or 3 when the sleep command is issued. Hybrid sleep is the default for the Hibernate command in Windows for example, which will save the contents of RAM to disk and power down the machine while keeping certain components (such as RAM) powered. In this state when the machine is powered on by the user, the system is restored from RAM and thus appears where you left off instantaneously. If the machine loses power while in the hybrid state, then the machine will boot normally and the OS will restore from the saved state on the hard disk. This is the case on all three major operating systems I mentioned above.

 

In the case of Linux and older versions of Windows, hibernation was possible on almost any hardware even if it didnt fully support the latest power management modes. In this case the OS would save the contents of RAM to disk and power off the system completely. When the machine was powered on it would restore from the hard drive where it left off.

 

In the OP's case it sounds like the PSU's capacitors are able to keep supplying the system with enough power to keep components like RAM, ethernet etc powered for a short time even after the power has been physically cut off, thus the machine doesnt leave the hyrbid sleep and state and explains why it skips the normal BIOS POST when he powers on. If you were to disconnect the power until the capacitors completely discharge, the machine would POST as normal and you would be able to enter cmos setup as you normally would. When you booted the OS, it would restore from the hibernate file on the hard drive as opposed to RAM as it usually would. In hybrid sleep the hard drive is more of a fail safe boot method in the event power is lost completely.

 

I hope this clears up some questions. I could of gone into the way OSX manages power too but thats a little OT for this forum me thinks :)

Link to comment
Share on other sites

Almost all ACPI compliant systems are capable of at least three states of power management: 1. Full shutdown. 2. Hybrid sleep (name for this varies from OS to OS) and 3. Normal sleep. Any modern OS, be it Linux, Windows or OSX are capable of all three and will usually default to either 2 or 3 when the sleep command is issued. Hybrid sleep is the default for the Hibernate command in Windows for example, which will save the contents of RAM to disk and power down the machine while keeping certain components (such as RAM) powered. In this state when the machine is powered on by the user, the system is restored from RAM and thus appears where you left off instantaneously. If the machine loses power while in the hybrid state, then the machine will boot normally and the OS will restore from the saved state on the hard disk. This is the case on all three major operating systems I mentioned above.

 

In the case of Linux and older versions of Windows, hibernation was possible on almost any hardware even if it didnt fully support the latest power management modes. In this case the OS would save the contents of RAM to disk and power off the system completely. When the machine was powered on it would restore from the hard drive where it left off.

 

In the OP's case it sounds like the PSU's capacitors are able to keep supplying the system with enough power to keep components like RAM, ethernet etc powered for a short time even after the power has been physically cut off, thus the machine doesnt leave the hyrbid sleep and state and explains why it skips the normal BIOS POST when he powers on. If you were to disconnect the power until the capacitors completely discharge, the machine would POST as normal and you would be able to enter cmos setup as you normally would. When you booted the OS, it would restore from the hibernate file on the hard drive as opposed to RAM as it usually would. In hybrid sleep the hard drive is more of a fail safe boot method in the event power is lost completely.

 

I hope this clears up some questions. I could of gone into the way OSX manages power too but thats a little OT for this forum me thinks :)

 

Okay, you're wrong about a few things.  There are five sleep states, not three.  And I am not using hybrid sleep!  That's the second time I've said that.  Windows is not saving the RAM to disk while at the same time asking the PSU to keep the RAM powered for a quicker resume, because I have "Use hybrid sleep" set to disabled!  It has nothing to do with "older versions of windows", this is the way hibernation is set to behave by default on ALL laptops running ANY version of windows.  "Hybrid sleep" mode is only the default on DESKTOP windows PCs.

 

"If you were to disconnect the power until the capacitors completely discharge, the machine would POST as normal and you would be able to enter CMOS setup" - no, I said already, I tried that, that's what the guy in the article that I linked said should happen.  It does not happen.  I disconnected the power and shut off the PSU and pulled the PSU plugs from the mobo and pressed and held the power button for 30 seconds (which is really the only thing you need to do to discharge capacitors, press and hold the power button).  Then I waited for a good 5 minutes.  Then I plugged everything back in and booted up, and I was still unable to use the BIOS/CMOS.  

 

It has nothing to do with the fact that the system is powered, or in hybrid sleep (it isn't).  It's because of a flag that Windows is setting somewhere, and my BIOS is configured to look for that flag every time it runs.

 

I preemptively apologize, I'm probably being a dick.  I just find it really frustrating when I have to say the same thing 3 times before people finally start reading my posts :P

Link to comment
Share on other sites

On ALL windows laptops/PCs you say.

That's funny since I have entered the bios on windows 7 multiple times and sometimes 8 computers after they go to hibernation. So that's not entirely true.

Link to comment
Share on other sites

On ALL windows laptops/PCs you say.

That's funny since I have entered the bios on windows 7 multiple times and sometimes 8 computers after they go to hibernation. So that's not entirely true.

 

Huh?  I said that hybrid boot was enabled by default for all laptops, and disabled by default for all desktop PCs.  

 

If you are able to enter the BIOS after hibernating windows, you are the first person I have found.  I have found at least a dozen threads on various message boards from people saying that they cannot enter the BIOS after hibernating Windows, and I have tried on all my PCs in my house.

Link to comment
Share on other sites

It sounds a lot like you're getting hit with Intel's Rapid Start feature. This usually requires an SSD in the system, but it will basically suspend the PC to the SSD and boot the OS back ignoring the BIOS and speeding things up a bit.

 

If this is the case, this is done on a chipset/BIOS level and is OS agnostic or it is supported both by Windows and Linux. I have this on my T530 and it does it in Linux or Windows and it doesn't matter if the OS is installed or not; it has happened on LiveCD Linux Distros.

Link to comment
Share on other sites

Huh?  I said that hybrid boot was enabled by default for all laptops, and disabled by default for all desktop PCs.  

 

If you are able to enter the BIOS after hibernating windows, you are the first person I have found.  I have found at least a dozen threads on various message boards from people saying that they cannot enter the BIOS after hibernating Windows, and I have tried on all my PCs in my house.

I enter bios while in hibernate quite a few times on client pc's that hibernate over night and I need to get into bios or change not settings to allow D2D recovery or allow boot menus to boot into USB sticks.

More annoyingly is that a lot of the new bios'/uefi settings don't have the option to boot into USB sticks. Oh sure they have a setting for "boot from removable media" which anyone knows hasn't worked since USB stick and such where invented they always show up as USB HDD's

Link to comment
Share on other sites

Huh?  I said that hybrid boot was enabled by default for all laptops, and disabled by default for all desktop PCs.  

 

If you are able to enter the BIOS after hibernating windows, you are the first person I have found.  I have found at least a dozen threads on various message boards from people saying that they cannot enter the BIOS after hibernating Windows, and I have tried on all my PCs in my house.

 

Where did you hear that, I have a desktop and I have hybrid boot, I can also enter my bios after hibernating quite happily. Hybrid boot is a feature of Windows 8 and has nothing to do with the type of computer you have, or any bios settings you have made. 

Link to comment
Share on other sites

It sounds a lot like you're getting hit with Intel's Rapid Start feature. This usually requires an SSD in the system, but it will basically suspend the PC to the SSD and boot the OS back ignoring the BIOS and speeding things up a bit.

 

If this is the case, this is done on a chipset/BIOS level and is OS agnostic or it is supported both by Windows and Linux. I have this on my T530 and it does it in Linux or Windows and it doesn't matter if the OS is installed or not; it has happened on LiveCD Linux Distros.

 

I have an SSD, a Crucial M4.  I think what you are talking about is Windows Rapid Boot, which hibernates the kernel, but not the user space, like a full hibernation?  No, that is not what is happening here.  This has nothing to do with Rapid Boot.  I'm talking about a full on hibernation, that saves the user space too, sets a flag that prevents most BIOSes from letting you enter the BIOS setup or boot selection menu.  This happens on people's older computers, too.

 

Where did you hear that, I have a desktop and I have hybrid boot, I can also enter my bios after hibernating quite happily. Hybrid boot is a feature of Windows 8 and has nothing to do with the type of computer you have, or any bios settings you have made. 

 

Both a desktop PC and a laptop can have hybrid boot sleep (my bad) turned on.  I was talking about the default settings.  I, nor anyone other than two of you in this particular thread, cannot enter the BIOS after hibernating, but no one mentioned anything about hybrid sleep.  I have hybrid sleep turned on as well, and I cannot enter the BIOS after hibernating.  Either way, hybrid sleep (where the system just sleeps like normal, but also saves a hiberfil.sys hibernation file just in case there is a power failure) has nothing to do with this, because we are not clicking 'sleep' in the power off menu, we are clicking 'hibernate'.  Hibernate does not use hybrid sleep.

 

Could you folks who are saying that this is not the case for you, could you try again right now on a Windows 7 or 8 computer (the only OS'es I have seen mentioned with this issue); Shut down via windows hibernate, wait until the computer is totally off, then wait a few seconds more, and then turn it back on, and try to enter the BIOS settings.  Most BIOSes will not let you, because apparently they are coded to look for a hibernation flag, and prevent you from editing BIOS settings that would fark up the hibernation.  It sounds like you are running on very old BIOSes.  If you are absolutely certain, then could you find out how old the BIOS is that you are running?

Link to comment
Share on other sites

I can confirm on my system I am able to access the bios after a hibernation. I have a Gigabyte motherboard.

Link to comment
Share on other sites

I have an SSD, a Crucial M4.  I think what you are talking about is Windows Rapid Boot, which hibernates the kernel, but not the user space, like a full hibernation?  No, that is not what is happening here.  This has nothing to do with Rapid Boot.  I'm talking about a full on hibernation, that saves the user space too, sets a flag that prevents most BIOSes from letting you enter the BIOS setup or boot selection menu.  This happens on people's older computers, too.

Read the link I posted. This has nothing to do with Windows 8... I specifically mentioned Linux which also isn't Windows 8...

 

Intel Rapid Start is for Windows versions before Windows 8 and works just fine on my Windows 7 based laptop and, as previously mentioned, Linux.

Link to comment
Share on other sites

As I mentioned earlier in this thread, my computer does the exact same thing as the OP says. If I hibernate, my computer will save its contents of the RAM to disk, then shut down completely. I can pull the power as if I'd shut the computer down for the night. Then when I next plug in the power, and turn on my computer, during POST, the "Press DEL to enter SETUP" option disappears until I reboot back into Windows (or I reboot again? I haven't checked this yet, it might just be a one time flag, or waits to be cleared by Windows?).

 

I'm using an Asus P5WDG2-WS Pro.

Link to comment
Share on other sites

As I mentioned earlier in this thread, my computer does the exact same thing as the OP says. If I hibernate, my computer will save its contents of the RAM to disk, then shut down completely. I can pull the power as if I'd shut the computer down for the night. Then when I next plug in the power, and turn on my computer, during POST, the "Press DEL to enter SETUP" option disappears until I reboot back into Windows (or I reboot again? I haven't checked this yet, it might just be a one time flag, or waits to be cleared by Windows?).

 

I'm using an Asus P5WDG2-WS Pro.

 

I can verify that the flag is reset the moment the Windows 8 logo appears.  I'll turn on the PC, can't get at the BIOS, BIOS starts loading Windows 8, Windows 8 splash screen logo appears, cold reboot before I get to the Windows login screen, now I can enter the BIOS.  If I try to cold reboot BEFORE the BIOS POST finishes, the flag is still set.

 

I'm on an OEM mobo, an Asus FRS780M.  Maybe this is an ASUS thing?

Link to comment
Share on other sites

The way S4 is handled by a BIOS is a touchy matter; some of them are buggy and do not behave like they should, some handle S4 much like S5 (generally, the older they are, the truer that statement is). Most modern UEFIs use shortcuts for faster resume-from-hibernation when in S4, such as not allowing you to tinker with BIOS settings when resuming from S4 state.

 

Your mileage may vary, but no matter what you do, most laptops will preserve S4 behavior even after all power has been disconnected. As they should; this is by design. It's less a rule with desktop machines. Unless the BIOS is buggy, power consumption for S4 and S5 on modern machines is essentially the same: mostly trickle current. Minute differences remain, but even a machine in S5 state can receive a Wake-on-LAN signal.

 

Truth of the matter is, Windows 8 boots in seconds even from a cold boot. Why would you want to hibernate your Windows partition for the sole purpose of switching to a partition where Linux is installed? Consistency problems arise when using another partition while a Windows partition is in hibernation. You can and will run into all sort of weird issues; there is such a scenario where if a partition viewed as non-removable by Windows is present at hibernation, then is modified when the system is offline, resuming will cause NTFS catalog inconsistencies and drive corruption requiring a chkdsk. I've seen it happen.

 

There are other, hard-to-track issues. Because of Windows 8's new Fast Startup feature, Microsoft retooled the kernel so that inconsistent state scenarios are harder to come by, but still -- even Fast Startup causes some amount of trouble as it is when modifying, adding or removing hardware.

Link to comment
Share on other sites

 

The way S4 is handled by a BIOS is a touchy matter; some of them are buggy and do not behave like they should, some handle S4 much like S5 (generally, the older they are, the truer that statement is). Most modern UEFIs use shortcuts for faster resume-from-hibernation when in S4, such as not allowing you to tinker with BIOS settings when resuming from S4 state.
 
Your mileage may vary, but no matter what you do, most laptops will preserve S4 behavior even after all power has been disconnected. As they should; this is by design. It's less a rule with desktop machines. Unless the BIOS is buggy, power consumption for S4 and S5 on modern machines is essentially the same: mostly trickle current. Minute differences remain, but even a machine in S5 state can receive a Wake-on-LAN signal.
 
Truth of the matter is, Windows 8 boots in seconds even from a cold boot. Why would you want to hibernate your Windows partition for the sole purpose of switching to a partition where Linux is installed? Consistency problems arise when using another partition while a Windows partition is in hibernation. You can and will run into all sort of weird issues; there is such a scenario where if a partition viewed as non-removable by Windows is present at hibernation, then is modified when the system is offline, resuming will cause NTFS catalog inconsistencies and drive corruption requiring a chkdsk. I've seen it happen.
 
There are other, hard-to-track issues. Because of Windows 8's new Fast Startup feature, Microsoft retooled the kernel so that inconsistent state scenarios are harder to come by, but still -- even Fast Startup causes some amount of trouble as it is when modifying, adding or removing hardware.

 

Thanks for that, it was a very informative post, answered a lot of my questions.  Couple of things though:

"Most modern UEFIs use shortcuts for faster resume-from-hibernation when in S4, such as not allowing you to tinker with BIOS settings when resuming from S4 state."

I don't have a UEFI BIOS.  My regular old MBR-only BIOS system is using the same shortcut.

 
"Your mileage may vary, but no matter what you do, most laptops will preserve S4 behavior even after all power has been disconnected. As they should; this is by design. It's less a rule with desktop machines. "
 
I first noticed this on my desktop machine, which at the time only had one OS installed.  
 
"Why would you want to hibernate your Windows partition for the sole purpose of switching to a partition where Linux is installed? Consistency problems arise when using another partition while a Windows partition is in hibernation. You can and will run into all sort of weird issues; there is such a scenario where if a partition viewed as non-removable by Windows is present at hibernation, then is modified when the system is offline, resuming will cause NTFS catalog inconsistencies and drive corruption requiring a chkdsk. I've seen it happen."
 
Okay, that's a good warning to take heed of; don't modify the other OS's partitions, including non-system drives, while it has been hibernated.  Good thing most Linux distros don't auto-mount an NTFS partition.  But it just wreaks of this whole new security-over-freedom movement with PC's these days that prevent you from doing things for your own safety.  In my situation, I'm currently running on Windows 8.  But I'm trying to set up a Linux Mint partition (actually a whole other drive) dual boot at the same time.  And one would expect GRUB to allow me to pick windows, but after hibernating windows, I don't see GRUB, the BIOS uses the windows drive's bootloader instead.  So right now I check my email, watch TV, and play games on my Windows system.  But sometimes, when I have enough free time, I want to work on the Linux system.  Maybe I receive a response to a crucial forum thread telling me how to fix a Linux issue.  Well I have a bunch of documents, media players, and browser windows open on my Windows OS right now.  It would be nice if I could just hibernate the Windows OS, so I could go try that fix on the Linux OS, and I'll be good, I promise I won't touch the Windows partition while I'm in the Linux OS, but nooooooo, Windows/BIOS manufacturer says that for my own safety, it has to enable some shortcut in the BIOS to prevent me from doing that.  Because I'm smart enough to know how to set up a Linux dual boot, but dumb enough to need protecting from messing up a hibernated Windows partition.  So instead I have to save all my documents, save the position I'm in on my media players, bookmark all my open browser windows.  Because of safety.
 
Setting up a dual boot can present a whole set of problems too.  You can break your entire system, and without knowing how to repair an MBR, one might think their entire hard drive needs formatting.  But there's no safety protections that prevent me from setting up a dual boot.
Link to comment
Share on other sites

The real question is, why today, would you use a clumsy dual boot that requires you to restart the system to switch OS when you can use one of three virtualization systems that all run the other OS as if it's as running natively.

Having to reboot all the time was why I stopped fiddling with Linux way back when I was in school.

Link to comment
Share on other sites

I still dont see what the problem is on this. I service windows 8 desktops and a laptops all day long and never once had this issue. I could always get into the bios/efi. So I am not sure what the OP is talking about.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.