Hibernate, then sleep.... who wins?

  • Thread starter Thread starter nomadreid
  • Start date Start date
  • Tags Tags
    Sleep
Click For Summary
When using a laptop, the interaction between sleep and hibernation can lead to confusion, particularly when closing the lid while a hibernation command is in progress. If the lid is closed before hibernation completes, the laptop may default to sleep mode instead. Sleep mode retains power to the memory for quick access, while hibernation saves the state to the hard disk, making waking from sleep faster. Some laptops are designed to enter sleep upon lid closure and may later switch to hibernation after a period of inactivity, which conserves battery life. Issues can arise when closing the lid during these transitions, potentially leading to incomplete processes and battery drain. Adjusting power settings in the Control Panel can help manage these behaviors, and using the power button for waking the laptop is recommended to avoid unintended "unattended wake" events from external devices. Users have reported varying experiences with different laptop models, indicating that behavior can depend on specific hardware and settings.
nomadreid
Gold Member
Messages
1,762
Reaction score
248
TL;DR
On a (Dell) laptop, if I select "hibernate" fromthe power button and then close the cover which is set to put the laptop to sleep, is the laptop now sleeping or hibernating?
I could think of two ways that this might be programmed: whereby the last function enabled takes precedence (in this case, sleep) or whether sleep is a sort of subset for hibernation, making "sleep" have no effect on the hibernation.
 
Computer science news on Phys.org
I'm on my fourth Thinkpad, and at least one of the previous ones would interrupt a power-off command and go to sleep instead when the cover was closed too soon.
 
  • Like
Likes russ_watters, FactChecker and nomadreid
Try them individually noting the time it takes to restart each.

Hibernate save the memory contents and CPU state on hard disk.
Sleep slows down the CPU and keeps power to the memory for data retention.

Given the above, waking from Sleep will be faster.

Cheers,
Tom
 
  • Like
Likes nomadreid
nomadreid said:
Summary:: On a (Dell) laptop, if I select "hibernate" fromthe power button and then close the cover which is set to put the laptop to sleep, is the laptop now sleeping or hibernating?

I could think of two ways that this might be programmed: whereby the last function enabled takes precedence (in this case, sleep) or whether sleep is a sort of subset for hibernation, making "sleep" have no effect on the hibernation.
I always face this problem in my HP laptop. If you close the lid of the laptop before the process of hibernation is complete, hibernation is canceled and sleep takes effect. So I wait till all the lights are off, and then close the lid.
 
  • Like
Likes nomadreid
Thanks for the replies. Wrichik Basu comes the closest to answering the question directly, hmmm27 was similar, and Tom G. suggested that I experiment in order to find out by timing. Everything appreciated.
 
Wrichik Basu said:
I always face this problem in my HP laptop. If you close the lid of the laptop before the process of hibernation is complete, hibernation is canceled and sleep takes effect.

I had a laptop if you closed the lid during the process of sleep or hibernate the pending function would be suspended. The next time you opened up the lid either it would finish the sleep/hibernate or the battery would be dead.

BoB
 
  • Like
Likes FactChecker
rbelli1 said:
I had a laptop if you closed the lid during the process of sleep or hibernate the pending function would be suspended. The next time you opened up the lid either it would finish the sleep/hibernate or the battery would be dead.
That means your laptop didn't even go into sleep on closing the lid, like mine does; it most probably stayed awake, due to which the battery would be dead.
 
I believe that some laptop models (or at least laptops from some vendors) are setup such that the laptop enters sleep when the lid is closed and then after some time (e.g. hours) of sleep it wakes automatically and enters hibernation. This allow quick sleep/wake during daily work, but conserves battery in the longer run.

If it works, that is. I've had laptops that could not hibernate from sleep without crashing when they later waking up from hibernation. And my latest work laptop (Lenovo ThinkPad P51) have this strange bug where it very often enters sleep after 1-2 minute of idle mouse or keyboard no matter what settings is used Windows sleep control and no matter what the computer is doing, e.g. during a long 100% CPU usage computation. The only thing I found that can effectively keep it awake is having (muted) music playing :rolleyes: But its the same laptop that also insist on keeping the network card on during sleep, but then promptly turns it off again for several minutes when waking (meaning no cabled network access for minutes after waking) so I guess its a certified Monday model (and the roughly 15+ Lenovo BIOS updates pushed out since I got it hasn't fixed anything, except network card worked as it should for a brief period between two of those updates) :mad:.
 
Filip Larsen said:
I believe that some laptop models (or at least laptops from some vendors) are setup such that the laptop enters sleep when the lid is closed and then after some time (e.g. hours) of sleep it wakes automatically and enters hibernation. This allow quick sleep/wake during daily work, but conserves battery in the longer run.
Go to Control Panel -> Hardware and Sound -> Power Options. Under your selected plan, click "Change plan settings". Then click "Change advanced power settings", scroll to "Hibernate after..." and change as appropriate.

1589727575580.png


Filip Larsen said:
And my latest work laptop (Lenovo ThinkPad P51) have this strange bug where it very often enters sleep after 1-2 minute of idle mouse or keyboard no matter what settings is used Windows sleep control and no matter what the computer is doing, e.g. during a long 100% CPU usage computation. The only thing I found that can effectively keep it awake is having (muted) music playing :rolleyes: But its the same laptop that also insist on keeping the network card on during sleep, but then promptly turns it off again for several minutes when waking (meaning no cabled network access for minutes after waking) so I guess its a certified Monday model (and the roughly 15+ Lenovo BIOS updates pushed out since I got it hasn't fixed anything, except network card worked as it should for a brief period between two of those updates) :mad:.
I have faced this problem recently and it is because of the "Unattended sleep timeout" settings. You have to edit your registry so as to make this option available. See this article:

https://windowsreport.com/windows-10-goes-to-sleep-after-2-minutes/

When waking up your PC from sleep, always use the power key. Using an external mouse counts as "Unattended wake", even if you are doing work after that.

To see which device awoke your laptop the last time, start command prompt and execute powercfg -lastwake. For waking up via external mouse, it will show something like this:
Code:
C:\Users\Wrichik Basu>powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Device
    Instance Path: PCI\VEN_8086&DEV_9DED&SUBSYS_8538103C&REV_11\3&11583659&2&A0
    Friendly Name: Intel(R) USB 3.1 eXtensible Host Controller - 1.10 (Microsoft)
    Description: USB xHCI Compliant Host Controller
    Manufacturer: Generic USB xHCI Host Controller
This is unattended wake. For wake using the power button, it will show:
Code:
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Fixed Feature
    Power Button
 
  • Informative
Likes Filip Larsen
  • #10
Wrichik Basu said:
When waking up your PC from sleep, always use the power key. Using an external mouse counts as "Unattended wake", even if you are doing work after that.

That is good to know in general I guess.

I did try various registry "fixes" that came up searching for the problem but that didn't really change anything. And I can't remember if I tried the one you link to. I am not using the laptop at the moment, but if I will sure give your tips a try later if it becomes possible.

By the way, one thing I forgot to mention which is probably fairly important, is that the fast-sleep-thing happened only when I used an external HDMI screen directly on the laptop (i.e. not via docking station) with the lid closed. I did try a large variation of different setups, but found no clear "pattern" other than the presence of the external screen. Waking (from hibernation) was here done by quickly lifting the lid a bit and then close it again (the power button is hidden when the lid closed). I remember it as it did not make any difference if I let the lid stay open, but I could be wrong.
 
  • #11
Wrichik Basu said:
That means your laptop didn't even go into sleep on closing the lid, like mine does; it most probably stayed awake, due to which the battery would be dead.

If I just closed the lid it went to sleep. If I pressed the button to hibernate or sleep then closed the lid it got stuck half way through the power saving procedure. Pressing the button and waiting before closing worked properly.

BoB
 
  • #12
Filip Larsen said:
By the way, one thing I forgot to mention which is probably fairly important, is that the fast-sleep-thing happened only when I used an external HDMI screen directly on the laptop (i.e. not via docking station) with the lid closed.
You mean to say that you were projecting your laptop screen to a some other screen via HDMI with the lid closed? Or are you projecting some other screen to your PC via HDMI?
 
  • #13
Wrichik Basu said:
You mean to say that you were projecting your laptop screen to a some other screen via HDMI with the lid closed?

Yes, a single external screen connected to the laptop via HDMI. And since the lid is closed there is also an external keyboard and mouse (sometimes one set wired via two USB and at other times another set connected via a single Logitech wireless USB-adapter).

Wrichik Basu said:
Or are you projecting some other screen to your PC via HDMI?

Not sure what you mean by this so the answer to that is probably "no" :smile:
 
  • #14
Filip Larsen said:
Yes, a single external screen connected to the laptop via HDMI. And since the lid is closed there is also an external keyboard and mouse (sometimes one set wired via two USB and at other times another set connected via a single Logitech wireless USB-adapter).
I believe you have already changed your settings such that closing the lid does not put the laptop into sleep. Note that the same option is available under the menu I have highlighted in post #9:

1589778997322.png


Be sure to change the settings here as well, otherwise Windows does not apply it.

My power button is configured to put my laptop into hibernation; but that never worked. Yesterday, while helping you, I found the same settings in above place and saw that it was not set correctly. Changing it there solved the problem.
 
  • Like
Likes hmmm27

Similar threads

  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 57 ·
2
Replies
57
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 126 ·
5
Replies
126
Views
9K
  • · Replies 45 ·
2
Replies
45
Views
5K
  • · Replies 12 ·
Replies
12
Views
4K
Replies
14
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K