4

I usually have my computers set up to require a login after waking up from sleep or hibernate, but I don't want to enter a password if the screen is just turned off, either from a timeout or if I manually turn off the screen via software. This could be an external monitor that I do not want to turn off with the button on the display or an integrated screen of a laptop.

Up until now, this worked fine on all my desktops and laptops with Windows 10. I even have some desktops running Windows 11 that also do. However, I have a new laptop that runs Windows 11 that always locks the display if the screen is turned off.

If you look at this superuser question you see that a command such as powershell.exe -Command "(Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)" is discussed. Or nircmd is used in this question. The same is discussed in this question. Or I could just wait the amount of time set in the energy options in Windows.

My problem is, that it does not just turn off the display, but if I try turning the display back on again by hitting some key, I am greeted with a login screen, as if I send the device to sleep. In this case, I want to see the lockscreen, because sleep should lock my device. I disabled modern standby, because it seems to cause problems for me in general and also with this behavior from what I gathered. I also found this post that also discusses my problem, but it does not work for me. It looks a bit different than the 2nd image in the article, it says that Windows should ask for a password after energy savings mode is exited, which is what I want.

So maybe the "turn display off command" is putting my device to sleep instead of just turning my display off. On all my other devices, this work great, but it is driving me crazy on this single machine. How do I configure Windows correctly so that the "turn off display" command (either manually or when I am away for a short time) does NOT lock my screen or sends my device to sleep?

EDIT: Here is screenshot of the new settings panel for login enter image description here. As you can see, the top option is locked for some reason and the unchecked checkbox below says "permit locking if you are away".

user579825
  • 101
  • 8

1 Answers1

1

However, I have a new laptop that runs Windows 11 that always locks the display if the screen is turned off.

I had this issue with a new (2022) Lenovo X1 Carbon with Windows 11 Pro.

Yes, you can turn off: "Only allow Windows Hello for this device" and additionally "If you have been away for a while, should Windows require signing in".

These are both found in Start, Settings, Accounts, Sign In options.

You need to be sure you are the only one with physical access to your computer as disabling these security settings could be a risk for a public computer.

See screen shot below to assist

Disable Windows Hello for display off

.

When you walk away for Lunch or a meeting, Windows Key + l to lock the computer.

John
  • 46,167
  • 4
  • 33
  • 54
  • My device is a Lenovo advice as well... The problem with this answer is, that it does not do what I want. I want my device to still lock itself after a timeout I set. Just not when I manually turn off the screen. I explicitly tried to describe this. This works without a problem on my other Windows 10 or 11 devices, just not on this new machine. – user579825 Feb 19 '23 at 12:32
  • I added a screenshot of the same settings dialog posted here as well. You can see that the top option is missing and the 2nd option is locked for me. However, the behavior you describe seems to be off for me. – user579825 Feb 19 '23 at 12:38
  • You either have to allow the computer to lock all the time or not at all . It cannot do it sometimes. I turn off locking and then use Win+L to lock – John Feb 19 '23 at 13:07
  • Well I want to lock my machine if I close the lid or maybe after being away for multiple hours. But I still want to be able to send a command to just turn off my screen, which I cannot now. This is what my question if about. This works perfectly fine on my other machines, but on this machine, it locks the screen for some reason. Why is the behavior different? – user579825 Feb 19 '23 at 13:31
  • Besides, the settings are locked for me... – user579825 Feb 19 '23 at 13:34
  • Is this a company machine? You may need to get the company and ask them to help set. Also, suspend is a different issue here. Set the way I said and then suspend by closing the lid will lock the machine. Lenovo BIOS (I think) has a part in Windows Hello settings (above) and my changes fix the Hello part and do not change the suspend part. – John Feb 19 '23 at 13:55
  • No, this one is not. I can try to fiddle with this a bit more again, but still, I cannot understand at all, why sending a monitor off command locks the screen. Everywhere else, it works just fine, but with my settings from before, the machine presents a lock screen. – user579825 Feb 19 '23 at 14:32
  • If I change the dropdown in your image away from "Never", I can turn off the screen with a command, but then, if I send the machine to sleep via command (or by closing the lid), the machine does not get locked automatically. – user579825 Feb 19 '23 at 18:53
  • Something seems strange to me. Try reinstalling power drivers, set the power plan to Balanced and the reset the plan properties. – John Feb 19 '23 at 19:51
  • Well the option does exactly what it says it does. If you set it to "never" it does not lock your scren. Does "never" lock your screen if you close the lid? On the other hand, the options does not say that "turn off monitor" should lock your screen. The machine was already nuked once back to factory settings; I created a new blank power plan based on balanced. Well, at least I can turn off the screen now, but then I have no automatic locking it seems. – user579825 Feb 19 '23 at 23:35
  • If you are going to suspend, suspend certainly works, but if you set the option above to Never, then the computer does not lock. Since I have my computer on and ready 95% of the time, then this suits me. If I were travelling, I would probably use the default way Windows 11 works. So your screen can turn off without requiring sign in (you said) but you may need to make a choice if travelling a lot where you may not have control of opening the computer. – John Feb 19 '23 at 23:49
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/143027/discussion-between-joseph-dalton-and-john). – user579825 Feb 20 '23 at 14:12
  • @user579825 Did you ever find a solution to this issue? I just got a new P15v and I'm experiencing the same issue- never had this problem on my T580; it's quite maddening! – nickpish Jun 09 '23 at 23:07