Solved How to require sign-in after sleep, but ONLY after sleep, not just inactivity


OsakaWebbie

Member
Local time
5:47 PM
Posts
12
Location
Osaka, Japan
OS
Windows 11
I normally keep my PC plugged in and running, sitting open on my desk at home. In that situation, I let the screen turn off after inactivity, but it never enters sleep mode. However, on battery power it will go to sleep after 10 minutes, and also whenever I shut the lid. In Windows 10, it would require sign-in after waking from sleep, which is good.

In Windows 11, I don't know how to make it behave that way. In Accounts -> Sign-in options, there is a setting: "If you've been away, when should Windows require you to sign in again?" Obviously I set that to "Never" - I don't want to have to sign in over and over at home, just because I didn't use the PC for awhile. But if I shut the lid, that means I'm taking it somewhere or walking away from it in public, so I want it to safe itself and require sign-in. (I don't care whether it requires sign-in after time-out sleep, but that's probably all one setting, so that's okay.) How do I do that?

Current settings:

1662883050390.png

1662882933177.png
 
Windows Build/Version
Windows 11 Home, 21H2, build 22000.856

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
Just to avoid any misunderstandings, please would you post the results of this command
PowerCfg -a
so that your power states can be understood.

The normal tutorial for your situation is
Enable or Disable Require Sign-in on Wakeup - ElevenForumTutorials


All the best,
Denis



Welcome to ElevenForum.

It's really worth making time to browse through the Tutorial index - there's a shortcut to it at the top of every page [within the Tutorials dropdown list].
- At the foot of the Tutorial index is a shortcut to download it as a spreadsheet.
- I download a new copy each month.
- By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
- Tutorials are also listed at Tutorials - there's a shortcut to that at the top of every page.

You can search ElevenForum using the search box in the top-right corner of all ElevenForum webpages or using Advanced Search - ElevenForum
- You can also search ElevenForum threads in many general search engines, such as Google, by adding site:elevenforum.com after your search term. For example,
Taskbar setup site:elevenforum.com
- [This is what the search box in the top-right corner of ElevenForum webpages does automatically]
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
Code:
PowerCfg -a
The following sleep states are available on this system:
    Standby (S0 Low Power Idle) Network Connected
    Hibernate

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.
        This standby state is disabled when S0 low power idle is supported.
    Standby (S2)
        The system firmware does not support this standby state.
        This standby state is disabled when S0 low power idle is supported.
    Standby (S3)
        The system firmware does not support this standby state.
        This standby state is disabled when S0 low power idle is supported.
    Hybrid Sleep
        Standby (S3) is not available.
        The hypervisor does not support this standby state.
    Fast Startup
        This action is disabled in the current system policy.

I guess what I was calling "sleep" is actually "modern standby" on this PC - I'd never even heard of that! And I had gotten the impression that hibernation had gone away as a Windows feature - the only choices when I click Start and then the power icon are Sleep, Shut down, and Restart.

Anyway, I looked at the tutorial you linked, but Options 1 and 2 only affect the same setting I changed when I first got the PC: "If you've been away, when should Windows require you to sign in again?" That setting does not differentiate between the screen turning off and the PC going to sleep - it will force sign-in after both or neither, which is why I posted my question. Options 3-6 in the tutorial say, "This option is only available if your device does not support Modern Standby." so I guess they are not available to me. Any other ideas?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
That setting does not differentiate between the screen turning off and the PC going to sleep
Your computer does not sleep. S0 is a glorified idle condition not sleep in the sense that we have come to know it [S3 Sleep].
You enter S0 Modern standby [aka S0 Low power idle] as soon as your Power options turn off your display.
They are not two separate events.

There are, in effect, four Power/Computer states for an S0 Modern standby [aka S0 Low power idle] computer
- Computer on, Monitor on {Work can be done on the computer}
- Computer on, Monitor off = S0 {The monitor turning off initiates S0 Modern standby i.e. idle}. No user-desired activities take place, only MS-desired ones such as WU & their built-in email app.
- Hibernate
- Off

You could consider disabling S0 in the hope that S3 Sleep will automatically get re-enabled [as it does for many people but not, alas, for me].
Disable Modern Standby in Windows 10 and 11 - ElevenForumTutorials


Best of luck,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
Your computer does not sleep. S0 is a glorified idle condition not sleep in the sense that we have come to know it [S3 Sleep].
In that case, in the power menu (and all the settings that talk about sleep) they should call it "Idle" or "Standby", not Sleep. Sigh!

From the latest tutorial you linked:
Connected Standby, and consequently Modern Standby, enable an instant on / instant off user experience, similar to smartphone power models.
Strangely, sometimes waking up from Modern Standby is that way and other times it's about the same as sleep on my old Win10 PC, showing the MSI logo for a few seconds (like at boot) before doing whatever it will do next (either the lock screen or my work interface, depending on the afore-mentioned setting). I don't know what causes that difference. But I don't much care - as I said, I don't put it to sleep very often, and when I do, I'm happy to have the more serious sleep, or even hibernate.

I have now used Control Panel (why the heck are more and more settings removed from Settings and only in the hidden legacy Control Panel? I guess they don't trust users!) to make it hibernate when I close the lid and to add Hiberate to the power menu. But even after hibernation, there is no requirement for sign-in if "If you've been away, when should Windows require you to sign in again?" is set to "Never". I'm not quite ready to try the radical disabling of Modern Standby (which might not work anyway, as you said - I see lots of others on the web saying it doesn't work for them either, and it seems that it can cause the PC to crash in the process), but if waking from hibernation doesn't do what I want, I have no confidence that S3 Sleep will do it.

Any more clues? Now that I'm learning more terminology, searches are becoming more effective, but I still haven't even found anyone else interested in what I'm trying to do. Is it really that strange to want to require sign-in after sleep/standby/hibernation but not merely when the screen turns off to save power?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
Perhaps you can ask about "That setting does not differentiate between the screen turning off and the PC going to sleep" in the Enable or Disable Require Sign-in on Wakeup - ElevenForumTutorials tutorial thread itself.
- Do remember to tell them you have S0.
- I don't have sign-in required for bringing the screen back on or for waking up so my knowledge is rusty. I don't recall there ever being an option for a sign-in requirement when bringing the screen back up [unless you'd used a screensaver since that could be set to demand sign-in].

Disabling S0 the way the tutorial says, Disable Modern Standby in Windows 10 and 11 - ElevenForumTutorials, seems to be reliable.
- I recall only one user saying it didn't work at all but they never elaborated on what happened.
- The part that did not work for me was S3 being enabled afterwards. S0 was disabled okay. I had to reinstall my WiFi adapter driver because it started playing up & that resolved its problem.
- The procedure to disable S0 has gone through two or three major changes during the life of Windows 10. It used to be a much more convoluted procedure involving the use of third-party utilities. Perhaps some of the reports you've seen on the web have been about those earlier procedures.

Best of luck,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I already did that, as I tried to explain in my previous comment. If "If you've been away, when should Windows require you to sign in again?" is set to "Never", even having the lid initiate hibernation does not cause the wake-up to require sign-in.

After your previous comment here, I asked on the tutorial's comment thread, but there are only two other people watching that thread, so I don't if there will be much response.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
Perhaps I had not quite appreciated the full significance of some of your earlier comments.
As I understand it, you cannot force it to require sign-in upon wakeup [from hibernate because that is the only proper wakeup you have being an S0 computer] using the tutorial Options 4 or 6.
What happens when you try Options 4 or 6?
That should only affect hibernation not S0 so if you also set the lid close action to hibernate you'll get what you want.

The 'Users who are viewing this thread' box shows only those currently on this page. It does not show you who has set 'Watch' on the thread.

All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
What happens when you try Options 4 or 6?
I hadn't tried any of those, because they all say, "This option is only available if your device does not support Modern Standby." I have Win11 Home, so Option Six is not possible, but I tried Option Four. Running Powershell as Administrator:

Code:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Windows\system32> powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 1
PS C:\Windows\system32> powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 1
PS C:\Windows\system32>

There is no change - it still doesn't require sign-in after closing the lid, waiting a few minutes to make sure it really hibernated, opening the lid, and pressing the power button to wake it back up.

P.S. Thanks for the clue about the viewing vs. watching - I'm new to this forum.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
Well, I'm not new to this forum so I should have noticed that S0 warning before posting my suggestion.

So, unless somebody else chips in with other ideas, you might only be able to achieve what you want by disabling S0 first.
The disable S0 change is a single, simple operation & it is also easily reversible with another single, simple operation. The tutorial provides the full command you need to disable and the other one for re-enable.
I am biassed. I always regarded S0 as a curse and I feel well shot of it even though I am left with hibernate as my only 'low power' state [because my S0 computer is a limited-capability one, a tablet with integrated keyboard].

You can make a system image beforehand if you want to be completely confident of being able to get back to where you started. This is always worthwhile before any significant change; I make a new system image every month.
my ditty - File backup vs imaging, imaging utilities, backing up drivers [post #3] - TenForums
A simpler 'backup' for this particular task is to 'Export' the relevant registry key in .reg format. If you want to do this but are not familiar with working in the Registry then I can guide you through it. I think it's a useful skill to acquire and this is nice, straightforward example to use for learning.

All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I disabled S0, but I did not gain S3 as an option, so I guess I'm in the same boat as you:
Code:
PS C:\Windows\system32> PowerCfg -a
The following sleep states are available on this system:
    Hibernate

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.
    Standby (S2)
        The system firmware does not support this standby state.
    Standby (S3)
        The system firmware does not support this standby state.
    Standby (S0 Low Power Idle)
        The system firmware does not support this standby state.
    Hybrid Sleep
        Standby (S3) is not available.
        The hypervisor does not support this standby state.
    Fast Startup
        This action is disabled in the current system policy.

It's weird that it says, "Standby (S0 Low Power Idle) - The system firmware does not support this standby state," even though it's merely overridden by a registry entry.

After the change, the "If you've been away, when should Windows require you to sign in again?" setting now has only two choices: "Never" and "When PC wakes from sleep" (the latter being a new option). The term "sleep" apparently also includes hibernation, and fortunately does not include screen-off - yay! I tested briefly, and so far it does what I want - it requires sign-in after hibernation but does not after screen-off triggered by inactivity.

Waking from hibernation seems similar in speed to waking from S3 sleep on my previous computer, and I assume it would hold battery charge longer than S3 sleep did, since (if I understand correctly) it's storing the state on the SSD instead of in RAM. I get the impression that S3 is considered legacy (perhaps even deprecated) and S0 is supposed to be what we should all like if we have a PC that supports it, but so far I'm not convinced.

I'll mark this as solved, although I still think Windows should allow a distinction between S0 and screen-off for purposes of sign-in requirement. I'm sure there are lots of people like me who mostly work in a secure location but occasionally venture out and want an easy way to protect their machine without losing their in-progress windows.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
After the change, the "If you've been away, when should Windows require you to sign in again?" setting now has only two choices: "Never" and "When PC wakes from sleep" (the latter being a new option). The term "sleep" apparently also includes hibernation, and fortunately does not include screen-off - yay! I tested briefly, and so far it does what I want - it requires sign-in after hibernation but does not after screen-off triggered by inactivity.
I'm glad the original problem is finally resolved.


I disabled S0, but I did not gain S3 as an option, so I guess I'm in the same boat as you:
Shame. I think it depends on several things [including but not limited to the CPU] but it's not documented anywhere.


It's weird that it says, "Standby (S0 Low Power Idle) - The system firmware does not support this standby state," even though it's merely overridden by a registry entry.
I agree. MS also say that you cannot switch between S0 & S3 without a full reinstall. Perhaps they don't understand it either.
I understand that S0 is actually an Intel initiative that MS & others have merely reacted to.


Waking from hibernation seems similar in speed to waking from S3 sleep on my previous computer, and I assume it would hold battery charge longer than S3 sleep did, since (if I understand correctly) it's storing the state on the SSD instead of in RAM.
Yes, there is a very small [unquantified] amount of power used during Hibernation so it would eventually collapse into an off state when the battery drained but I don't know if it would resume afterwards {since the hiberfil.sys file would still be intact} or run a full start sequence.
MS said:
Hibernate uses less power than sleep
Shut down, sleep, or hibernate your PC - MSSupport


I get the impression that S3 is considered legacy (perhaps even deprecated) and S0 is supposed to be what we should all like if we have a PC that supports it, but so far I'm not convinced.
Yes, I get the same impression but another member recently contacted Intel and got confirmation that a fairly recent CPU supported S3.
Does anyone know if these processors support System Power State S3 (Deep Sleep) - ElevenForum
I hope to avoid buying a new computer for a few years yet but I intend to ask about the CPU when the time comes. I also intend to ask the computer manufacturer to send me the PowerCfg -a results but I bet I'll have a problem getting such co-operation.


I still think Windows should allow a distinction between S0 and screen-off
But screen off = S0 i.e. S0 kicks in when Power options turns off the display.
You can monitor this in Event viewer - see Import Event viewer, Custom views - Start-Shutdown, Power state transitions - my post #2 - TenForums.pdf
EventIDs - 506 {Entering}, 507 {Exiting}.
Power - Sleep-Hibernate-S0 transitions - trimmed.png
I only seem to have captured a screenshot that includes the General tab for an exit [507].
Exiting S0 - trimmed.png
As mentioned in my link, you can ignore the word connected in these events. It says connected whether you use connected or non-connected S0.
Enable or disable Modern Standby connectivity in Windows 10 and Windows 11 - ElevenForumTutorials



All the best,
Denis
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I'm glad the original problem is finally resolved.
Actually, I spoke too soon. My initial test of screen-off was to change "When plugged in, turn off my screen after" to 1 minute, wait until it turned off, wait another 30 seconds or so for good measure, and then move the mouse - it behaved as expected (turning the screen back on without a sign-in). So I declared it solved, changed the setting back to 20 minutes, and went back to work. But when I came back to my PC after dinner, it had gone into hibernation! I don't even see a setting that would do that:

1663067379146.png

On my old PC, as well as this one when S0 was enabled (see the screenshot in my OP), this section of settings had four settings: screen off and sleep for each of the two power modes. But there is nothing about hibernation. It is currently set to hibernate when the lid is closed, but I didn't close the lid. And last night (before I disabled S0) it did not hibernate overnight.

So I did a test under observation: I set the time back to 1 minute, stopped using the PC, started a stopwatch, and sat nearby and read a book. The screen turned off just shy of a minute, and then at around 14 and a half or 15 minutes after that, I heard the fan stop, alerting me that it had gone into hibernation (and confirmed with the lack of a light on the power button and the fact that the mouse would not wake it up). What the heck? I don't want it to hibernate when it's home and plugged into AC power - I'll never get a nightly backup done if it keeps doing that!

For now I've changed "When plugged in, turn off my screen after" to "Never" and enabled a screensaver instead. That's not my preferred long-term solution, but I want to see if it goes into hibernation while I sleep tonight.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
The Event viewer, Custom view from my post #13 will confirm when the hibernation took place.

For now I've changed "When plugged in, turn off my screen after" to "Never" and enabled a screensaver instead.
I did that as a halfway house when I still had S0.
It stops S0 ever starting.

All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I did that as a halfway house when I still had S0.
But you're not doing that now, right? If you are allowing your screen to turn off now, does it hibernate after the screen has been off for awhile?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
But you're not doing that now, right?
No, I've disabled S0.

If you are allowing your screen to turn off now
Which I do. My screen turns off after two minutes inactivity unless I switch over to a power plan that keeps it on the whole time.

does it hibernate after the screen has been off for awhile
I do not have it set to hibernate after any period.
It only hibernates when I tell it to e.g. Start button, Power, Hibernate.
I've got the feeling that I am missing your point here.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
I do not have it set to hibernate after any period.
It only hibernates when I tell it to e.g. Start button, Power, Hibernate.
That's exactly how I thought I had mine set. That's why I am confused about why it is hibernating after inactivity. I see no setting for that - how is that controlled?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).
If your S0 is disabled, Power options.
If you still have S0, albeit holding it off by keeping the screen on, I expect it to operate as usual. Mine did.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3296
Ah, thanks - I finally found it. I had already looked at Power Options before, but I hadn't noticed the tiny link at the bottom: "Change advanced power settings". And after scratching my head about what number to change the 15 to, I discovered that 0 means "Never".

1663164265873.png

I'll try again to consider this issue solved. Thanks for all your help, Denis!
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI Modern 15 A5
    CPU
    AMD Ryzen 7 5700U
    Memory
    16GB
    Graphics Card(s)
    AMD Radeon Graphics
    Monitor(s) Displays
    15" laptop display + LG 34" ultrawide
    Screen Resolution
    1920x1080 + 3440x1440
    Hard Drives
    512GB SSD
    Browser
    Firefox Portable
    Antivirus
    Avast! Antivirus Free
    Other Info
    PC, keyboard, and OS are Japan-based, but interface language is set to English for my convenience (American living in Japan).

Latest Support Threads

Back
Top Bottom