# Hibernate, then sleep.... who wins?

Gold Member
TL;DR 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.

Gold Member
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.

Gold Member
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

Gold Member
2022 Award
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.

Gold Member
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.

Gold Member
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

FactChecker
Gold Member
2022 Award
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.

Gold Member
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 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) .

Gold Member
2022 Award
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.

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 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) .
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

Filip Larsen
Gold Member
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.

Gold Member
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

Gold Member
2022 Award
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?

Gold Member
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).

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"

Gold Member
2022 Award
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:

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.

hmmm27