Why Your Computer Falls Asleep and How to Stop It

Your computer goes to sleep automatically to save power and reduce wear on the display and hard drive. Windows and Mac both set a default sleep timer — usually 10 to 30 minutes of inactivity — and you can change or disable it entirely. The method depends on your operating system and whether you want the screen to turn off while keeping the computer awake, or whether you want to prevent sleep altogether.

The most common reason to disable sleep is that you're watching a video, giving a presentation, or running a long task and don't want the screen to blank out. A second reason is that you're downloading a large file or running software that needs the computer to stay on. Both have straightforward fixes that take less than a minute.

Key Takeaways

  • Windows lets you change sleep timing in Settings under Power & Sleep, or disable it entirely by setting the timer to "Never."
  • Mac users can adjust sleep settings in System Settings under Lock Screen, or use the Energy Saver pane for more detailed control.
  • You can prevent sleep for just one session by using keyboard shortcuts: press Windows key + X on Windows, or hold Control + Shift + Eject on Mac.
  • If you're running a specific program that needs the computer awake, some applications have their own "prevent sleep" setting inside their preferences.
  • Plugging in your laptop's power adapter often changes sleep behavior automatically — many laptops stay awake when plugged in.

Changing Sleep Settings in Windows 10 and 11

Open Settings by pressing Windows key + I. Go to System in the left sidebar, then click Power & Sleep. You'll see two sections: Screen and Sleep.

Under Screen, set "Turn off after" to however many minutes you want before the display goes dark — or set it to "Never" if you don't want the screen to turn off at all. Under Sleep, do the same thing. Setting Sleep to "Never" means your computer will not enter sleep mode no matter how long it sits idle. If you want the screen to turn off but the computer to stay awake, set Screen to a short time (like 5 minutes) and Sleep to "Never."

These changes take effect when ready. If you change your mind later, you can return to the same screen and adjust the timers again.

Changing Sleep Settings on Mac

Click the Apple menu in the top-left corner and select System Settings. Go to Lock Screen in the sidebar. You'll see a dropdown that says "Turn display off after" — set this to "Never" if you don't want the screen to sleep.

If you want more control over when the computer itself sleeps (not just the display), go back to System Settings and click General, then Login Items & Extensions. Scroll down and look for Allow sleeping when on power adapter — uncheck this box if you want the Mac to stay awake while plugged in.

On older Mac models, you may need to use the Energy Saver pane instead. Go to System Settings, click General, then Energy Saver, and adjust the "Computer sleep" slider to "Never" or a longer interval.

Quick Keyboard Shortcuts to Prevent Sleep Right Now

If you don't want to change your settings permanently and just need the computer to stay awake for the next hour or two, use a keyboard shortcut instead.

On Windows: Press Windows key + X to open the Power User menu. Click Shut down or sign out, then hover over it to see options. You won't see a "prevent sleep" option here, but you can use a third-party tool or straightforward move your mouse every few minutes. Alternatively, open Command Prompt (Windows key + R, type "cmd") and type powercfg /change monitor-timeout-ac 0 to disable display sleep while plugged in, then undo it later by typing the same command with a number instead of 0.

On Mac: Hold Control + Shift + Eject (or Control + Shift + Power on newer models without Eject). This brings up a dialog asking if you want to sleep, restart, or shut down. You can't prevent sleep with this shortcut alone, but you can use the Caffeinate command in Terminal. Open Terminal (Command + Space, type "Terminal") and type caffeinate -u -t 3600 to keep the Mac awake for 3600 seconds (one hour). Change the number to however many seconds you need.

Preventing Sleep While Running a Specific Program

Some applications — like video players, presentation software, or read managers — have their own setting to prevent the computer from sleeping while they're running. Check the program's preferences or settings menu for an option like "Prevent sleep," "Keep awake," or "Disable screensaver."

For example, in VLC Media Player, go to Tools > Preferences, click Interface, and check the box next to "Disable screensaver during playback." In PowerPoint, go to Slide Show and look for an option to prevent sleep during presentations. If the program you're using doesn't have this option built in, fall back to changing your system sleep settings instead.

What Happens When You Disable Sleep

Disabling sleep means your computer will run continuously until you manually shut it down or it loses power. This uses more electricity and generates more heat, especially on a laptop. If you're disabling sleep permanently rather than just for one session, consider re-enabling it when you're done with whatever task required it.

If your computer is plugged in, the extra power draw is usually not a concern. If you're on battery, disabling sleep will drain the battery much faster — a laptop that normally lasts 8 hours on battery might last only 3 or 4 hours with sleep disabled. For laptops, it's better to change the sleep timer to a longer interval (like 2 hours) rather than disabling it entirely.

Troubleshooting: Sleep Settings Not Working

If you've set sleep to "Never" but your computer still goes to sleep, check whether a specific program is overriding your settings. Some antivirus software, backup programs, or system utilities can force sleep mode. Open your installed programs and look for anything related to power management or system optimization.

On Windows, you can also check the Command Prompt to see what's preventing sleep. Open Command Prompt as Administrator (Windows key + X, select "Terminal (Admin)") and type powercfg /lastwake. This shows what woke the computer last, which can help you identify if a program is interfering. On Mac, open Terminal and type pmset -g log to see a history of sleep and wake events.

If your computer is on a corporate network, your IT department may have set a group policy that overrides your personal sleep settings. Contact your IT support team if you suspect this is the case.

Frequently Asked Questions

Will disabling sleep damage my computer?

No, but it will use more power and generate more heat. Modern computers are designed to run continuously, so leaving sleep disabled won't harm the hardware. If you're concerned about power use, set a longer sleep timer (like 2 hours) instead of disabling it entirely.

Can I set different sleep times for when the computer is plugged in versus on battery?

Yes. On Windows, go to Settings > Power & Sleep and you'll see separate options for "On battery" and "Plugged in." On Mac, the Energy Saver pane also has separate sliders for battery and power adapter. This lets you keep the computer awake when plugged in but have it sleep quickly when running on battery.

Why does my computer go to sleep even though I set it to never sleep?

A program may be overriding your settings, or your computer may be locked. If the screen is locked, some systems will sleep regardless of your settings. Try unlocking the computer first. If that doesn't help, check your installed programs for anything related to power management or system optimization.

Does closing the laptop lid put it to sleep?

Yes, on most laptops closing the lid triggers sleep automatically, regardless of your sleep timer settings. If you want to close the lid without sleeping, go to Power Settings and look for an option like "When I close the lid" — change it from "Sleep" to "Do nothing."

Can I use a mouse jiggler or keep-alive program instead of changing settings?

Yes. A mouse jiggler is a small program that moves the cursor slightly every few seconds, which tricks the computer into thinking you're using it. These work but are less reliable than changing your actual sleep settings, and they use more CPU power. Changing your sleep timer is the better approach.