How to lock Windows without it going to sleep

Pressing Win+L locks Windows but doesn't stop the sleep timer, and on laptops with Modern Standby the PC can go to sleep about a minute after you lock it. To lock and keep it awake, either change the power settings by hand or use a lock screen that holds the PC awake, like LockAwake.

Why does my PC go to sleep after I lock it?

Because locking doesn't pause the sleep timer, and the lock screen turns the display off after a minute, which on many laptops is followed by standby.

Three settings decide what happens after Win+L:

  • The sleep timer. “Put my device to sleep after” keeps counting while the PC is locked. On battery, many laptops are set to a few minutes.
  • The console lock display off timeout. On the lock screen, Windows turns the display off after this timeout, 60 seconds by default. It's hidden in Power Options unless you unhide it.
  • Modern Standby. Many recent laptops use Modern Standby instead of classic sleep. Once the screen is off, they can drop into a low-power state where regular apps and downloads are paused.

To see which kind of sleep your PC has, run this. “Standby (S0 Low Power Idle)” in the list means Modern Standby.

PS> powercfg /a
# optional: show the hidden "Console lock display off timeout" in Power Options
PS> powercfg /attributes SUB_VIDEO 8EC4B3A5-6868-48c2-BE75-4F3044BE88A7 -ATTRIB_HIDE

Method 1: change Windows power settings

Set sleep to Never while plugged in. It works, but the PC then stays on whether it's locked or not, until you change it back.

Windows 11

  1. Open Settings with Win+I and go to System → Power & battery.
  2. Open “Screen, sleep & hibernate timeouts” (on older builds of Windows 11: “Screen and sleep”).
  3. Set “When plugged in, put my device to sleep after” to Never.
  4. When the long job is done, set the timeout back to your usual value so the PC can sleep again.

Windows 10

  1. Open Settings → System → Power & sleep.
  2. Under Sleep, set “When plugged in, PC goes to sleep after” to Never.
  3. Set it back when the job is done.

The same from a terminal, on both versions:

PS> powercfg /change standby-timeout-ac 0     # plugged in: never sleep
PS> powercfg /change standby-timeout-ac 30    # later: back to 30 minutes

DownsidesThe PC is always on, locked or not. It isn't locked at all unless you also press Win+L, and then the lock screen still turns the display off after a minute. It's easy to forget to switch back.

Method 2: keep-awake tools

Tools like PowerToys Awake and Caffeine keep the PC awake on demand, and they're good at it. They don't lock anything, so the PC stays open while you're away.

That's fine at home with nobody around. In an office, a shared flat or a café, an unlocked PC is an open door to your email, files and accounts.

Method 3: LockAwake

LockAwake locks the screen and keeps the PC awake behind the lock. It can keep a laptop running with the lid closed, and it puts everything back when you unlock.

LockAwake is a Windows app that locks your screen while keeping your PC awake, so downloads, renders, backups, servers and AI coding agents like Claude Code keep running while you're away.

LockAwake protection settings: Keep the PC awake while locked (on), Keep running when the lid is closed (on), Keep the screen on (off), Block escape shortcuts (on), Discourage shutdown (on), Start with Windows (on).

  • Locked: PIN, password or fingerprint (Windows Hello), every monitor covered, escape shortcuts blocked.
  • Awake: a Windows power request while locked, visible in powercfg /requests.
  • Lid: optional “do nothing” on lid close, only while locked.
  • Restored: unlock and your power and lid settings are as they were.

Press Ctrl+Alt+L, then Enter. $2.99 once, no subscription.

What can I leave running?

Anything that runs on the PC itself, for as long as it needs, while the screen stays locked.

Leave a 40 GB game download running

Start it before dinner, lock the PC, and it's ready to play when you're back.

Export a 4K video in Premiere or DaVinci

Queue the export, lock, and go. The render keeps the GPU busy while the screen stays locked.

Let a Blender render finish

Long frame renders run for hours. The PC stays awake for all of them.

Run a backup or a OneDrive / Google Drive sync

A full image backup or the first sync of a big photo library needs the PC awake from start to end.

Keep a Minecraft or Plex server online

Friends keep playing and the TV keeps streaming while your desk is locked.

Let Windows Update finish

Big feature updates download and prepare in the background instead of stalling at a percentage.

Copy a big folder to a NAS

Hundreds of gigabytes over the network, without a sleep halfway through breaking the copy.

Let an AI agent finish a task

Claude Code or Codex keeps working while you're away. See how to keep Claude Code running when your laptop is locked.

How to keep a laptop running with the lid closed on Windows 11

Set the lid action to “Do nothing”. By hand, that's in Control Panel and stays that way until you change it. With LockAwake, it applies only while the screen is locked.

By hand

  1. Open Control Panel → Hardware and Sound → Power Options (or search “lid” in Start).
  2. Click Choose what closing the lid does.
  3. Next to “When I close the lid”, choose Do nothing under Plugged in (and On battery, if you want).
  4. Click Save changes. Set it back to Sleep when you're done.

With LockAwake

Turn on “Keep running when the lid is closed” once. From then on, the lid does nothing only while LockAwake is locked, and your normal setting comes back the moment you unlock.

Give it air: don't run a hot laptop sealed in a bag.

Questions

Why does Windows go to sleep after locking with Win+L?

Locking doesn't pause the sleep timer, and the lock screen turns the display off after 60 seconds by default. On laptops with Modern Standby, that can be followed by standby within minutes.

Does a download keep going when the PC is locked?

Yes, as long as the PC stays awake. It stops when Windows goes to sleep, which can happen soon after locking. LockAwake keeps the PC awake while locked, so the download finishes.

Does Modern Standby stop downloads?

Usually, yes. In Modern Standby, regular desktop apps are paused to save power, so a browser or game launcher download generally stops until you wake the PC.

How do I keep my laptop on when closed without changing settings forever?

Use a tool that changes the lid action only for a while. LockAwake sets the lid to “Do nothing” only while the screen is locked and restores your setting when you unlock.

Is PowerToys Awake enough?

If the PC can stay unlocked while you're away, yes: it's free and works well. If the screen needs to be locked while work runs, you need a lock that keeps the PC awake, which is what LockAwake does.

Related

Lock it. Walk away. Come back to finished work.

LockAwake is a Windows app that locks your screen while keeping your PC awake, so downloads, renders, backups, servers and AI coding agents like Claude Code keep running while you're away.

One-time purchase. No account, no subscription, no telemetry.