A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Hardware and Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How does hibernate work



 
 
Thread Tools Display Modes
  #16  
Old January 22nd 10, 08:54 PM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work

SC Tom wrote:

Since the bootstrap
loader is handled by BIOS, I would bet that's where the information to
access the hibernation file is loaded.


No, the information to load the hiberfil.sys file is contained in ntldr.

John
Ads
  #17  
Old January 22nd 10, 08:54 PM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work

SC Tom wrote:

Since the bootstrap
loader is handled by BIOS, I would bet that's where the information to
access the hibernation file is loaded.


No, the information to load the hiberfil.sys file is contained in ntldr.

John
  #18  
Old January 22nd 10, 08:59 PM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work



njem wrote:
On Jan 21, 10:00 pm, John John - MVP wrote:
Ntldr looks for and parses the hiberfil.sys file, if the file is
found to be valid it is loaded into memory and the Windows kernel takes
control of the session. Any changes that you make to the computer after
it is shut down can potentially prevent the computer from resuming from
hibernation, undocking a laptop or something as simple as
plugging/unplugging USB devices can prevent the computer from
sucessfully resuming from hibernation. I suspect that removing your
battery for an extended period resets certain settings in the BIOS and
this prevents the computer from resuming from hibernation. When the
computer successfully resumes the hyberfil.sys file is marked as
inactive, this prevents ntldr from loading a stale hiberfil.sys file.

John


I think we're all working in the dark. As noted to SC Tom, if it were
strictly an OS function then bios wouldn't have to support it.


The computer has to be ACPI compliant so that the operating system can
tell it to shut itself off. The devices also need to be Plug and Play
compliant, Plug and Play also requires that the computer be ACPI compliant.

http://blogs.msdn.com/ntdebugging/ar...he-second.aspx
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process

John
  #19  
Old January 22nd 10, 08:59 PM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work



njem wrote:
On Jan 21, 10:00 pm, John John - MVP wrote:
Ntldr looks for and parses the hiberfil.sys file, if the file is
found to be valid it is loaded into memory and the Windows kernel takes
control of the session. Any changes that you make to the computer after
it is shut down can potentially prevent the computer from resuming from
hibernation, undocking a laptop or something as simple as
plugging/unplugging USB devices can prevent the computer from
sucessfully resuming from hibernation. I suspect that removing your
battery for an extended period resets certain settings in the BIOS and
this prevents the computer from resuming from hibernation. When the
computer successfully resumes the hyberfil.sys file is marked as
inactive, this prevents ntldr from loading a stale hiberfil.sys file.

John


I think we're all working in the dark. As noted to SC Tom, if it were
strictly an OS function then bios wouldn't have to support it.


The computer has to be ACPI compliant so that the operating system can
tell it to shut itself off. The devices also need to be Plug and Play
compliant, Plug and Play also requires that the computer be ACPI compliant.

http://blogs.msdn.com/ntdebugging/ar...he-second.aspx
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process

John
  #20  
Old January 23rd 10, 01:11 AM posted to microsoft.public.windowsxp.hardware
Yousuf Khan
external usenet poster
 
Posts: 102
Default How does hibernate work

M.I.5¾ wrote:
"njem" wrote in message
...
I have a question on the details of how hibernate works. I know it's
saving everything in memory to the hiber file. Since power seems to be
truly off at hibernation I assumed the flag to tell the PC to resume
from the hiber file rather than normal booting must be either saved on
disk or flashed to a bit of bios rom space, or maybe in space
maintained by the clock battery. But the cure for a laptop that is
stuck in a loop of constantly resuming from hibernating is to unplug
it and take the battery out for a while so where actually is the flag
to signal the system that it's in hibernation?


How the machine knows to resume from hibernate is BIOS dependant. There are
two schemes.

In both schemes the RAM contents are written to a file called hiberfil.sys.


This much is true.

In the first scheme, the BIOS checks for the presence of the hiberfil.sys
file on the hard disc and if it finds it, loads it into RAM and then
proceeds as though recovering from STANDBY. Once recovered the file is
deleted.

In the second scheme, the BIOS sets an internal flag that it has hibernated,
and thus loads hiberfil.sys if the flag is set, otherwise it just boots
normally even if the file is present. Some BIOSes report an error if they
can't find the hiberfil.sys file. Once recovered the file is not
necessarily deleted.


Neither of these can be true. If a hibernate flag were set in the NVRAM
of the BIOS, then if you had Linux installed on the same machine, it too
would be hibernated. You can hibernate Linux and it won't affect
Windows, and vice-versa. It's just a flag that's set in the filesystem
of each operating system's boot drive.

Yousuf Khan
  #21  
Old January 23rd 10, 01:11 AM posted to microsoft.public.windowsxp.hardware
Yousuf Khan
external usenet poster
 
Posts: 102
Default How does hibernate work

M.I.5¾ wrote:
"njem" wrote in message
...
I have a question on the details of how hibernate works. I know it's
saving everything in memory to the hiber file. Since power seems to be
truly off at hibernation I assumed the flag to tell the PC to resume
from the hiber file rather than normal booting must be either saved on
disk or flashed to a bit of bios rom space, or maybe in space
maintained by the clock battery. But the cure for a laptop that is
stuck in a loop of constantly resuming from hibernating is to unplug
it and take the battery out for a while so where actually is the flag
to signal the system that it's in hibernation?


How the machine knows to resume from hibernate is BIOS dependant. There are
two schemes.

In both schemes the RAM contents are written to a file called hiberfil.sys.


This much is true.

In the first scheme, the BIOS checks for the presence of the hiberfil.sys
file on the hard disc and if it finds it, loads it into RAM and then
proceeds as though recovering from STANDBY. Once recovered the file is
deleted.

In the second scheme, the BIOS sets an internal flag that it has hibernated,
and thus loads hiberfil.sys if the flag is set, otherwise it just boots
normally even if the file is present. Some BIOSes report an error if they
can't find the hiberfil.sys file. Once recovered the file is not
necessarily deleted.


Neither of these can be true. If a hibernate flag were set in the NVRAM
of the BIOS, then if you had Linux installed on the same machine, it too
would be hibernated. You can hibernate Linux and it won't affect
Windows, and vice-versa. It's just a flag that's set in the filesystem
of each operating system's boot drive.

Yousuf Khan
  #22  
Old January 23rd 10, 01:15 AM posted to microsoft.public.windowsxp.hardware
Yousuf Khan
external usenet poster
 
Posts: 102
Default How does hibernate work

njem wrote:
I think we're all working in the dark. As noted to SC Tom, if it were
strictly an OS function then bios wouldn't have to support it. And I
had one case that would conflict with the scheme you described. I had


The BIOS has to support hibernate to the extent that it needs to be an
ACPI-compliant BIOS. ACPI contains internal processor information that
is needed to get it to hibernate or go into standby.

But the BIOS' CMOS doesn't store any flags that tell it to go into
hibernate.

Yousuf Khan
  #23  
Old January 23rd 10, 01:15 AM posted to microsoft.public.windowsxp.hardware
Yousuf Khan
external usenet poster
 
Posts: 102
Default How does hibernate work

njem wrote:
I think we're all working in the dark. As noted to SC Tom, if it were
strictly an OS function then bios wouldn't have to support it. And I
had one case that would conflict with the scheme you described. I had


The BIOS has to support hibernate to the extent that it needs to be an
ACPI-compliant BIOS. ACPI contains internal processor information that
is needed to get it to hibernate or go into standby.

But the BIOS' CMOS doesn't store any flags that tell it to go into
hibernate.

Yousuf Khan
  #24  
Old January 23rd 10, 01:26 AM posted to microsoft.public.windowsxp.hardware
njem[_2_]
external usenet poster
 
Posts: 111
Default How does hibernate work

On Jan 22, 1:59*pm, John John - MVP wrote:

http://blogs.msdn.com/ntdebugging/ar...w-windows-star...
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process


Well I read the references, but it leaves me wondering why that time I
deleted the hiberfile it still tried to resume. Oh well. At least on
laptops I know the battery trick works.

Thanks,
Tom
  #25  
Old January 23rd 10, 01:26 AM posted to microsoft.public.windowsxp.hardware
njem[_2_]
external usenet poster
 
Posts: 111
Default How does hibernate work

On Jan 22, 1:59*pm, John John - MVP wrote:

http://blogs.msdn.com/ntdebugging/ar...w-windows-star...
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process


Well I read the references, but it leaves me wondering why that time I
deleted the hiberfile it still tried to resume. Oh well. At least on
laptops I know the battery trick works.

Thanks,
Tom
  #26  
Old January 23rd 10, 01:34 AM posted to microsoft.public.windowsxp.hardware
Pavel A.[_2_]
external usenet poster
 
Posts: 96
Default How does hibernate work

"Yousuf Khan" wrote in message
...
... If a hibernate flag were set in the NVRAM of the BIOS, then if you had
Linux installed on the same machine, it too would be hibernated. You can
hibernate Linux and it won't affect Windows, and vice-versa. It's just a
flag that's set in the filesystem of each operating system's boot drive.


What would be the desired user experience?
Suppose you have OS A and OS B on same machine, and hibernated OS A.
Would you then prefer OS A to resume automatically, or have a choice to boot
OS B?

The "new" boot datbase of NT6 has a Resume object parameter,
maybe exactly for this purpose - let to choose what happens on resume ?

Regards,
-- pa


  #27  
Old January 23rd 10, 01:34 AM posted to microsoft.public.windowsxp.hardware
Pavel A.[_2_]
external usenet poster
 
Posts: 96
Default How does hibernate work

"Yousuf Khan" wrote in message
...
... If a hibernate flag were set in the NVRAM of the BIOS, then if you had
Linux installed on the same machine, it too would be hibernated. You can
hibernate Linux and it won't affect Windows, and vice-versa. It's just a
flag that's set in the filesystem of each operating system's boot drive.


What would be the desired user experience?
Suppose you have OS A and OS B on same machine, and hibernated OS A.
Would you then prefer OS A to resume automatically, or have a choice to boot
OS B?

The "new" boot datbase of NT6 has a Resume object parameter,
maybe exactly for this purpose - let to choose what happens on resume ?

Regards,
-- pa


  #28  
Old January 23rd 10, 05:46 AM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work

njem wrote:
On Jan 22, 1:59 pm, John John - MVP wrote:
http://blogs.msdn.com/ntdebugging/ar...w-windows-star...
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process


Well I read the references, but it leaves me wondering why that time I
deleted the hiberfile it still tried to resume. Oh well. At least on
laptops I know the battery trick works.


Boot to the Recovery Console and delete the hiberfil.sys file.

What happens when you hit the Spacebar or F8 key before Windows loads?
Hibernation is a pretty finicky thing at best of times. Buggy drivers
and marginal hardware can put a kybosh on all of it in a hurry.

John
  #29  
Old January 23rd 10, 05:46 AM posted to microsoft.public.windowsxp.hardware
John John - MVP[_2_]
external usenet poster
 
Posts: 1,637
Default How does hibernate work

njem wrote:
On Jan 22, 1:59 pm, John John - MVP wrote:
http://blogs.msdn.com/ntdebugging/ar...w-windows-star...
Ntdebugging Blog : How Windows Starts Up (Part the second)

http://www.tar.hu/wininternals/ch05lev1sec1.html
Boot Process


Well I read the references, but it leaves me wondering why that time I
deleted the hiberfile it still tried to resume. Oh well. At least on
laptops I know the battery trick works.


Boot to the Recovery Console and delete the hiberfil.sys file.

What happens when you hit the Spacebar or F8 key before Windows loads?
Hibernation is a pretty finicky thing at best of times. Buggy drivers
and marginal hardware can put a kybosh on all of it in a hurry.

John
  #30  
Old January 23rd 10, 06:25 AM posted to microsoft.public.windowsxp.hardware
Yousuf Khan
external usenet poster
 
Posts: 102
Default How does hibernate work

Pavel A. wrote:
"Yousuf Khan" wrote in message
...
... If a hibernate flag were set in the NVRAM of the BIOS, then if you
had Linux installed on the same machine, it too would be hibernated.
You can hibernate Linux and it won't affect Windows, and vice-versa.
It's just a flag that's set in the filesystem of each operating
system's boot drive.


What would be the desired user experience?
Suppose you have OS A and OS B on same machine, and hibernated OS A.
Would you then prefer OS A to resume automatically, or have a choice to
boot OS B?


OS A would resume automatically if you put it on standby, you would have
no choice on that one. But if you put it on hibernate, then it would go
through the initial boot and then you can choose to go into either A or
B; if you went back to A, then it would resume from a hibernate, unless
you told it to ignore the resume file (you could do that by pressing F8
key during initial part of the Windows booting).

Yousuf Khan
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 06:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.