How to Change the Windows 10 System Lock Timeout
Windows 10 does not give users direct access to the system lock timeout setting. You can dig around the Settings app and the Control Panel app and you won’t find anything that lets you pick when the system should lock automatically. The only workaround to this is to use the screensaver which is still a feature on Windows 10. You can enable it and when enabled, it will also automatically lock Windows 10.
While this works and is the simplest way to automatically lock your system if it’s been inactive for a certain period of time, it has shortcomings. The screensaver may prevent certain scripts from functioning if those scripts target the power options on your PC. In that case, you’re going to have to edit the registry and change the Windows 10 system lock timeout.
Windows 10 system lock timeout
Tap the Win+R keyboard shortcut to open the run box. In the run box, enter the following, and tap enter.
regedit
This will open the registry editor. In the registry editor, go to the following location.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Under the System key, look for a value called InactivityTimeoutSecs. It is possible that this value does not exist. In that case, you’re going to have to create it yourself.
Right-click the System key and select New > DWORD (32-bit) Value from the context menu. Give the value the following name.
InactivityTimeoutSecs
Double-click it and in the box that opens, select the Decimal base. In the value data field, enter in seconds how long the system lock timeout should be. For example, if you’d like the system to lock automatically after five minutes of inactivity, enter 300 (60×5). Click OK.
Tip: This policy supports a wide range of values (0 disables it). Community and Microsoft guidance indicate you can set up to very large values; in practice keep it reasonable (e.g., 60–3600+ seconds) to avoid conflicts with organization policies. You may need to sign out/in or restart for the change to fully apply.
The system will now lock automatically if it is inactive for the period of time you set in the registry. You can change the interval any time you want. If it doesn’t seem to apply immediately, sign out and back in, or restart the system.
Windows 10/11 Pro and Enterprise: GUI path
If you’re on Pro/Enterprise, you can set the same policy without touching the registry: open gpedit.msc and go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options, then edit Interactive logon: Machine inactivity limit. This writes the same value and locks the session after the specified idle time. See Microsoft’s explanation of the policy here.
Quick PowerShell method
You can set the value in one go with an elevated PowerShell window:
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Force | Out-Null New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "InactivityTimeoutSecs" -Value 300 -PropertyType DWord -Force
Notes, limitations, and troubleshooting
- Home edition: Local Group Policy Editor isn’t available, so use the registry method above.
- Domain/Intune policies win: If your PC is managed, organization policies (e.g., a 15-minute maximum) may override local changes. Ask IT or check the policy mentioned above in Security Options.
- Sleep vs. lock: Sleep timers in Power Options don’t automatically lock Windows unless you also require a password on wake. The policy here locks the session after pure inactivity, independent of sleep.
- If it won’t stick: Sign out/in, restart, or run
gpupdate /force(Pro/Enterprise) to refresh policies. Ensure no conflicting policy disables the setting.
It’s mind-blowing that Windows 10 doesn’t have a simpler, more direct way to manage this setting. You will find that there are several other power-related settings that are hidden by Windows 10. You can only enable them by modifying or adding values to the Windows registry.
If you do not set a system lock timeout, Windows 10 will not lock even if the display has gone to sleep. It will lock only when a certain amount of time has passed. If the value was missing from the registry, to begin with, it is possible that your system wasn’t locking at all unless it went to sleep.
What’s New in This Update
- Confirmed the supported GUI path for Pro/Enterprise via Local Security Policy (Interactive logon: Machine inactivity limit) and linked to Microsoft’s documentation.
- Added PowerShell one-liner to create/set
InactivityTimeoutSecswithout manual registry editing. - Clarified behavior on managed devices (domain/Intune) where organization policies can override local changes.
- Refined guidance on when changes take effect (sign out/restart if needed) and the distinction between sleep timers and inactivity locking.
Last updated: October 10, 2025