Is it safe to use Hibernate all the time?
Hi, everyone. Leo Notenboom here for
https://askleo.com. Here's today's question.
"I have Windows on my laptop.
Hibernate is enabled with the option enable to Hibernate when I close the lid.
Is there any downside to using this
routinely to power down, or should I shut down or restart periodically?
From your description of shutdown, it seems that all that happens is
that Windows closes down everything which I want up and running anyway when I
start without any other maintenance tasks, which may be essential for good health."
Correct.
This is one of what I'll call a theory versus practice question and answer.
In theory, absolutely.
You should be able to use Hibernate all the time without question, without issue.
In practice, it generally doesn't work out that way.
First, let's talk about what Hibernating is. Normally when you shut down your
machine Windows runs around and tells each program, hey, shut yourself down,
shut yourself down, shut yourself down until all the programs
are done and the Windows itself shuts itself down. On the other side
then when you restart that machine, Windows has to fire itself up and load all
the start up entries and load whatever else, and then you have to come along
and start up whatever programs you want to run manually.
Hibernate, instead of doing all this,
turn yourself off, turn yourself off, kind of stuff.
What it does instead is it basically simply I'll call it freezes the machine.
It takes a snapshot of RAM at the time
Hibernating happens, all of the running programs are in there.
There's nothing that would need to be
restarted because it's already running that image.
That RAM image is actually written to the hard disk.
A hyberfil.sys is a hidden file in the root of your system drive,
usually your C drive, and you'll see that it's usually about
the size of the amount of RAM you happen to have in your machine.
That's on purpose, right?
It ends up containing an image of RAM
at the time your machine goes into Hibernation.
What that means, though, is that when you then turn that machine
back on it, then simply needs to reload that image into RAM and continue.
In theory, it simply needs to reload
that image back into RAM and carry on as if nothing had happened.
To clarify the difference between Hibernate and standby.
Standby doesn't actually turn the machine off.
It doesn't actually do much of anything.
It does not write an image to the hard drive.
It simply tells some hardware to go into standby mode and it keeps a little
bit of power going to your RAM so that the RAM is
actually not emptied by the machine. Turning off that way when you open the lid
or come back from standby, everything is already in RAM.
The downside, of course,
is that hibernate actually physically turns the machine off.
It's using no power
once you're in Hibernate.
If you're in standby there's this little
trickle of power being used, which means that eventually you'll run
down your battery in most laptops, which is why in most cases,
if you're in standby long enough, the machine will automatically go
into Hibernate so that everything isn't lost in case it needs to shut down
completely because it's out of battery power.
Now, I said that
all it really needs to do for coming back from Hibernate is to reload that image
from disk into RAM and carry on as if nothing had happened.
There are two things that come into play.
One is that that's really not enough for your hardware.
For example, your WiFi just to use one example has been off this entire time.
It can't just come back on and assume everything's fine.
The wireless access point probably forgot about it.
So that means that, for example, when your machine comes back
from Hibernation, your WiFi hardware, the driver for that hardware needs
to renegotiate a connection that is hopefully equivalent to whatever
the connection was it had when it went into Hibernate.
When you turn the machine off.
Now, that seems simple in concept.
But the problem i,s the second problem is
that a lot can change between the time you go into Hibernate and the time you come
out of Hibernate. Using wireless as our example.
Once again, if I go into Hibernation at home
with my local area network here and I take it to a coffee shop and I open
it up and I come out of Hibernation, everything's different.
The wireless network that I was connected to isn't there anymore.
The state that was written
into the Hibernation file that has been restored as part of coming back
from Hibernation is essentially Invalid, and the driver needs to recover from that.
Now, the good news is that most drivers do a pretty good job of recovering from it.
It's certainly gotten better over time.
Wifi is a great example,
because chances are if I'm at my local Starbucks and I open up my machine
from having been in Hibernation, it will say, oh, the wireless network I
was connected to a while ago, isn't there anymore?
But there's this other wireless
connection, and I remembered it from a previous visit,
so I'll just automatically connect up to it and things move on.
But it's not as simple as just picking up where you left off because there are some
initialization, reinitialization issues that have to be dealt with because
of the fact that you've actually turned the machine completely off.
This is where it gets complicated.
I've certainly oversimplified what's happening, and this is where it gets.
I'll just call it fragile.
The drivers for all these different pieces
of hardware that need to be aware of Hibernate and sleep
often either aren't, or they don't do a good job of it.
What that means is that in practice,
very often you'll put a machine into Hibernation, open it up again.
And something won't work or something
won't work correctly, or your network will be gone.
Any of a number of other things could manifest as issues problems.
So given that hibernation and standby can be fragile, what do we do?
The approach that I take
for a given machine because it tends to be machine specific
is if hibernation works fantastic,
Yay use it, use it as much as you want because it works.
But if in trying out Hibernation
on a machine, you find that it has these issues when you come back from Hibernation
after you've gone through what made sure that all of your software is up to date,
all of your drivers are up to date, and so on.
If it's still having that problem,
all I can say is avoid Hibernation or at least know that when you come back
from Hibernation, you might find that something isn't
working and you'll have to actually reboot.
So that's something that you'll have
to experience for yourself on your specific machine with your specific
hardware, because like I said, this is one of those things that varies dramatically.
My newest laptop seems to work fine with Hibernation, so I've been using it.
Seems to work fine with sleep, so I've been using it.
My previous one was definitely more fragile,
so I just trained myself never to rely on it.
Sometimes I would.
I was often disappointed most of the time
I would either leave the machine on as I carried it from one place to another,
or I would actually shut down the machine each time.
Now we do have to talk a little bit about
rebooting completely because something you said does actually apply here again.
In theory, you could just use Hibernate forever.
In other words, if your machine turns out to be not one of the fragile ones,
if yours turns out to be able to hibernate and stand by reliably a fantastic but B
that implies you could just keep doing that.
You're going to want to reboot eventually anyway.
And I say that because a lot of update
processes, a lot of cleanup processes, a lot of just random things happen
at reboot time, and I think that that's important to have happen once in a while.
The good news, bad news.
Part of this
is that it's really a moot point because eventually Windows Update is going to make
you reboot anyway rebooting once a month for Windows Update.
That's plenty.
Honestly, that makes me quite comfortable and solves the issue.
So if you can use your Hibernate all month
long and then when it comes time to do a Windows update, you need to reboot.
That's a great scenario.
You've got a good machine that handles it
properly and it's being fairly effective for you.
If, on the other hand, you have a machine that doesn't handle
Hibernate properly, then the whole rebooting issue is moved
anyway because you're probably going to be rebooting instead of Hibernating.
I hope that was helpful. I hope that clarifies a little bit.
Why hibernation and standby both can be considered fragile,
and hopefully if you've got a machine that's working and working properly
with both Hibernate and or standby, be grateful because I don't want to say
it's uncommon.
It is becoming more common.
Things are definitely getting better, but we're talking about getting better
over the course of like the last ten or 15 years, and there are still issues even
after all this time, because this stuff is pretty complex.
But if you've got something that's
working, Yay feel free to use it as much as you want.
For updates. For related links for comments and more,
visit https://askleo.com/3726 I'm Leo Notenboom, and this is Askleo.Com.
Thanks for watching.