[SOLVED] Windows saves last session?

Dec 28, 2018
23
0
20
1
I have shop at the school I attended and we do 2 weeks of shop 2 weeks of academics, so at the end of the shop week we pack up the PC's and put them on a shelf but the following 2 weeks when we went back to shop and I loaded up my PC all my Google chrome tabs were still open and some other windows too, how is this possible if the PC was unplugged for 2 weeks?
 

britechguy

Commendable
Jul 2, 2019
1,482
236
1,340
63
And to add to BFG-9000's comment, that's exactly how regular hibernation has always worked. The whole point of hibernation was to allow the "long term equivalent" of sleep. You could hibernate your system in May, disconnect all power and battery (if laptop), reconnect everything in November and you'd fire up to exactly where you left off. The system state and user state is written out to disk, which is non-volatile.

That's the difference between classic hibernation and Fast Startup. Classic hibernation writes out both the Windows system state and the User activity states to disk for retrieval on next power up. Fast Startup is "partial hibernation" in that only the Windows system state is written out to disc.

As was noted earlier, what you get when something like Chrome or another browser with a sync feature enabled comes back on can vary, as if you've been using it elsewhere during the interim it will, on its first sync to the cloud, determine that somenthing might require changing that had not been in use when the system was hibernated.
 

Colif

Win 10 Master
Moderator
Yes, it remembers the apps and things open when you close it down.

As for chrome, it depends on your settings as it can open last opened tabs on startup. especially if you logged into an account
 

Colif

Win 10 Master
Moderator
Chrome could be your account is set to open previously opened tabs at startup
are you using a login linked to a microsoft account? it could be the info is saved on the account

how does hibernate work over 2 weeks with no power?
 
how does hibernate work over 2 weeks with no power?
By writing everything that's in memory to hiberfil.sys then completely shutting off. On next power-on, the contents of that file are copied back into memory from disk. That includes everything--the state of Windows, whatever is cached in RAM, any open programs.

Files on nonvolatile disk require no power to retain information.
 
Reactions: britechguy

britechguy

Commendable
Jul 2, 2019
1,482
236
1,340
63
And to add to BFG-9000's comment, that's exactly how regular hibernation has always worked. The whole point of hibernation was to allow the "long term equivalent" of sleep. You could hibernate your system in May, disconnect all power and battery (if laptop), reconnect everything in November and you'd fire up to exactly where you left off. The system state and user state is written out to disk, which is non-volatile.

That's the difference between classic hibernation and Fast Startup. Classic hibernation writes out both the Windows system state and the User activity states to disk for retrieval on next power up. Fast Startup is "partial hibernation" in that only the Windows system state is written out to disc.

As was noted earlier, what you get when something like Chrome or another browser with a sync feature enabled comes back on can vary, as if you've been using it elsewhere during the interim it will, on its first sync to the cloud, determine that somenthing might require changing that had not been in use when the system was hibernated.
 

britechguy

Commendable
Jul 2, 2019
1,482
236
1,340
63
By the way, I strongly suggest that Fast Startup be turned OFF as one of the first things you do on any Windows 10 system. Particularly if you have a system with an SSD where it has as close to zero effect as can be.

If one is frequently shutting one's system down, each time the hiberfile.sys file gets written out as part of the process when Fast Startup is on. Eventually, and it always seems to happen eventually, there will be some sort of corruption that creeps in, and once that happens your system can become problematic when the file is reloaded and Windows "burps" on the corrupt part of the system state when it needs to access that data. I have had some of the most difficult to diagnose problems I've ever encountered that were eventually traced to corruption in the system hibernation file.

Hibernation (whether full or of the partial "fast startup" variety) is fine to use ever once in a while or if you're someone who does relatively frequent Restarts, as a Restart forces Windows to reload completely from scratch. But Fast Startup, if one does not use Restart, creates a situation where you're doing a partial hibernation again and again and again in a semi-perpetual loop. This never ends well.

-----------------------------------------
To turn Fast Start off, do the following:

  1. Open Control Panel then select Power Options. This is presuming that you’re using the classic “Small Icons” view in Control Panel. If not, navigate to the “View by” control and select “Small Icons,” then navigate to Power Options.
  2. Activate the Choose what the power button does link on the left side of the dialog.
  3. In the dialog just opened, activate Change settings that are currently unavailable link.
  4. Scroll down to the Shutdown settings section.
  5. Remove the check mark from the Turn on Fast Startup (Recommended) checkbox.
  6. Select the Save Changes Button.

Additional Information

Another name for the Fast Startup is Hybrid Boot.

With a full shutdown everything is closed and nothing is saved.

When the Fast Startup is enabled and the computer is shut down, the User Session is closed, but the Kernel Session is Hibernated. You are not doing a full shutdown, but a partial shutdown and partial hibernation.

From a Microsoft Forum discussion regarding Fast Startup:

“Now here’s the key difference for Windows 8: as in Windows 7, we close the user sessions, but instead of closing the kernel session, we hibernate it. Compared to a full hibernate, which includes a lot of memory pages in use by apps, session 0 hibernation data is much smaller, which takes substantially less time to write to disk.

If you’re not familiar with hibernation, we’re effectively saving the system state and memory contents to a file on disk (hiberfil.sys) and then reading that back in on resume and restoring contents back to memory. Using this technique with boot gives us a significant advantage for boot times, since reading the hiberfile in and reinitializing drivers is much faster on most systems (30-70% faster on most systems we’ve tested).”
 
Fast Startup is the worst possible setup for the Shut Down command--first it logs you out of your Windows session, then it hibernates. So not only does it close all of your apps, you don't even get a clean boot so any misbehaving background process is still malfunctioning. If I wanted to hibernate, then I want to be able to continue where I left off.

The default sleep behavior for desktops is Hybrid Sleep which is both sleep (suspend to low-power state RAM) and hibernate. That way if you wake it from sleep it wakes very quickly, and if power was lost when it was asleep it can still resume from hibernate so all of your browser tabs will still be open either way. So yes, Windows saves your session if you let it time out and go to sleep--but not if you select Shut Down.

For obvious reasons, Hybrid Sleep is not the default behavior for laptops, as that would mean it'd completely drain the battery each time. By default laptops hibernate, which also saves your session.
 

britechguy

Commendable
Jul 2, 2019
1,482
236
1,340
63
I will disagree with your statement about laptop sleep behavior. If you sleep a laptop it sleeps, it does not hibernate, and it can and will eventually run out the battery (or, on some, transition to hibernation once critical battery is reached).

I use both, and sleep is sleep and hibernate is hibernate.
 
I will disagree with your statement about laptop sleep behavior. If you sleep a laptop it sleeps, it does not hibernate, and it can and will eventually run out the battery (or, on some, transition to hibernation once critical battery is reached).

I use both, and sleep is sleep and hibernate is hibernate.
What's there to disagree about? I said the default Windows behavior is to disable Hybrid Sleep when Windows is installed on a laptop, which has nothing to do with what you decide to do with it. If you leave the laptop plugged in, then sleep is of course useful.
 

ASK THE COMMUNITY

TRENDING THREADS