How to Lock Your Windows 10 or 11 PC Automatically

Updated on · Previous update

To lock a Windows 10 or Windows 11 PC after a set idle time, use a screen saver with “On resume, display logon screen” enabled. You can also require sign-in after sleep or use Dynamic Lock with a paired phone. Turning off the display alone is not the same as checking that Windows requires you to sign in again.

Lock Your PC Automatically in Windows 10

Lock the PC after a few minutes of inactivity

For a five-minute lock, choose Blank in Screen Saver Settings, set Wait to 5 minutes, and check On resume, display logon screen. Select Apply, then OK.

  1. Open Start, search for Change screen saver and open the matching Windows settings window.
  2. Choose a screen saver. Blank is a simple option if you do not want an animation.
  3. Set the Wait time to the number of idle minutes you want.
  4. Tick On resume, display logon screen.
  5. Select Apply and OK.
  6. Leave the keyboard and mouse alone for longer than the chosen time. Then check that returning to the desktop requires your normal sign-in.
Windows Screen Saver Settings with Blank selected, Wait set to 5 minutes, and On resume, display logon screen checked.
The Wait box sets the idle time. The checkbox to its right makes Windows ask you to sign in when you return. Screenshot from Northern Michigan University Technology Support Services.

You can also reach these options through Settings > Personalization > Lock screen > Screen saver, with slightly different wording between Windows versions. Microsoft’s screen-saver guide explains the idle timer and sign-in checkbox.

How to change the automatic lock timer

Open Start, search for Change screen saver, and open it. In Screen Saver Settings, change Wait to the number of minutes you want. For a 10- or 25-minute delay, enter 10 or 25. Keep On resume, display logon screen checked, then select Apply and OK.

Choose the setting that matches your goal

Goal Setting to check Main limit
Lock after no keyboard or mouse activity Screen saver, Wait time and logon-screen checkbox Apps or input activity can affect the idle timer.
Require sign-in after sleep Accounts > Sign-in options Available choices depend on the device and its policies.
Lock when you walk away with your phone Dynamic Lock It depends on Bluetooth range and is not instant.
Lock immediately before leaving Press Windows + L You need to do it yourself.

Require sign-in when the PC wakes

Open Settings > Accounts > Sign-in options. Look for the setting that controls when Windows should require you to sign in again after being away. Choose the appropriate wake or timing option offered on your device.

Microsoft’s sign-in guide notes that the available settings vary. If you use a work PC, an administrator may control them. Test the result by letting the computer sleep and waking it again.

Require sign-in after closing the laptop lid

  1. Open Control Panel > System and Security > Power Options. Select Choose what closing the lid does, or Choose what the power buttons do if that is the link you see.
  2. Under When I close the lid, select Sleep for On battery, Plugged in, or both. If the choices are grayed out, select Change settings that are currently unavailable first. Select Save changes.
  3. With sign-in after sleep enabled, close the lid, reopen it, and wake the laptop. Check that Windows asks you to sign in.

Use Dynamic Lock with your phone

  1. Pair your phone with the PC over Bluetooth.
  2. Open Settings > Accounts > Sign-in options.
  3. Find Dynamic Lock and enable the option to let Windows lock when you are away.
  4. Take the phone with you and test what happens after you leave Bluetooth range.

Windows uses the phone’s Bluetooth signal for this feature. It can take about a minute after the signal is out of range, so do not expect it to lock the instant you stand up. If the phone stays beside the PC, Dynamic Lock cannot use it as evidence that you left.

For help with the pairing step, see our Windows Bluetooth settings guide.

What if automatic locking does not work?

  • Recheck the logon-screen checkbox, not just the screen-saver preview.
  • Use a short wait time for a test, then choose the delay you actually want.
  • Check whether a video, presentation, remote session or input device is keeping the PC active.
  • For Dynamic Lock, confirm that the phone remains paired and travels with you.
  • Check organization policies if settings are greyed out or keep changing back.

Do I need a password, PIN or Windows Pro?

A lock screen is useful only if someone else cannot simply return to your session. Set up your normal Windows password or Windows Hello sign-in and test it.

How do I set automatic lock on Windows Home or Pro?

On Windows 10 or 11 Home, use the built-in screen saver settings above. The same steps work on Pro and Enterprise.

On Windows 10 or 11 Pro or Enterprise, an administrator can also set the idle lock time for the PC in Local Security Policy.

  1. Open Start, search for Local Security Policy, and open it.
  2. Go to Local Policies > Security Options and open Interactive logon: Machine inactivity limit.
  3. Enter the idle time in seconds. For five minutes, enter 300. Select OK and restart the PC.
  4. Leave the keyboard and mouse alone for the time you set. Then check that Windows asks you to sign in again.

Keep a screen saver enabled. With this policy, Windows can lock sooner if the screen saver starts or the display turns off. On a work or school PC, your IT team may manage the setting. Microsoft’s guide to the inactivity limit explains how the policy works.

Can I unlock without typing my password?

Yes. Open Settings > Accounts > Sign-in options and set up a Windows Hello PIN. If your PC has a compatible camera or fingerprint reader, you can also unlock with your face or fingerprint. Leave On resume, display logon screen checked. When the idle timer locks your PC, use your chosen sign-in method to return to your desktop.

Changing a wallpaper or desktop theme does not set an idle-lock timer. If you only want a different look, our Windows themes guide covers that separate setting.