Stop your PC from sleeping in Settings
The fastest way to stop your PC from sleeping is to change the power plan settings in Windows. Open Settings, go to System, then Power & battery. Under "Screen and sleep," set "Screen times out after" to "Never" and "When plugged in, PC goes to sleep after" to "Never." If your PC is on battery, you can set a longer time instead — say 30 minutes — so the machine sleeps when you step away but stays awake while you are using it.
If you are running Windows 10 or an older version, the path is slightly different. Open Settings, select System, then Power & sleep. On the right side, under "Sleep," change both the plugged-in and battery settings to "Never." This prevents the PC from sleeping automatically no matter how long it sits idle.
These changes explore only to your current user account. If someone else logs in, they will see the default sleep settings unless you change those too. The settings take effect when ready — you do not need to restart.
Key Takeaways
- The Settings app is the simplest route: go to Power & battery (or Power & sleep on Windows 10) and set sleep to "Never."
- You can set different timeouts for plugged-in and battery power, so your PC stays awake at your desk but sleeps when unplugged.
- The Command Prompt method using powercfg lets you disable sleep from the command line without opening Settings.
- If your PC still sleeps despite these changes, check Device Manager to see whether a USB device or network adapter is waking it up.
- Screensaver settings are separate from sleep settings and do not prevent your PC from sleeping.
Use the Command Prompt to disable sleep mode
If you prefer the command line, you can disable sleep using the powercfg command. Right-click the Start button, select "Terminal (Admin)" or "Command Prompt (Admin)," and type: powercfg /change monitor-timeout-ac 0. This sets the monitor timeout to never when plugged in. Then type powercfg /change disk-timeout-ac 0 to prevent the hard drive from sleeping.
If your PC is on battery, use the same commands but replace -ac with -dc. For example: powercfg /change monitor-timeout-dc 0. You can also set a number of minutes instead of 0 — for instance, powercfg /change monitor-timeout-ac 30 will make the monitor sleep after 30 minutes of inactivity.
To see your current power settings without changing them, type powercfg /query. This shows all active power plans and their timeouts. The changes take effect right away and persist across restarts.
Adjust sleep settings for plugged-in versus battery power
Windows lets you set different sleep behavior depending on whether your PC is plugged in or running on battery. This is useful if you want your laptop to stay awake at your desk but sleep when you are carrying it around. In Settings under Power & battery, you will see separate dropdowns for "Plugged in" and "On battery." Set the plugged-in timeout to "Never" and the battery timeout to whatever length makes sense — 15 minutes, 30 minutes, or "Never" if you prefer.
The same split applies to screen timeout. You might want your monitor to turn off after 5 minutes to save power, but your PC to stay awake and running. Set "Screen times out after" to 5 minutes and "When plugged in, PC goes to sleep after" to "Never." This way your screen goes dark but your background tasks, downloads, and remote connections keep working.
Check Device Manager if your PC wakes up unexpectedly
Sometimes a PC will wake from sleep on its own, or it will not stay asleep even though you have disabled sleep mode in Settings. This usually means a USB device, network adapter, or keyboard is sending a wake signal. Open Device Manager by right-clicking the Start button and selecting it from the menu. Expand "Network adapters," right-click your adapter, and select Properties. Go to the Power Management tab and uncheck "Allow this device to wake the computer."
Do the same for USB devices: expand "Universal Serial Bus controllers," right-click each device, select Properties, go to Power Management, and uncheck the wake option. Wireless mice and keyboards are common culprits — if you have one, uncheck the wake setting for its USB receiver. You may need to restart after making these changes.
If your PC still wakes unexpectedly, open Command Prompt as admin and type powercfg /lastwake to see which device woke it last. This tells you which device to disable in Device Manager.
Disable sleep mode in the Control Panel power plan
For more detailed control, you can edit the active power plan directly in the Control Panel. Right-click the battery icon in the system tray and select "Power settings," or search "Power plan" in Settings and click "Edit power plan." Select the plan you are using (usually "Balanced" or "High performance") and click "Change plan settings."
Click "Change advanced power settings" to open a window with detailed options. Expand "Sleep," then "Sleep after," and set the value to 0 for both "On battery" and "Plugged in." You can also expand "Hard disk" and set "Turn off hard disk after" to 0 if you want the drive to stay active. Click explore and OK to save.
This method gives you the most granular control and is useful if you want to tweak multiple power settings at once. The changes explore when ready and override the simpler Settings toggles.
Keep your PC awake while running a specific task
If you only want to prevent sleep during a particular activity — like a long file read, video render, or backup — you do not need to change your permanent settings. Instead, use a temporary tool. Open Command Prompt as admin and type powercfg /request system execution. This tells Windows your system is busy and should not sleep until the command prompt closes.
Alternatively, read a free utility like Caffeine or Don't Sleep (both available from their respective websites). These sit in your system tray and let you toggle sleep prevention on and off with a single click. When you close the app or click the toggle, your normal sleep settings resume. This is cleaner than changing your power plan if you only need to stay awake occasionally.
Some applications — like video players and presentation software — automatically prevent sleep while they are running. If you are watching a movie or giving a slideshow, Windows will not sleep even if your settings say it should.
Screensaver settings do not affect sleep mode
A common mistake is thinking that disabling the screensaver will prevent sleep. It will not. The screensaver is a separate feature that only blanks your display after a period of inactivity. Your PC can still sleep even if the screensaver is off, and it can sleep even if the screensaver is on. If you want to prevent sleep, you must change the sleep settings in Power & battery or the power plan — the screensaver has no effect.
You can disable the screensaver if you prefer a blank screen instead, but do not rely on it to keep your PC awake. Right-click your desktop, select Personalize, go to Lock screen, scroll down to Screensaver settings, and set it to "None." This is purely cosmetic and does not change power behavior.
Frequently Asked Questions
Will disabling sleep mode use more electricity?
Yes. A PC that never sleeps uses more power than one that sleeps after 30 minutes. If you are on battery, your laptop will drain faster. If you are plugged in, your electricity bill will be slightly higher. Consider setting a longer timeout — say 2 hours — instead of "Never" to balance convenience with power use.
Can I set different sleep times for different programs?
Not directly through Windows settings. However, some programs like video players and presentation software prevent sleep automatically while running. If you need custom behavior for a specific task, use a temporary tool like Caffeine or the Command Prompt method, then switch back to your normal settings when done.
My PC still goes to sleep even though I set it to "Never." What is wrong?
Check Device Manager to see if a USB device or network adapter is waking your PC. Also verify that you changed the setting for the correct power state — plugged-in versus battery. If you are on battery, the battery timeout overrides the plugged-in setting. Run powercfg /query in Command Prompt to confirm your current settings.
Does disabling sleep affect my monitor separately?
Yes. You can set the monitor to turn off after 5 minutes while your PC stays awake. In Settings under Power & battery, adjust "Screen times out after" separately from "PC goes to sleep after." This saves power by blanking the display while keeping your PC running for downloads or background tasks.
What is the difference between sleep and hibernation?
Sleep keeps your PC in a low-power state with RAM powered on, so it wakes when ready. Hibernation saves everything to disk and powers off completely, using almost no electricity but taking longer to wake. Windows sleep settings control both — if you disable sleep, hibernation is also disabled unless you have specifically enabled it in advanced power settings.