Stop your computer from going to sleep automatically

Your computer enters sleep mode to save power when you are not using it. You can turn this off in your operating system settings so the screen stays on and the machine keeps running. The steps differ between Windows and Mac, but both let you set sleep to never happen, or to happen only after a much longer period of inactivity.

Sleep mode is useful if you want to save electricity, but it gets in the way if you are streaming video, downloading files, or running a program that needs the computer awake. Changing the sleep setting takes less than a minute and does not require administrator permission on most machines.

Key Takeaways

  • Windows and Mac both have sleep settings in their power or battery preferences, where you can set the timeout to never or to a longer duration.
  • The quickest temporary fix is to move your mouse or press a key every few minutes, or to use a built-in focus mode that disables sleep while you work.
  • Some programs, like video players and web browsers, can prevent sleep on their own while they are running.
  • If you change the setting and the computer still sleeps, check whether a screensaver is also enabled, as some screensavers trigger sleep independently.

How to disable sleep on Windows 10 and 11

Open Settings by pressing the Windows key and typing "settings", then select the Settings app. Go to System, then Power & Battery (or Power & Sleep on older versions). Under Screen and sleep, set both "Screen times out after" and "Sleep times out after" to Never. If you see a dropdown that says "Plugged in" or "On battery", make sure you change the setting for both power states.

If you want the screen to turn off but the computer to stay awake, set Screen to a shorter time (like 5 minutes) and leave Sleep set to Never. This saves power on the display while keeping the machine running for downloads or background tasks.

On some older Windows machines, the setting is in Control Panel instead. Press the Windows key, type "power plan", and select Edit Power Plan. Click Change Advanced Power Settings, then expand Sleep and set Allow hybrid sleep to Off and Sleep after to Never.

How to disable sleep on Mac

Click the Apple menu in the top left corner and select System Settings. Go to General, then click Energy Saver. Drag the "Turn display off after" slider all the way to the right, or uncheck the box next to it. This prevents the display from sleeping. To prevent the entire computer from sleeping, look for a checkbox labeled "Prevent computer from sleeping automatically when the display is off" and check it.

On older Mac models running Mojave or earlier, go to System Preferences instead of System Settings, then Energy Saver, and adjust the same sliders. The layout is slightly different but the controls do the same thing.

Using focus modes and built-in features to stay awake

If you do not want to change your sleep settings permanently, Windows and Mac both have temporary solutions. On Windows 11, open Settings and go to System, then Focus. Select Focus on, then choose Do Not Disturb or another focus mode. While a focus mode is active, your computer will not sleep. You can set a timer so the focus mode turns off automatically after an hour or two.

On Mac, you can enable Do Not Disturb from the Control Center (click the icon in the top right corner). This does not prevent sleep directly, but some programs respect Do Not Disturb and will not trigger sleep-breaking notifications. For a more reliable temporary block, use the Caffeinate command in Terminal: open Terminal, type caffeinate, and press Enter. The computer will stay awake as long as Terminal is running. Press Control+C to stop it.

Programs that prevent sleep while they run

Many applications automatically prevent your computer from sleeping while they are active. Video players like Netflix, YouTube, and VLC will keep the screen on during playback. Web browsers like Chrome and Firefox can prevent sleep while a video is playing or a read is in progress. If you are using one of these programs and the computer still sleeps, check the program's settings for a "prevent sleep" or "keep awake" option.

For other tasks, third-party programs like Caffeine (Windows) or Amphetamine (Mac) sit in your system tray and let you toggle sleep prevention on and off with a single click. These are lightweight and do not require you to change your system settings.

Checking for screensaver interference

Even if you disable sleep mode, a screensaver can trigger sleep independently on some machines. Go back to your power settings and look for a Screensaver option. Set it to None or Blank, or set the timeout to a very long duration so it does not interfere with your work. On Windows, this is usually in Settings under Personalization, then Lock Screen. On Mac, it is in System Settings under Desktop & Screen Saver.

If you have a screensaver enabled and sleep is also enabled, the screensaver may set up first and then trigger sleep after its own timeout expires. Disabling the screensaver removes one layer of complexity.

What to do if your computer still sleeps after changing settings

If you have set sleep to Never and the computer still goes to sleep, a few things might be happening. First, restart your computer to make sure the new settings take effect. Second, check whether you are on battery power on a laptop; many machines have separate sleep settings for plugged-in and battery modes, and you may have only changed one. Third, look in Device Manager (Windows) or System Report (Mac) to see whether a USB device, keyboard, or mouse driver is overriding your settings.

On Windows, you can also check whether a program is using the powercfg command to override your sleep settings. Open Command Prompt as administrator, type powercfg /lastwake, and press Enter. This shows what woke the computer last and can help you identify a program that is interfering. On Mac, the pmset command in Terminal shows your current power settings and can reveal conflicts.

Frequently Asked Questions

Does disabling sleep use a lot more electricity?

Yes, a computer that never sleeps uses significantly more power than one that sleeps after 10 or 15 minutes of inactivity. If you only need to prevent sleep during specific tasks, use a focus mode or a temporary tool like Caffeinate instead of changing your permanent settings. This way you save power most of the time.

Can I set different sleep times for different programs?

No, your operating system sleep setting applies to all programs equally. However, some programs like video players override the sleep setting while they run. If you need fine-grained control, use a third-party tool like Caffeine that lets you toggle sleep prevention on demand.

Will disabling sleep affect my computer's lifespan?

Running your computer continuously instead of letting it sleep may cause slightly more wear on the hard drive and other components, but modern computers are built to run 24/7 if needed. The effect on lifespan is minimal unless you run the machine constantly for years without breaks.

What is the difference between sleep and hibernation?

Sleep keeps your computer in a low-power state with RAM still powered, so it wakes up in seconds. Hibernation saves everything to disk and powers off completely, using almost no electricity but taking longer to wake. On Windows, you can enable hibernation as an alternative to sleep if you want to save more power.

Can I schedule sleep to turn back on at a specific time?

Windows has a built-in scheduler that can wake your computer at a set time, but it requires hibernation to be enabled. Go to Settings, search for "wake timers", and enable Allow wake timers. Then set a scheduled task in Task Scheduler to wake the computer when you need it. Mac does not have a built-in wake scheduler, but third-party apps like SleepTimer can do this.