Lock the screen automatically when it turns off on Windows

I hate how the lock screen works on Windows. This is perhaps an oversight and for me a security issue, so I’ll share some information on how to make it work better.

This applies to pretty much all Windows versions in use today as far as I can tell.

By default, when Windows turns off the screen, it won’t lock it. It makes no sense to me why this is the default behavior. If you only see a black screen, you cannot be sure if it’s locked or not and have to check, or you risk leaving your device in an insecure state.

Keep in mind that this is not related to sleep mode or closing a laptop’s lid - lock screen behavior should work as expected in those cases.

Instructions

  1. Check what your screen timeout is set to in Windows Settings or Power options (powercfg.cpl)
  2. Open start, type in Screen Saver and go to Change screen saver - it should take you to the old Control Panel applet (control desk.cpl,,@screensaver)
  3. Turn on the checkbox On resume, display logon screen
  4. The Wait time here should be set the same as screen timeout above to get the desired effect - that is to lock the screen and turn it off simultaneously

Further observations

Here are a few notes on some other related settings:

  • when you go to Personalize your lock screen in Windows Settings (the modern ones) and select Slideshow, it has an option to show the lock screen instead of turning off the screen - but even without this, the lock screen will be triggered when your screen timeout happens and leads to the desired behavior described in this article
  • powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 60 - this determines how many seconds after locking the screen it will turn off when on AC power (change AC to DC for battery power)