Windows has got a lot of puzzling shutdown options. Light in the dark comes here.
These shutdown and restart options do exist:
- Real shutdown: the computer is shutdown completely, no drivers or stuff is stored anywhere. When booting after the real shutdown, it is like in the ancient days. The computer boots afresh from the hard drive. Slow.
- Fake shutdown: this is the standard option in Windows 10. Drivers and stuff are copied from RAM to the drive and the computer is switched off.
When booting again, drivers and stuff are read from hiberfil.sys.
- Hibernation: the computer’s complete RAM is stored in the hiberfil.sys, then it is switched off.
When booting again all is read from the hiberfil, so you can continue exactly where you left. Computer does not use any energy in hibernation.
- Sleep: some energy consuming parts of the computer are switched off, but the RAM stays alive. Computer still uses some energy to keep the RAM alive.
- Restart: Like a real shutdown (1.) and boot.
- Menu-Shutdown nowadays does only a fake shutdown, if hiberfil.sys usage is on. Then it stores drivers and stuff in the hiberfil.sys and reads them back from the hiberfil at startup. Therefore, shutting down and then booting your PC probably does not what you thought it does, namely a startup of a clean system.
- Menu-Shutdown with pressing the Shift-Key: Does a real shutdown. Starting from here does a clean startup.
hiberfil.sys is used for fake shutdown and hibernation.
powercfg.exe /hibernate [on|off] switches on/off the creation of hiberfil.sys. So this also switches on/off the fake shutdown. If you get an error message about an unexpected error (0x65b) when running this, you should start cmd as Administrator.
powercfg.exe /hibernate [on|off] does not switch on/off the menu option for hibernation.
- A restart always does a real restart, not a fake shutdown.
- When hiberfil.sys is in use, you can put the computer to hibernation by
shutdown /h and you can do a full shutdown by
shutdown /s /t 1. You can put these commands directly into the target of a desktop shortcut. Use e.g. target
C:\Windows\System32\shutdown.exe /h and run in
That’s not all. The hiberfil.sys can exist in several modes. In the
reduced mode it cannot support hibernation, but only fake shutdown. In
full mode it supports both, hibernation and fake shutdown. You can set reduced or full mode as an admin with powercfg:
powercfg /h type reduced or
powercfg /h type full
And there’s a registry key which determines which mode is used for hiberfil.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power and there look for the DWORD
HiberFileType. If that is on 1, the hibernation mode is not possible. Then, switch it to 2. The HiberFileType key’s values are:
0 – HIBERFILE_TYPE_NONE
1 – HIBERFILE_TYPE_REDUCED
2 – HIBERFILE_TYPE_FULL
3 – HIBERFILE_TYPE_MAX
HibernateEnabled must be on 1.
System Power States or Sleep States
MS defined 5 sytem power states, S1 to S5, also called sleep states sometimes. S5 being fully off and S4 being the hibernate state. S1-S3 are varying sllep modes, the higher the number, the more is switched off. It depends on the hardware which of these modes is supported.
powercfg -a in the shell lists available modes. On my it says:
Ruhezustand (resting state)
Hybrider Standbymodus (hybrid standby mode)
Schnellstart (quick start)
S1, S2, S3
I do not know how S1 to S5 correlate to real shutdown, fake shutdown and so on. But from the result of
powercfg -a it seems, there are states that do not correlate to these numbers at all. It’s all a big mess.