Windows 10 and 11 automatically lock your PC after a period of inactivity as a security measure, but this feature can be frustrating when you want to maintain an active session. Here's how to disable automatic locking through various methods.

Why Windows Auto-Locks Your PC

Windows automatically locks your PC to:
- Protect against unauthorized access
- Comply with corporate security policies
- Save power by turning off the display
- Trigger after screensaver activation

Method 1: Adjust Power & Sleep Settings

  1. Open Settings (Win + I)
  2. Navigate to System > Power & sleep
  3. Under "Screen" set both values to "Never"
  4. Under "Sleep" set both values to "Never"

Method 2: Disable Screensaver Lock

  1. Open Settings > Personalization > Lock screen
  2. Click Screen saver settings
  3. Uncheck "On resume, display logon screen"
  4. Set "Wait" to a high value or choose "(None)"

Method 3: Modify Group Policy (Pro/Enterprise)

  1. Press Win + R, type gpedit.msc
  2. Navigate to:
    Computer Configuration > Administrative Templates > Control Panel > Personalization
  3. Double-click "Do not display the lock screen"
  4. Set to Enabled
  5. Also configure:
    - Interactive logon: Machine inactivity limit (set to 0)

Method 4: Registry Editor Method

  1. Press Win + R, type regedit
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  3. Create or modify these DWORD values:
    - InactivityTimeoutSecs = 0
    - DisableLockWorkstation = 1
  4. Restart your PC

Method 5: Disable Dynamic Lock

  1. Open Settings > Accounts > Sign-in options
  2. Under "Dynamic Lock" uncheck:
    "Allow Windows to automatically lock your device when you're away"

Advanced: Disable Automatic Lock via Command Line

powercfg -change -standby-timeout-ac 0
powercfg -change -standby-timeout-dc 0
powercfg -change -monitor-timeout-ac 0
powercfg -change -monitor-timeout-dc 0

Security Considerations

While disabling auto-lock is convenient:
- Never disable on shared computers
- Consider alternative security measures
- Use physical security for unattended devices
- Corporate environments may enforce policies

Troubleshooting

If settings don't apply:
- Check for conflicting Group Policies
- Verify no admin has set mandatory timeouts
- Update Windows to latest version
- Reset power plan to defaults

For most users, adjusting Power & Sleep settings combined with screensaver configuration provides the best balance between convenience and security.