Sleep vs Hybernate?

T

Tim Meddick

John,
I am not going to disagree with you on the way WOL can only affect
systems in standby (S1 S2 S3) modes but not in hibernate (S4). But you
mention that on waking a hibernated system, the boot loader [ntldr] 'looks'
for the file hiberfil.sys and, if present 'sucks' (your word, not mine) it
back into RAM.
This cannot be true as my system constantly has a file by that name in
the root of the system drive. Although, I have been looking for hours for
the answer to this question, I cannot tell by what means the boot loader
DOES work out if it needs to LOAD hiberfil.sys or not (probably, it is by
means of either looking for a value in the registry or looking for a 'flag'
on the disk).
As I can't seem to find clarification on this subject from elsewhere, so
I thought I'd come back here and ask you.

==



Cheers, Tim Meddick, Peckham, London. :)
 
T

Tim Meddick

My advice would be to first check the BIOS setup. If there is a setting
that disables advanced power management (APM) or disables sleep
(save-to-ram) states.


==



Cheers, Tim Meddick, Peckham, London. :)
 
3

3c273

I'm not misinterpreting anything. I just did it with nothing but a keyboard,
mouse, and monitors plugged in to make sure that the network wasn't waking
it up. It does it every morning. I guess you are calling me a liar as I
hibernate my machine every night before bed and the windows task scheduler
wakes the machine up and starts playing music every morning. I watched it
happen last week and I just watched it happen again with a new scheduled
task. The BIOS screen comes up and then the "resuming windwws" progress bar
scrolls and then the music starts playing. If you look at my posting
history, you'll see that I'm not just some troll disagreeing with you.
You've helped me before, so I know that you are knowlegedable, but on this
subject, you are just wrong. Don't be aftaid to admit it.
Louis
 
3

3c273

It will (if your hardware supports it). It will wake on LAN from hibernate
(and even from the off state) and a scheduled task will wake it. I do it
every day. Dell Optiplex 755, XP SP3, BIOS revision A13.
Louis
 
J

Jeff Barnett

John said:
There again, the author is confusing hibernate with standby, read his
post carefully:

"So, here is my workaround: Keep the PC in Hibernate (Suspend) mode
and wake it up at 6:00am."

Read more of his code and you will see that his code is relying on
Windows APIs and function calls to "wake up" the computer, he is
missing the fact that the hibernating computer is *turned off*, he has
the terminology mixed up. You can no more wake up an hibernating
computer with this code than you can one that is powered off without
hibernate!

"Suspend" mode is NOT hibernate, you can search all you want on the
internet it will not change facts, a hibernating computer is powered
off, that is how hibernation works, the Windows session resumes when
ntldr reads and loads the hiberfil.sys file. I don't care what you
say or what any article on the web says you are simply not using
Windows on the powered off computer to turn it on, that is simply
impossible. The powered off computer can be turned on by other means
but it cannot be done by by Windows when Windows isn't running!
People are confusing Standby with Hibernate.

John
Are you certain that the BIOS, at a time specified by the OS, can't
waken a hibernating computer? Of course that is how a suspended (S1 or
S3) computer is brought back to life to run scheduled tasks!
 
3

3c273

According the Energy Star website, it sets a "power management event" (PME)
inside the real time clock.
<quote>
Scheduled tasks use the real time clock (RTC) and power management events
(PMEs) provided by the Advanced Configuration and Power Interface (ACPI) to
wake the machine out of system standby or hibernate. On the settings tab of
a scheduled task, an option labeled "Wake the machine to run this task" will
set a PME inside the RTC for the time when the task is scheduled to run.
</quote>
http://www.energystar.gov/index.cfm?c=power_mgt.pr_power_mgt_win_task
Louis
 
J

John John - MVP

I would have to run some tests to see how hibernating affect the S1 S2
S3 states and as to whether or not power will remain available to the
network adapter when the computer is hibernated, I think this will
depend on the available power options in the BIOS. If hibernating the
computer cuts the power to the network adapter then WOL will not be
possible.

The 'sucks' the contents of the hiberfil.sys into memory is from Raymond
Chen. http://technet.microsoft.com/en-us/magazine/cc137769.aspx If you
hibernate your computer and then unplug it while it is hibernating the
contents of the RAM are sure to be flushed, when you plug it back it and
restart it it will boot to the hibernated desktop, hibernation relies on
the hiberfil.sys file, not anything stored in RAM. It could be that
when you hibernate the machine there is an ntldr flag of sorts written
in the file and that the flag is remove when the machine resumes
successfully, I don't know for sure, its a guess.

John

Tim said:
John,
I am not going to disagree with you on the way WOL can only affect
systems in standby (S1 S2 S3) modes but not in hibernate (S4). But you
mention that on waking a hibernated system, the boot loader [ntldr] 'looks'
for the file hiberfil.sys and, if present 'sucks' (your word, not mine) it
back into RAM.
This cannot be true as my system constantly has a file by that name in
the root of the system drive. Although, I have been looking for hours for
the answer to this question, I cannot tell by what means the boot loader
DOES work out if it needs to LOAD hiberfil.sys or not (probably, it is by
means of either looking for a value in the registry or looking for a 'flag'
on the disk).
As I can't seem to find clarification on this subject from elsewhere, so
I thought I'd come back here and ask you.

==



Cheers, Tim Meddick, Peckham, London. :)


John John - MVP said:
Microsoft doesn't disagree with me, or I should rather say that I don't
disagree with Microsoft. You are misinterpreting what is mentioned in the
resource kit, these ACPI features can wake the system from *hibernation*
or standby, these ACPI features would be things like WOL or Wake on Ring.
There is *absolutely no way* that you are waking up a hibernating computer
with a Scheduled Task! The only way that could happen would be for a
scheduled task on *another* computer to send a wake up call to the
hibernating computer, the Windows installation on the hibernating computer
absolutely cannot bring the computer out of hibernation, standby yes,
hibernation, no.

From Microsoft:

"Like sleep, hibernate is a power-saving state. In Windows Vista, sleep
saves your settings in memory and draws a small amount of power to
maintain that memory. Hibernate, on the other hand, writes your settings
and the content of memory to the hard disk and then completely powers down
the system."

http://technet.microsoft.com/en-us/magazine/2008.05.sustainablecomputing2.aspx

Same thing for Windows 2000 and Windows XP, the system is completely
powered down after the hiberfil.sys file is written, scheduled tasks are
no longer available and Windows cannot reawaken itself from a powered down
state, something else has to initiate the power up.

John
 
3

3c273

John John - MVP said:
I would have to run some tests to see how hibernating affect the S1 S2 S3
states and as to whether or not power will remain available to the network
adapter when the computer is hibernated, I think this will depend on the
available power options in the BIOS. If hibernating the computer cuts the
power to the network adapter then WOL will not be possible.
It doesn't cut the power to the NIC. WOL works even with the power off. I
use it to start machines that are off all the time at work.
Louis
 
J

John John - MVP

Tim said:
John,
I am not going to disagree with you on the way WOL can only affect
systems in standby (S1 S2 S3) modes but not in hibernate (S4).

I have just checked that on one of my machines and my network adapter
allows WOL when the machine is hibernating. This would depend on your
adapter.

John
 
T

Tim Meddick

Mr 3c273,
It's no good going on and on about it. Okay, YOUR computer
supports Task Scheduler configuration of the extended BIOS (i.e. it can set
the automatic wake-up timer in the BIOS) and yes, WOL will bring a computer
out of any (including hibernate S4 and S5 (switched off but plugged in)
sleep states) given that:- the network card AND the mobo both support it
AND the correct signal ('magic' packet, directed packet, etc.) is sent and
received by the machine.
However, there are many more signals and interrupts that can bring a PC
out of the other sleep states that are NOT supported when in the S4
(hibernate) sleep state, including signals sent via a network card. Plus,
the ability for the OS to configure the BIOS's wake timer is a new one that
is NOT available on most systems.


==



Cheers, Tim Meddick, Peckham, London. :)
 
T

Tim Meddick

That's what I was thinking (about the 'flag' that is)

But Mr 3c273 is right about the network cards on today's machines - the
lights are on the network card's rear plate when a machine is plugged in to
both power and network cable. 'magic' packets have been around for some
time but now you have 'magic packets', 'directed packets', 'wake on magic
packet from power off state' and 'wake on link'!!!

I have never heard of the OS being able to configure the BIOS's wake up
timer as Mr 3c273 says his Task Scheduler does. But, he says it does and I
know that computers have been increasing the ability to control settings in
what is called the extended BIOS including APM and this agrees with what I
have been reading about the subject.

I'd still like to know what causes ntldr to start loading hiberfil.sys
though!

==



Cheers, Tim Meddick, Peckham, London. :)
 
3

3c273

The guy (JJ) basically called me a liar and I realize that some machines
won't do it but he said that it wasn't possible and it is. No ill will
intended.
Louis
 
J

John John - MVP

I apologize, I tried it but had neglected to go in the advanced features
and putting a check mark on the "Wake the computer to run this task".
It does work, I am wrong and you were right all along. I learned
something new about Scheduled Tasks, thank you.

John
 
T

Tim Meddick

Louis,
He (John) is not often wrong (first time that I have seen it) but
has appologized in his lates post (Friday 15 May 2009 3:51am)


==



Cheers, Tim Meddick, Peckham, London. :)


3c273 said:
The guy (JJ) basically called me a liar and I realize that some machines
won't do it but he said that it wasn't possible and it is. No ill will
intended.
Louis
 
3

3c273

Thank you for your apology. I never meant this to turn into an argument but
when you do something every day and someone tells you it's not possible,
well, it gets me a little wound up. Keep up the good work, you are one of
the better MVPs.
Louis
 
T

Tim Meddick

But who asked you for your totally unqualified input?


==



Cheers, Tim Meddick, Peckham, London. :)
 
J

John John - MVP

Tim said:
I'd still like to know what causes ntldr to start loading hiberfil.sys
though!

"NTLDR locates and parses Hiberfil.sys to determine if it contains a
valid hibernator file. If a valid hibernator file is found, then that
file is loaded into memory and execution continues from the point the
computer was placed into hibernation."

How Windows Starts Up (Part the second)
http://blogs.msdn.com/ntdebugging/archive/2007/06/28/how-windows-starts-up-part-the-second.aspx

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top