Exploring sleep states in Windows

Microsoft Windows has changed considerably in latest years, everything because of changes on devices: we use smaller, more portable computers, we often want more battery life, but we do not want to lose performance or quick operational mode. If we add to these additional changes related to security, everything will become even more complicated and it is the current state of power settings in Windows: they are complex, some are hidden, some are hard to understand, some generate many issues.

I decided to write this post to explain some items based on my experiences and knowledge gained in the last year – there are many links to external sites (in most cases, Microsoft documentation). To be 100% clear: I use my Dell Latitude 5501 as an example. It’s a bit old, but still a powerful notebook with Intel I7-9850H (6 cores / 12 threads, 14nm+) CPU, 32 GB RAM DDR4 and GeForce MX150 (Optimus with Intel HD).

First of all, start Windows Terminal / cmd and type command to check all available sleep states:

powercfg /a
Available sleep states

Modern Standby

It is possible that you found this post because you looked for information about “Modern Standby”. It was introduced in Windows 8.1 and extended in Windows 10. The idea is simple: because sleep mode is a bit slow (especially weaking up device), system can provide different mode. Something similar to standby, normal working, but still limited. In Modern Standby, the operating system limits power usage by disabling display, limits CPU/GPU/disk activity, but networking and sensors are still available. If you open the lid or use mouse, keyboard, some Bluetooth devices, the system can resume instantly and is ready to work.

Additional advantage: in theory, this mode is great, because a computer can save energy if it not actively used, but still executes some background tasks like Windows Update, checking email etc. A very similar solution to Power Nap available on Apple MacBook. Unfortunately, theory and practice are two different things. It works fine on Apple, but not on many Windows devices: if you have small ultrabook with low-power CPU, then it is fine, but if you use more powerful device like my Latitude, result is different: you can close lid and computer will work in your bag… and will be hot… and after 2-3 hours, when you will need it, battery level will be close to dead.

Microsoft does not provide any information about reasons, but I see two issues. First already mentioned: not all CPUs/GPUs can work fine in this mode. For example, Intel and AMD “H” processors are designed to provide more power for gaming laptops or desktop replacements. Their official TDP (Thermal Design Power) is often 35-45W, a lot in term of power saving when you will compare that to 15W or even less on power-savings mode with low voltage (ULV CPUs like “U” models). Solutions like Nvidia Optimus (or AMD equivalent) can also be problematic. Second item, on Apple we have everything from one company, they have full control over it and provide some additional co-processors.

S3 – Standard Sleep Mode

S3 is standard “sleep mode” we have used for many years. If you have powerful device mentioned above or just issues with Modern Standby, you are probably interested in S3 mode: ok, it is not super-fast, it cannot sync items in the background, but consumes only about 1% of battery every hour, so it it perfect in many, many situations. There are some possible registry changes to disable Modern Standby, but there is a trap: some manufactures completely disabled S3 on BIOS level, and it is not possible to use sleep mode even on different systems like Linux! You can try disabling Modern Standby using the files mentioned, restart the computer and check the status: if S3 is not available, you have a bigger problem.

Hidden settings to control Modern Standby

Good news, there are some settings to configure Modern Standby and disable Wi-Fi/GSM activity – it can save some additional energy. I do not know why, but Microsoft does not report it widely, there is only a small page with some info and video to explain possible modes. The second one we are interested in is Disconnected Standby. If you use Windows 10, you can find related options on Settings > Power & sleep. Microsoft removed these options from Windows 11 settings. Why? Probably it was too confusing for some users.

Fortunately, you can still use commands provided on the mentioned page to change Modern Standby behavior and disable Wi-Fi and GSM activity. Is it helpful? It depends. I did some tests on my Latitude and power usage is lower, but still much higher than in S3 mode… So, it it far from perfect, but may help if your notebook manufacturer is a bastard and blocked sleep mode.

Issues with WSL and Hyper-V

I use Windows Subsystem for Linux (WSL) every day. I think it was a genial Microsoft step, to provide something like that: it is a combination of two worlds, all applications available from Windows, and a lot of tools for Linux, including ability to use systemd and Docker inside WSL. Everything with performance close to native Linux. There is an interesting point: Windows offers Hyper-V, virtualization hypervisor to create and manage virtual machines. It is available only in “Pro” versions. WSL is also virtualization, but it is available on all Windows editions including “Home”, so can be used also in many gaming laptops.

WSL “under the hood” uses some Hyper-V features, but optional feature “Hyper-V” is not required to use WSL. You still may want to activate Hyper-V just to reduce vhdx images size. Watch out, there is a trap! If you do that, hibernation will not work. Option will be still visible, but computer will stop hibernating and it will be visible on event viewer. Reason? Hyper-V was designed to work continuously and should not be used in devices with hibernation. Remember that when you enable that on notebooks: because hibernation will be not active, your system will not do anything even on critical battery level. It means you can lose your work because the system will just shutdown.

Hyper-V is not required to use WSL

Microsoft Defender System Guard

There is one more trap: Microsoft Defender System Guard (Firmware Protection). It is additional security feature added in Windows 10, available on Windows Security > Device Security > Core Isolation if computer meets all requirements, one of them is enabled Intel TXT (Trusted Execution) or AMD Secure Launch. I do not want to describe all the details, but to be fair: it is a very nice and strong feature if we focus on security. In combination with other virtualization-based functions like Memory Integrity, built-in sandbox, Application Guard and Secure Boot, offers simple option to harden Windows and make it immune to a lot of attacks. To be honest, Apple does not offer similar options and does not use virtualization so intensively to improve users’ security.

We can enable that by just switching toggle, but there is no information about one important “detail”: if we will do that, S3 mode will not be available anymore. It is not a bug, but a limitation, it is not possible to provide a fully secure system with enabled sleep mode. Good think this mode is not enabled by default, also options like Intel TXT are not enabled by default on notebooks BIOS/UEFI, so it is not a big problem. Important info: you can always enable Intel TXT if you need that (for example in some virtualization software), but of course do not enable Microsoft Defender System Guard.

Firmware Protection (Microsoft System Guard)

Conclusion: what should I use?

Answer to this question is not simple. Everything depends on your use cases and machine. If you have something like Surface, small ultrabook and work mostly in browser or Office, it should be fine to use default settings i.e. Modern Standby, eventually just disables Wi-Fi and GSM activity if you do not need these options and constant synchronization.

With other devices, everything is more problematic. My Latitude is ready for Modern Standby but is definitely not good choice: 14nm+ CPU with a bit big TDP and Nvidia Optimus can cause a lot of issues. And they do that: idle battery life is bad. I can disable Modern Standby and use standard S3, it is fine, slower, but provided the best results. If your computer manufacturer blocked that, you must use Modern Standby with hibernation and just adjust settings.

If you do not need superb security features, and your computer supports S3, do not enable Firmware Protection. If you need Hyper-V all the time, forget about hibernation. If you do not, also, do not enable it to not lose this option. Some modern, enterprise-level computers can use all virtualization-based security features, so S3 will be not available, but there is still Modern Standby and hibernation: and it is fine.

In such a situation, if you need more power the only choice is to hibernate the computer manually or shut it down and start again when you need to work. Remember, you can change the power plan settings to hibernate much faster, not on critical battery level, but even after few minutes. Of course, it means, “weaking up” will be much slower than previous S3 mode, even on modern NVMe devices. It can also hit your SSD lifespan because Windows must write RAM content to drive.

One small comment: I think there is nothing bad in the changes provided by Microsoft. They wanted to improve Windows security and they did it in a comprehensive, great way. It was required to spend some energy/performance on it, but options are not enabled by default, so we still have a choice, and it is great.

Leave a Reply