To stop your PC from going to sleep automatically, choose Never for the sleep timeout in Windows power settings. Configure plugged-in and battery operation separately. For a temporary change, use PowerToys Awake to keep your computer running for a chosen duration.
The short version
- Everyday setting: Choose Never for the automatic sleep timeout.
- Temporary option: PowerToys Awake can prevent sleep for an interval or until a deadline.
- Laptop lid: Closing the lid has its own action, separate from the idle sleep timer.
- Screen behavior: Keeping the PC awake and keeping its display on require separate settings.
| Method | When to use it | Main limitation |
|---|---|---|
| Windows 11 Settings | Disable automatic sleep | Labels and controls vary |
| Control Panel | Change sleep on Windows 11 or Windows 10 | Changes the selected power plan |
| PowerToys Awake | Stay awake temporarily or indefinitely | Manual sleep remains possible |
| Control Panel lid controls | Keep a laptop running when closed | Idle sleep timers still apply |
| Windows 11 lid controls | Change the lid action through Settings | Available on some laptops |
| Sleep timeout commands | Disable idle sleep from a terminal | Battery and plugged-in commands differ |
| Display timeout commands | Keep the screen on too | Do not disable system sleep |
| Presence sensing controls | Stop screen blanking when you leave | Require supported presence sensors |
| Unattended timeout commands | Stay awake after a scheduled wake | Control a separate sleep timer |
Turn off automatic sleep in Windows settings
On Windows 11, open Start > Settings > System > Power & battery > Screen, sleep, & hibernate timeouts. Find Make my device sleep after, then choose Never for plugged-in operation. If you also want the computer to stay awake on battery power, choose Never for that power source separately.
On Windows 11 installations with the older layout, open Settings > System > Power & battery > Screen and sleep. Under Plugged in, find Put my device to sleep after and choose Never. Repeat for battery operation if needed.
If the Windows 11 menu wording differs, press Windows + I and search for sleep. Open the relevant power-settings result and choose Never for the sleep timeout. Available controls depend on your hardware and installed updates; you can also use the Control Panel route below.
Change the selected power plan in Control Panel
On Windows 11 or Windows 10, open Control Panel > Power Options. Beside the selected plan, select Change plan settings. Set Put the computer to sleep to Never for each available power source, then select Save changes.
This changes the selected power plan's sleep timeout. If your laptop stays awake while plugged in but sleeps after you unplug it, check the battery setting separately. Changing only the plugged-in value leaves the battery timeout unchanged.
Use PowerToys Awake for a temporary change
PowerToys Awake lets you choose an interval, a deadline or indefinite operation. Get PowerToys through Microsoft's official installation page, using its Microsoft Store or GitHub links. It supports Windows 11 and Windows 10 version 2004 or later on x64 and ARM64 systems.
In PowerToys Settings, open Awake and turn on Enable Awake. Choose Keep awake for a time interval and enter a duration, or choose Keep awake until expiration and enter a deadline. Select Keep awake indefinitely when you do not want a timed end.
Turn on Keep screen on if the display also needs to stay lit. You can also right-click Awake's notification-area icon to access its tray controls. Microsoft says manual sleep remains possible while Awake is enabled.
Keep your laptop running with the lid closed
A laptop's lid action is separate from its automatic sleep timeout. To keep it running when you close the lid, change the lid action as well as the idle sleep setting. Choosing Do nothing for the lid alone leaves the idle timer active.
On Windows 11 and Windows 10 laptops with a lid switch, open Control Panel > Hardware and Sound > Power Options > Choose what closing the lid does. Find When I close the lid, then choose Do nothing for the power source you want to change. Select Save changes.
On Windows 11 laptops that expose these controls, open Settings > System > Power & Battery > Lid, power & sleep button control. Find Closing the lid will make my PC, then choose Do nothing for the desired power source. Changes save automatically. If that section is missing, use the Control Panel route.
Set the sleep timeout with commands
For a direct alternative on Windows 11 or Windows 10, use an elevated Command Prompt, PowerShell or Terminal. The commands configure the power sources separately: ac means plugged in, and dc means battery. To disable automatic idle sleep while plugged in, run:
powercfg /change standby-timeout-ac 0The plugged-in command leaves the battery timeout unchanged. To disable automatic idle sleep on battery power too, run:
powercfg /change standby-timeout-dc 0These commands change the ordinary idle sleep timeout. If your laptop still sleeps when you close it, change its lid action using the controls above.
Keep the screen on if you need it
A display timeout is separate from system sleep, so a dark screen does not by itself mean your sleep setting failed. PowerToys Awake has its own Keep screen on option. On Windows 11 or Windows 10, you can also disable the plugged-in display timeout by running this command in an elevated terminal:
powercfg /change monitor-timeout-ac 0Pair the display commands with the sleep-timeout commands when you want both the screen and the computer to remain on. To disable the display timeout on battery power too, run:
powercfg /change monitor-timeout-dc 0On Windows 11 PCs with supported presence sensors, open Settings > System > Power & battery > Screen and sleep, then turn off Automatically turn off my screen when I leave. The section name can differ on updated builds. This setting controls screen blanking when you leave, separately from the ordinary sleep timeout.
Stop sleep after an unattended wake
If your PC wakes for a scheduled task or through Wake-on-LAN, then sleeps again without user interaction, check its unattended sleep timeout. After an unattended wake, Windows 11 and Windows 10 use this separate timer instead of the ordinary idle timeout. To disable it while plugged in, run these commands in an elevated terminal:
powercfg /setacvalueindex SCHEME_CURRENT SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 0
powercfg /setactive SCHEME_CURRENT
The first command changes the unattended timeout, and the second activates the current plan with that setting. If you also need to disable this timeout on battery power, run:
powercfg /setdcvalueindex SCHEME_CURRENT SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 0
powercfg /setactive SCHEME_CURRENTFrequently Asked Questions
Will PowerToys Awake keep working when the PC is locked?
Yes, Microsoft says the selected sleep-prevention mode continues while Windows is locked. The display-prevention setting does not continue while locked.
Is disabling hibernation the same as disabling sleep?
No, disabling hibernation removes hibernation availability and affects features that depend on the hibernation file. It does not disable ordinary sleep, so change the sleep timeout to prevent automatic idle sleep.
Can qBittorrent keep the PC awake only during transfers?
Yes, in qBittorrent 5.3.0 on Windows 10 or Windows 11, open Tools > Options > Behavior, then check Inhibit system sleep when torrents are downloading. To cover seeding too, check Inhibit system sleep when torrents are seeding, then select OK. Each option applies while its corresponding transfer activity is occurring.
Can PowerToys Awake stop automatically when an app closes?
Yes, PowerToys Awake's command-line interface supports --pid with a process ID to stop Awake when that process exits. You can also use --use-parent-pid to tie its lifetime to the parent process.