Why Your Computer Sleeps and How to Change It

Your computer goes to sleep to save power and reduce wear on hardware. After a set period of inactivity—usually between 5 and 15 minutes—the screen turns off and the processor slows down. On Windows, this is called sleep mode. On Mac, it's called sleep. You can change when or whether this happens by adjusting your power settings.

The fastest way is to open your power settings and set the sleep timer to "Never" for the situation you're in right now—plugged in at your desk, or on battery. You can also keep your computer awake temporarily by moving your mouse or pressing a key every few minutes, or by using a built-in setting that prevents sleep while a specific program is running.

Key Takeaways

  • On Windows, open Settings > System > Power & Battery > Screen and sleep, then set "When plugged in, put my device to sleep after" to Never.
  • On Mac, open System Settings > Lock Screen, uncheck "Start after [X] minutes of inactivity", then do the same in System Settings > Energy Saver.
  • You can set different sleep times for plugged-in and battery modes, so your computer sleeps on battery to save power but stays awake at your desk.
  • Third-party tools like Caffeine (Mac) or Don't Sleep (Windows) can override sleep settings for a set time without changing your permanent settings.

Windows: Changing Sleep Settings in Settings

Open Settings (press Windows key + I). Go to System in the left sidebar, then click Power & Battery. Under "Power and battery", click Screen and sleep.

You will see two sections: "When plugged in" and "On battery". Under "When plugged in, put my device to sleep after", click the dropdown and select Never. This stops your computer from sleeping while it is plugged into power. If you want to keep it awake on battery too, do the same for the "On battery" section—but this will drain your battery faster.

You can also set the screen to stay on longer without putting the whole computer to sleep. In the same menu, adjust "When plugged in, turn off my screen after" to a longer time, like 30 minutes or 1 hour. The screen will turn off but the computer will keep running.

Windows: Using the Control Panel (Older Method)

If you are on an older version of Windows or prefer the Control Panel, you can also change sleep settings there. Press Windows key + R, type powercfg.cpl, and press Enter. This opens the Power Options window.

Click Change plan settings next to your current power plan (usually "Balanced" or "Power saver"). Under "Put the computer to sleep", set both "Plugged in" and "On battery" to Never. Click Save changes.

Mac: Disabling Sleep in System Settings

Open System Settings (click the Apple menu, then System Settings). Click Lock Screen in the sidebar. Uncheck the box next to "Start after [X] minutes of inactivity". This prevents your Mac from locking and sleeping automatically.

You should also check Energy Saver settings. Go back to System Settings, click General in the sidebar, then scroll down and click Energy Saver. Uncheck "Put display to sleep when inactive" and "Put hard disks to sleep when inactive" if you want your Mac to stay fully awake.

On newer Macs with Apple Silicon (M1, M2, M3), the Energy Saver menu is simpler. Just uncheck "Put display to sleep when inactive" and you are done.

Temporary Solutions: Keeping Your Computer Awake Without Changing Settings

If you do not want to change your permanent settings, you can keep your computer awake temporarily. The simplest method is to move your mouse or press a key every few minutes. Some people place a small object on a key to hold it down, but this can cause problems if the key triggers an action repeatedly.

A safer temporary fix is to use a third-party tool. On Mac, read Caffeine (free from the Mac App Store). Click the coffee cup icon in the menu bar to toggle sleep prevention on and off. On Windows, read Don't Sleep (free, from the developer's website). Open it and click "Prevent sleep" to keep your computer awake for as long as you want.

You can also use your web browser to prevent sleep. Open a video or music player and let it play in the background—most browsers prevent sleep while media is playing. Some browsers also have built-in "prevent sleep" extensions you can install.

When to Use Different Sleep Settings for Plugged In vs. Battery

The best approach is to set different sleep times depending on whether your computer is plugged in. When plugged in at your desk, set sleep to "Never" so you do not lose your work or get interrupted. When on battery, set sleep to 5 or 10 minutes so your battery lasts longer.

Windows and Mac both let you set these separately. On Windows, you saw this in the "When plugged in" and "On battery" sections. On Mac, the Energy Saver settings explore to both, but you can create a separate power plan if you need more control.

This way, your computer stays awake when you are actively using it at your desk, but conserves power when you are away or on the go.

Troubleshooting: Your Computer Still Goes to Sleep

If you set sleep to "Never" but your computer still sleeps, check whether a program is overriding your settings. Some video players, presentation software, and games prevent sleep while they run. Close any programs you are not actively using and try again.

On Windows, also check whether your power plan has been reset. Open Settings > System > Power & Battery > Power mode and make sure you are not on "Power saver" mode, which overrides your sleep settings. On Mac, restart your computer after changing Energy Saver settings—sometimes the changes do not take effect until you restart.

If your computer goes to sleep even when you are using it, the problem may be a faulty keyboard or mouse that is not registering movement. Try using a different keyboard or mouse to see if that fixes it.

Frequently Asked Questions

Will keeping my computer from sleeping damage it?

No. Modern computers are designed to run continuously. Keeping your computer awake uses more power and generates more heat, but it will not harm the hardware. If you are concerned about heat, make sure your computer has good ventilation and is not blocked by dust or blankets.

Can I set different sleep times for different programs?

Yes, on both Windows and Mac. Some programs have their own settings that prevent sleep while they are running—check the preferences or settings menu of the program. You can also use third-party tools like Caffeine (Mac) or Don't Sleep (Windows) to prevent sleep only while those tools are active.

What is the difference between sleep and hibernation?

Sleep puts your computer into a low-power state where it can wake up quickly. Hibernation saves everything to your hard drive and shuts down completely, using almost no power. On Windows, you can enable hibernation in Power Options if you want that option. On Mac, hibernation is not a separate mode.

Does preventing sleep affect my monitor separately?

Yes. You can set your screen to turn off after a certain time while keeping your computer awake. On Windows, this is the "turn off my screen after" setting. On Mac, this is the "Put display to sleep when inactive" setting. This saves power without putting your whole computer to sleep.

Why does my computer go to sleep even when I am watching a video?

Some video players prevent sleep automatically, but not all. If your computer sleeps while a video plays, check whether the player has a "prevent sleep" option in its settings. You can also use a tool like Caffeine (Mac) or Don't Sleep (Windows) to override sleep while the video plays.