Windows Security ยท Lock Timeout

How to Change the Time Before Windows Automatically Locks

A practical guide to configuring the automatic lock timeout in Windows 10 and Windows 11 using Settings, screen saver options, Local Security Policy, Registry Editor, and PowerShell commands.

โŠž Windows 10 โŠž Windows 11 ๐Ÿ”’ Auto-Lock ๐Ÿ–ฅ Screen Timeout โš™ Group Policy

Quick Answer: How to Change the Auto-Lock Time in Windows

If you only want Windows to wait longer before the screen turns off or the PC sleeps, change the timeout in Settings โ†’ System โ†’ Power & battery โ†’ Screen and sleep. If you want Windows to lock the user session after a fixed period of keyboard and mouse inactivity, use Local Security Policy or the matching Registry value.

โ„น๏ธ
Important distinction

Screen timeout, sleep timeout, screen saver timeout, and automatic session lock are related, but they are not the same setting. For a real inactivity lock, use Interactive logon: Machine inactivity limit.

Goal Best setting to change Where to find it
Keep the display on longer Screen timeout Settings โ†’ System โ†’ Power & battery
Delay sleep mode Sleep timeout Settings โ†’ System โ†’ Power & battery
Require password after screen saver Screen saver wait time Personalization โ†’ Lock screen โ†’ Screen saver
Lock the PC after exact inactivity time Machine inactivity limit Local Security Policy or Registry
Keep the lock screen visible longer after locking Console lock display off timeout Power Options or powercfg

How the Windows Auto-Lock Timeout Works

Windows can lock automatically for several reasons. The most common reason is that the computer goes to sleep and then requires sign-in when it wakes. Another reason is a password-protected screen saver. In business environments, administrators may also enforce a machine inactivity limit that locks the session after a specific number of seconds without user input.

Option 01

Power timeout

Controls when the display turns off or the PC enters sleep. It does not always mean the session is locked immediately.

Home users
Option 02

Screen saver lock

Starts a screen saver after a waiting period and can require the sign-in screen when you resume.

Simple lock
Option 03

Machine inactivity limit

Locks the current user session after a defined amount of keyboard and mouse inactivity.

Strict policy
โš ๏ธ
Before you change it

On a work, school, or domain-managed PC, auto-lock settings may be controlled by your organization. If a policy is applied, local changes may be unavailable or may revert after the next policy refresh.

Change Screen and Sleep Timeout in Windows Settings

This is the easiest method if your PC locks because the display turns off or the device goes to sleep too quickly. It is available in both Windows 10 and Windows 11, although the page names are slightly different.

Windows 11: adjust screen and sleep settings

  1. Press Win + I to open Settings.
  2. Go to System โ†’ Power & battery.
  3. Expand Screen and sleep.
  4. Set longer values for On battery power, turn off my screen after and When plugged in, turn off my screen after.
  5. Set longer values for On battery power, put my device to sleep after and When plugged in, put my device to sleep after.

Windows 10: adjust power and sleep settings

  1. Press Win + I to open Settings.
  2. Open System โ†’ Power & sleep.
  3. Under Screen, choose how long Windows should wait before turning off the display.
  4. Under Sleep, choose how long Windows should wait before putting the PC to sleep.
โœ…
Recommended values

For a laptop, a practical starting point is 5โ€“10 minutes for screen timeout on battery and 10โ€“30 minutes when plugged in. For a desktop in a private room, you can use longer values, but do not leave an unlocked PC unattended in a shared space.

Change When Windows Requires Sign-In After Being Away

The Require sign-in setting controls whether Windows asks for a password, PIN, fingerprint, or face recognition after sleep or inactivity. This setting does not always change the screen-off timer itself, but it changes whether the lock screen requires authentication when you return.

Settings โ†’ Accounts โ†’ Sign-in options โ†’ Additional settings
  1. Open Settings with Win + I.
  2. Go to Accounts โ†’ Sign-in options.
  3. Find If youโ€™ve been away, when should Windows require you to sign in again?
  4. Choose the delay you want, such as Every time, 1 minute, 3 minutes, 5 minutes, 15 minutes, or Never, depending on what your Windows edition and security policy allow.
โš ๏ธ
If the option is missing

If Windows says that security policies are preventing some options from being shown, the setting is probably managed by Group Policy, device management software, Windows Hello configuration, or an organization account.

Set Auto-Lock Time with Screen Saver Settings

A password-protected screen saver is a simple way to make Windows lock after a chosen number of idle minutes. This method is useful when you want a visible countdown-style lock behavior without editing policies or the Registry.

Open screen saver settings

  1. Press Win + R.
  2. Type control desk.cpl,,@screensaver and press Enter.
  3. Select a screen saver, such as Blank.
  4. Set the Wait value to the number of minutes before the screen saver starts.
  5. Check On resume, display logon screen.
  6. Click Apply and then OK.
Run commandcontrol desk.cpl,,@screensaver
๐Ÿ’ก
Best choice

Use the Blank screen saver if your goal is security and power saving. Animated screen savers are mostly cosmetic and can use more resources than simply turning off the display.

Set a Strict Inactivity Lock with Local Security Policy

For a true automatic lock after a fixed period of user inactivity, configure Interactive logon: Machine inactivity limit. This setting uses seconds, not minutes. For example, 900 seconds equals 15 minutes.

โ„น๏ธ
Edition note

Local Security Policy is usually available in Windows Pro, Enterprise, and Education editions. On Windows Home, use the Registry method instead.

  1. Press Win + R, type secpol.msc, and press Enter.
  2. Open Local Policies โ†’ Security Options.
  3. Double-click Interactive logon: Machine inactivity limit.
  4. Enter the number of seconds before Windows should lock automatically.
  5. Click Apply and OK.
  6. Restart the PC or sign out and sign back in if the setting does not apply immediately.
Minutes Seconds to enter Typical use
1 minute 60 Very strict public or kiosk-style device
5 minutes 300 Shared office or reception desk
10 minutes 600 Balanced security for many work PCs
15 minutes 900 Common enterprise security baseline
Disable policy 0 No lock enforced by this policy

Configure Windows Auto-Lock Timeout Through the Registry

On Windows Home, or when you prefer command-line deployment, you can set the same machine inactivity limit through the Registry. The value is stored as a DWORD named InactivityTimeoutSecs.

๐Ÿ›‘
Registry warning

Editing the Registry incorrectly can cause system problems. Create a restore point or export the key before changing values.

Registry path

๐Ÿ“ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Set the timeout with Command Prompt

Open Command Prompt as administrator and run one of the commands below.

Set auto-lock to 15 minutesreg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v InactivityTimeoutSecs /t REG_DWORD /d 900 /f
Disable the policyreg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v InactivityTimeoutSecs /t REG_DWORD /d 0 /f

Check the current value

Query current timeoutreg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v InactivityTimeoutSecs

After changing this value, restart Windows or sign out and sign back in. If the PC is joined to a domain or managed by an organization, Group Policy may overwrite this Registry value.

Change Lock Screen Display Timeout with powercfg

This method does not control when Windows locks. It controls how long the display stays on after the computer is already locked. Use it if the lock screen turns black too quickly after you press Win + L.

Set lock screen display timeout while plugged in

Open Windows Terminal or Command Prompt as administrator and run:

Plugged in: 5 minutespowercfg.exe /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 300
powercfg.exe /setactive SCHEME_CURRENT

Set lock screen display timeout on battery

On battery: 2 minutespowercfg.exe /setdcvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 120
powercfg.exe /setactive SCHEME_CURRENT

Show the setting in Advanced Power Options

If you want to expose Console lock display off timeout in the graphical power settings, run:

Show Console lock display off timeoutpowercfg.exe -attributes SUB_VIDEO 8EC4B3A5-6868-48c2-BE75-4F3044BE88A7 -ATTRIB_HIDE
โš ๏ธ
Do not confuse these settings

VIDEOCONLOCK controls display timeout on the lock screen. InactivityTimeoutSecs controls automatic locking after user inactivity.

Troubleshooting: Windows Still Locks Too Soon

If Windows keeps locking faster than expected, check the following settings in order. Auto-lock behavior is often caused by a combination of power, sign-in, screen saver, and policy settings.

Check these first

  • Screen and sleep timeout in Settings.
  • Require sign-in setting under Accounts.
  • Screen saver wait time and password option.
  • Dynamic Lock under Sign-in options.
  • Local Security Policy inactivity limit.

Common causes

  • Work or school policy overrides local settings.
  • Power plan settings differ for battery and AC power.
  • Third-party security software enforces locking.
  • Bluetooth Dynamic Lock detects that your phone is away.
  • Registry values are reset by domain policy.

Run a quick policy check

If you suspect Group Policy is controlling the timeout, generate a policy report:

Policy reportgpresult /h "%USERPROFILE%\Desktop\gpresult.html"

Open the generated gpresult.html file from the Desktop and look for security settings, sign-in options, screen saver policies, or power management policies.

Frequently Asked Questions About Windows Auto-Lock Timeout

Q What is the best auto-lock timeout for Windows?
For a shared or work computer, 5 to 15 minutes is usually a good balance between security and convenience. For a private home desktop, you may prefer a longer timeout. For laptops, shorter timeouts are safer because the device can be left unattended more easily.
Q Why does my screen turn off but Windows does not ask for a password?
The display timeout only turns off the monitor. To require authentication when you return, check Settings โ†’ Accounts โ†’ Sign-in options and make sure Windows is configured to require sign-in after you have been away. You can also enable On resume, display logon screen in screen saver settings.
Q Why does Windows lock even when sleep is disabled?
A separate setting may be locking the session. Check Interactive logon: Machine inactivity limit, screen saver settings, Dynamic Lock, and organization policies. Sleep mode is only one possible trigger.
Q Can I completely disable automatic lock?
On an unmanaged personal PC, you can set the machine inactivity limit to 0, disable password-protected screen saver, and adjust sign-in requirements. However, disabling automatic lock is not recommended for laptops, office computers, shared PCs, or devices with sensitive files.
Q Does Dynamic Lock change the auto-lock timeout?
Dynamic Lock is separate. It can lock Windows when your paired Bluetooth phone moves out of range. If the PC locks when you walk away even though inactivity settings look correct, check Settings โ†’ Accounts โ†’ Sign-in options โ†’ Dynamic lock.

Related Windows Guides

Bottom line

To change the time before Windows automatically locks, first decide what you really need: a longer screen timeout, a longer sleep timeout, a password-protected screen saver, or a strict inactivity lock. For most home users, Settings โ†’ System โ†’ Power & battery and Settings โ†’ Accounts โ†’ Sign-in options are enough. For an exact inactivity lock, use Interactive logon: Machine inactivity limit or the InactivityTimeoutSecs Registry value.