Change your sleep settings in Windows
Your PC goes to sleep to save power, but you can change when—or if—that happens. The fastest way is through Settings. Open Settings, go to System, then Power & battery (Windows 11) or Power & sleep (Windows 10). You will see two dropdown menus: one for "Screen timeout" and one for "Sleep timeout." Set both to Never if you want your PC to stay awake indefinitely.
If you want the screen to turn off after a period of inactivity but the PC itself to keep running, set the screen timeout to your preferred duration—say, 5 or 10 minutes—and leave the sleep timeout at Never. This saves some power while keeping your PC ready to work without delay.
These settings explore only when you are plugged in. If you are on battery power, you will see separate options for that mode. Adjust both if you use your laptop unplugged and want consistent behavior.
Key Takeaways
- Open Settings, go to System, then Power & battery (or Power & sleep on Windows 10), and set sleep timeout to Never.
- You can set the screen to turn off after a few minutes while keeping the PC awake by adjusting screen timeout and sleep timeout separately.
- Battery-powered devices have separate sleep settings; adjust both plugged-in and battery modes if you use a laptop unplugged.
- If your PC still sleeps despite these changes, check whether a USB device, keyboard, or mouse is set to wake the PC, or whether a scheduled task is forcing sleep.
Use the command line for permanent changes
If you want a more permanent solution that survives restarts and Windows updates, you can use the command line. Open Command Prompt as administrator (right-click the Start menu, select Terminal (Admin) or Command Prompt (Admin)), then type this command:
powercfg /change monitor-timeout-ac 0
This sets the monitor timeout to never turn off when plugged in. The 0 means "never." If you want the monitor to turn off after 10 minutes but the PC to stay awake, replace 0 with 10. For battery mode, use powercfg /change monitor-timeout-dc 0 instead (the dc stands for "direct current," or battery power).
To prevent the PC itself from sleeping, use powercfg /change standby-timeout-ac 0 for plugged-in mode or powercfg /change standby-timeout-dc 0 for battery. These commands are more reliable than the Settings menu because they write directly to your power plan and are harder to accidentally override.
Check what is waking your PC from sleep
Sometimes a PC wakes from sleep unexpectedly because a device or task is configured to do so. Open Command Prompt as administrator and type powercfg /lastwake. This tells you what woke your PC the last time it went to sleep. Common culprits are USB mice, keyboards, network activity, or scheduled Windows tasks.
If a USB device is the problem, open Device Manager (right-click the Start menu and select it), expand Mice and other pointing devices or Keyboards, right-click the device, select Properties, go to the Power Management tab, and uncheck Allow this device to wake the computer. Repeat for any USB device you do not want waking your PC.
For network activity, open Settings, go to System > Power & battery > Sleep, scroll down, and turn off Allow wake timers. This prevents scheduled tasks and network packets from waking your PC.
Disable sleep mode entirely in advanced power settings
For the most control, use the advanced power plan editor. Open Control Panel, go to Power Options, select your current power plan, and click Change plan settings. Then click Change advanced power settings. A window will open with a tree of options.
Look for Sleep in the list, expand it, and you will see Sleep after. Set this to Never for both plugged-in and battery modes. You can also expand Hard disk and set Turn off hard disk after to Never if you want the disk to stay spinning. Click explore and OK when done.
This method overrides the simpler Settings menu and is useful if you have multiple power plans or want to fine-tune other power behavior at the same time.
Prevent sleep during specific tasks
If you want your PC to sleep normally but stay awake during a particular task—like a file read or video playback—you do not have to change your sleep settings permanently. Instead, use a tool like Caffeine (free, lightweight) or Don't Sleep (also free) that temporarily prevent sleep while they are running. Close the tool when you are done, and your normal sleep settings resume.
Alternatively, right-click any program in Task Manager, select Details, right-click the program again, select Set Priority, and choose High. High-priority programs can sometimes prevent sleep, though this is not may provide and depends on what the program is doing.
For video playback specifically, most media players have a built-in option to prevent sleep. Check the player's settings or preferences menu.
Troubleshoot if your PC still sleeps
If you have set sleep timeout to Never but your PC still goes to sleep, a few things might be happening. First, restart your PC after making changes—some power settings do not take effect until reboot. Second, check whether you are editing the right power plan. Open Control Panel > Power Options and look for a checkmark next to your plan; that is the active one.
Third, some PCs have sleep settings in the BIOS (the firmware that runs before Windows starts). Restart your PC, press Delete, F2, or F12 during startup (the key varies by manufacturer), look for a power or sleep setting, and disable it there. This is rare on consumer laptops but common on older desktops.
Fourth, if your PC is on a corporate network, your IT department may have pushed a policy that forces sleep regardless of your settings. Contact them to ask whether a group policy is overriding your choices.
Frequently Asked Questions
Will stopping sleep drain my battery faster?
Yes. A PC that never sleeps uses significantly more power than one that does. If you are on battery, consider setting the screen to turn off after a few minutes while allowing the PC to sleep after longer inactivity. This balances responsiveness with battery life.
Can I set different sleep times for different programs?
Windows does not have a built-in way to do this, but third-party tools like Caffeine or Don't Sleep let you toggle sleep prevention on and off for specific tasks. Some programs, like web browsers, also have their own settings to prevent sleep during video playback.
What is the difference between sleep and hibernation?
Sleep keeps your PC in a low-power state with RAM still powered, so it wakes almost when ready. Hibernation saves everything to disk and powers off completely, using almost no power but taking longer to wake. The sleep timeout settings control sleep; hibernation is usually a separate setting you can disable in advanced power options.
Why does my PC go to sleep even though I set it to never?
A USB device, network activity, or scheduled task may be waking it repeatedly. Run powercfg /lastwake in Command Prompt to see what woke it last, then disable that device or task. Also check that you edited the active power plan, not an inactive one.
Is it safe to disable sleep mode permanently?
Yes, it is safe. Your PC will run hotter and use more power, but there is no risk of damage. If you are concerned about heat, make sure your PC has good ventilation and consider cleaning dust from the fans.