The fastest way to keep your computer awake

The quickest fix is to change your power settings so the screen and hard drive stay on longer — or never turn off at all while you are using the machine. On Windows, open Settings, go to System > Power & battery > Screen and sleep, and set both "Screen times out after" and "Sleep times out after" to longer intervals or to "Never". On Mac, open System Settings, click General > Login Items & Extensions, then go to Energy Saver and uncheck "Put display to sleep when inactive".

If you need the computer to stay awake only while you are actively working, these settings alone usually work. If you step away and the machine still sleeps despite your changes, the problem is often a screensaver or a separate sleep timer that overrides your power settings.

For temporary fixes — when you need the computer awake for just one session — you can also move your mouse or press a key every few minutes, use a third-party tool that simulates activity, or plug in an external power source, which often prevents sleep on laptops.

Key Takeaways

  • Windows and Mac both let you set screen and sleep timeouts to "Never" in power settings, which is the simplest permanent solution.
  • Plugging in a laptop to external power often prevents sleep automatically, even if you have not changed any settings.
  • Screensavers and separate sleep timers can override your power settings, so check those if the computer still sleeps after you adjust timeouts.
  • Third-party tools like Caffeine (Mac) or Don't Sleep (Windows) can keep your computer awake without changing your default power settings.
  • Some programs — video players, presentation software, games — have their own "prevent sleep" options that work only while the program runs.

Why your computer goes to sleep in the first place

Your operating system puts the computer to sleep to save power and reduce wear on hardware. When the machine detects no keyboard or mouse activity for a set time, it dims the screen, then shuts down the display and hard drive. On a laptop, this extends battery life. On a desktop plugged into power, it is mainly habit from the factory settings.

The sleep timer is separate from the screensaver. A screensaver is just a moving image on your screen — it does not put the computer to sleep. But many people confuse the two, and some screensavers have their own sleep settings built in, which can trigger sleep even after you have changed your power settings.

Changing power settings on Windows

Open the Settings app and navigate to System > Power & battery. On the right side, click "Screen and sleep". You will see two dropdown menus: one for "Screen times out after" and one for "Sleep times out after". Set both to "Never", or choose a longer time like 30 minutes or 1 hour if you want the screen to dim but the computer to stay awake.

If you are on an older version of Windows, the path is Control Panel > Power Options > Change plan settings, then adjust "Turn off the display after" and "Put the computer to sleep after". The principle is the same.

After you change these settings, the computer will not sleep unless you manually put it to sleep or close the lid (on a laptop). If it still sleeps, check whether a screensaver is set to turn on and whether any third-party software is overriding your power settings.

Changing power settings on Mac

Click the Apple menu, open System Settings, and go to General > Login Items & Extensions. Then click Energy Saver on the left. Uncheck "Put display to sleep when inactive" and adjust the slider for "Computer sleep" to "Never" or a longer interval. You can set different rules for when the Mac is plugged in versus on battery.

If you have an older Mac running an earlier version of macOS, the path is Apple menu > System Preferences > Energy Saver, but the options are the same. After you save, your Mac will not sleep during inactivity unless you manually trigger it.

One common issue on Mac: if you have set the computer to sleep but the display to stay on, the screen will stay lit but the hard drive may still spin down. Adjust both sliders to match your needs.

Using third-party tools to prevent sleep

If you do not want to change your default power settings — for example, because you share the computer or want it to sleep when you are not using it — you can run a small program that keeps the machine awake only while the tool is active.

On Mac, Caffeine is free and sits in the menu bar. Click it to toggle sleep prevention on and off. On Windows, Don't Sleep is a free tool that does the same thing. Both work by simulating keyboard or mouse activity every few seconds, which tricks the operating system into thinking someone is using the machine.

Some programs also have built-in "prevent sleep" options. Video players like VLC, presentation software like PowerPoint, and many games will not let the computer sleep while they are running — you do not need a separate tool for those.

Keeping a laptop awake without changing settings

If you are using a laptop and do not want to change power settings, plug it into external power. Most laptops have different sleep rules for battery mode and plugged-in mode. When plugged in, many will not sleep at all, or will use a much longer timeout. Check your power settings to see what rules explore to each mode.

If plugging in does not work, your laptop may have a separate setting for "plugged in" sleep. Go back to your power settings and look for an option that says something like "When plugged in, put computer to sleep after" — set that to "Never" as well.

Another temporary fix: position your mouse on a mousepad and place a small object like a pen or coin on a key to simulate activity. This is crude but works if you need the computer awake for just a few minutes.

Troubleshooting when your computer still goes to sleep

If you have set the timeout to "Never" but the computer still sleeps, the problem is usually one of three things: a screensaver with sleep enabled, a third-party program overriding your settings, or a hardware issue like a faulty power button or lid sensor on a laptop.

First, check your screensaver. On Windows, right-click the desktop, select Personalize > Lock screen > Screensaver settings, and make sure no screensaver is selected, or uncheck "On resume, display logon screen" if that option is available. On Mac, go to System Settings > General > Login Items & Extensions, then look for any screensaver settings and disable them.

Second, check whether any running programs have their own sleep prevention. Close programs one by one and see if the sleep behavior changes. Some antivirus software, backup tools, and remote access programs can override your power settings.

Third, if you have a laptop, check whether the lid sensor is working. If the lid is slightly open or the sensor is faulty, the computer may think the lid is closed and sleep accordingly. Try opening the lid fully or cleaning the sensor with a dry cloth.

Frequently Asked Questions

Does keeping my computer awake all the time damage it?

No, modern computers are designed to run continuously. Servers do it all the time. The main downside is higher electricity use and slightly more wear on the hard drive and fan, but the difference is small over a few years. If you are concerned, use a longer timeout like 30 minutes instead of "Never".

Will my computer overheat if I prevent sleep?

Unlikely. Computers have built-in thermal protection and will throttle performance or shut down if they get too hot. Sleep saves power but does not significantly reduce heat during normal use. If your computer is overheating, the problem is usually dust buildup or a failing fan, not sleep settings.

Can I set different sleep times for different programs?

Not directly through Windows or Mac settings, but many programs have their own "prevent sleep" option. Video players, presentation software, and some work tools can keep the computer awake while they run. Check the program's preferences or settings menu for an option like "Prevent sleep" or "Keep display on".

What if my computer goes to sleep even when I am using it?

This usually means your timeout is set too short. Go back to your power settings and increase the timeout to at least 30 minutes, or set it to "Never". If it still happens, a program may be triggering sleep manually, or your mouse and keyboard may not be registering activity — try moving the mouse or typing to wake the computer and confirm it responds.

Does closing the lid put my laptop to sleep?

Yes, on most laptops closing the lid triggers sleep regardless of your power settings. If you want to close the lid but keep the computer awake, you can disable the lid sensor in power settings (on Windows, this is under Power Options > Change plan settings > Change advanced power settings > Power buttons and lid). On Mac, this option is not available in settings, so you would need a third-party tool.