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.
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.
Power timeout
Controls when the display turns off or the PC enters sleep. It does not always mean the session is locked immediately.
Home usersScreen saver lock
Starts a screen saver after a waiting period and can require the sign-in screen when you resume.
Simple lockMachine inactivity limit
Locks the current user session after a defined amount of keyboard and mouse inactivity.
Strict policyOn 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
- Press Win + I to open Settings.
- Go to System โ Power & battery.
- Expand Screen and sleep.
- Set longer values for On battery power, turn off my screen after and When plugged in, turn off my screen after.
- 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
- Press Win + I to open Settings.
- Open System โ Power & sleep.
- Under Screen, choose how long Windows should wait before turning off the display.
- Under Sleep, choose how long Windows should wait before putting the PC to sleep.
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.
- Open Settings with Win + I.
- Go to Accounts โ Sign-in options.
- Find If youโve been away, when should Windows require you to sign in again?
- 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 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
- Press Win + R.
- Type
control desk.cpl,,@screensaverand press Enter. - Select a screen saver, such as Blank.
- Set the Wait value to the number of minutes before the screen saver starts.
- Check On resume, display logon screen.
- Click Apply and then OK.
Run commandcontrol desk.cpl,,@screensaver
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.
Local Security Policy is usually available in Windows Pro, Enterprise, and Education editions. On Windows Home, use the Registry method instead.
- Press Win + R, type
secpol.msc, and press Enter. - Open Local Policies โ Security Options.
- Double-click Interactive logon: Machine inactivity limit.
- Enter the number of seconds before Windows should lock automatically.
- Click Apply and OK.
- 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.
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
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?
Q Why does my screen turn off but Windows does not ask for a password?
Q Why does Windows lock even when sleep is disabled?
Q Can I completely disable automatic lock?
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?
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.