How do I stop Windows 10 going to sleep after locking with Win+L key

70

25

I've got a Dell XPS 13 (9360) with Windows 10 Home.

Steps to reproduce:

  • Open power options (Win-X, O)
  • Click change plan settings next to the current plan ("Dell" in my case)
  • Set both "on battery" and "plugged in" change "Put the computer to sleep" to something high or "Never" (I have 15 mins for battery, 1 hour for plugged in, tried "Never" for both too)
  • Click save changes
  • Open screen saver settings (Win-S, Change screen saver)
  • Ensure screen saver is off (None)
  • Ensure "On resume, display logon screen" is off
  • Click OK
  • Lock computer with Win-L
  • Wait...

Expected behaviour:

  • Screen switches off after a short delay (~30 secs).
  • Computer stays on, crunching whatever data you've left it to do.

Actual behaviour:

  • Screen switches off after a short delay (~30 secs).
  • Computer goes to sleep after a further ~15 seconds.

I would've thought this was a simple problem, but I've spent over two hours Googling etc for a solution. The closest I could find to my problem was this, which is similar but not the same, and the solution doesn't work for me:

Dave E

Posted 2016-12-05T15:33:11.243

Reputation: 801

What happens if you choose "Never" for "Put the computer to sleep". Locking the computer is not supposed to put it to sleep if you ask me. This is my preferred choice. For sleep you can close the lid (if it is a laptop) or use Alt-F4 and choose the option to actively put it to sleep. – Michael S. – 2016-12-05T15:42:17.037

@MSC "Never" makes no difference. It even goes to sleep when locking while it's plugged in. – Dave E – 2016-12-05T15:46:40.463

1@DaveE Do you have any "energy optimization" software (I call it bloatware) installed? I have seen those preinstalled on some devices, check for any programs by Dell, Intel or other hardware manufacturers. – Hexaholic – 2016-12-05T15:52:00.753

It could be a Dell specific feature that needs to be changed which may overrides Windows Power Options – Sanny – 2016-12-05T15:52:08.237

@Hexaholic - It's really not bad, bloatware-wise. I can't find any Dell-specific power apps etc, only a Dell power plan. The standard "Balanced" plan has the same behaviour. – Dave E – 2016-12-06T07:38:17.073

Answers

102

After running PowerCfg /q and reviewing this page, I believe I have determined the solution to this problem.

There appear to be many power settings that just don't show up in my advanced power options window. One is Sleep → System unattended sleep timeout. To make it visible, I opened regedit.exe and found this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0

Set its Attributes DWORD value to 2. This will make it show up in your advanced settings. Go there and configure it to be zero minutes if you don't want it to sleep when you lock your screen.

Rob M

Posted 2016-12-05T15:33:11.243

Reputation: 1 141

10If you vote me down, please provide a comment so I can improve my answer. – Rob M – 2017-03-09T14:25:31.273

Awesome ! Had this problem with my SP3, it was driving me nuts...! After making the register change, it shows "Standby if the computer is not used" parameter in the Power settings (under "Standby"). – Michaël Polla – 2017-08-29T09:18:42.737

8This definitely worked. I can't believe they hid this option behind a registry flag, and that it's different than the normal sleep setting. So dumb! Thanks for the help! – qJake – 2017-10-02T17:35:31.510

6Lenovo thinkpad here, this is the only thing that fixed my issue. It was set to 2m by default and I couldn't change it without this hack. Stupid windows. – Anyone – 2018-07-03T10:49:56.350

Surface laptop user here. This behavior suddenly appeared after my most recent round of Windows updates. Thank you for posting this solution! – RESPAWN – 2018-08-16T13:18:11.090

16After changing that registry value, I had to right click on the desktop and go to Display Settings, then click 'Power & sleep' on the left, then click 'Additional power settings' on the right, then click 'Change plan settings', then click 'Change advanced power settings', then expand the 'Sleep' setting, then expand the new 'System unattended sleep timeout' setting and this is where you can up the minute value so it doesn't sleep after 2 minutes or whatever. – tclark333 – 2018-09-26T11:38:21.903

1This may be the most helpful answer I've ever found on any StackExchange site, and I've found a lot of helpful answers over the years. – Scott M – 2019-03-01T14:21:29.857

Thing is, my computer will immediately go to sleep after the lock screen goes blank after locking with Windows-L. It wasn’t even waiting for 2 minutes. And setting this setting to 0 doesn’t change the behavior at all. Dell XPS 15 9570 Windows build 18358.1. – binki – 2019-03-18T18:10:39.167

8

Thanks, very helpful.

I found this official link about this on Microsoft Docs which I thought might be helpful:

Sleep unattended idle timeout, Windows Vista with Service Pack 1 (SP1), Windows Server 2008 R2, and later versions of Windows.

Specifies the duration of inactivity before the system automatically enters sleep after waking from sleep in an unattended state.

For example, if the system wakes from sleep because of a timed event or a wake on LAN (WoL) event, the sleep unattended idle timeout value will be used instead of the sleep idle timeout value.

Aliases and setting visibility Windows Provisioning: UnattendTimeout

PowerCfg: UnattendTimeout

GUID: 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0

Hidden setting: Yes <-- Unhidden with: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\Attributes = 2

Values The value denotes the number of seconds.

Minimum value: 0 (Never idle to sleep) Maximum value: Maximum integer

stevem26

Posted 2016-12-05T15:33:11.243

Reputation: 81

3Strange that it says "when waking from sleep in an unattended state." But if you lock the screen that clearly isn't the case. – Dean Or – 2019-03-07T01:26:14.340

Definitely bug in Windows 10. – Mike Makarov – 2019-11-18T14:09:19.583

1

I also found this about letting Console Lock been seen - and changed. This allowed my power options to change it to 0 minutes, and then allowed screensaver to actually start.

https://www.eightforums.com/tutorials/8267-power-options-add-console-lock-display-off-timeout.html

HTH

TrayS

Posted 2016-12-05T15:33:11.243

Reputation: 29

5External links can break or be unavailable, in which case your answer would not be useful. Please include the essential information within your answer and use the link for attribution and further reading. Thanks. – fixer1234 – 2018-01-25T18:48:17.330

1

We had the same issue with a bunch of XPS 9370s, the laptop went into standby after the screen was locked. We have one laptop where the issue did not occure and exportet it's power scheme. By importing it to the other XPSes were able to make them have as expected - but by now we have no clue why.

You can findn the exported power scheme here: https://www.dropbox.com/s/mvajdkh14358471/dell.pwr?dl=0

Import it with an elevated prompt: powercfg /import 'fullpathtofile'

Bernhard Hahn

Posted 2016-12-05T15:33:11.243

Reputation: 11

0

Make sure your mouse and keyboard are not connected to the USB ports of your monitor. If your monitor goes to sleep, your mouse and keyboard will not function and make it seem like your computer went to sleep.

JAKS

Posted 2016-12-05T15:33:11.243

Reputation: 1

1So you’re suggesting that the premise of the question might be wrong, and that the computer is not really going to sleep, but the OP merely believes that it is? – Scott – 2019-04-12T19:39:38.887

@Scott Some might do... There's yet another hidden setting for very quickly (2 mins by default I think) turning the screen off (not sleeping) if you are on the lock screen. Though on most computers there's some LED to indicate that it's not sleeping. – ddekany – 2019-07-14T17:41:21.290

0

Control Panel => Hardware and Sound => Power Options has these settings:

HDD
    Turn off hard disk after:
Wireless Adapter Settings
    Power Saving Mode:
Sleep
    Sleep after:
    System unattended sleep timeout:
    Hibernate after:

It seems like "System unattended sleep timeout" can be changed from GUI too in Windows 10.

Nishant

Posted 2016-12-05T15:33:11.243

Reputation: 555