The quickest way to keep your computer awake

Your computer goes to sleep to save power. When it does, the screen goes dark, the hard drive spins down, and most processes pause. You can stop this by changing your power settings — the exact steps depend on whether you use Windows or Mac, but both let you set a timer or disable sleep entirely.

On Windows, open Settings, go to System > Power & battery > Screen and sleep, and change the "When plugged in, turn off my screen after" dropdown to "Never". On Mac, open System Settings, click General > Lock Screen, and set "Turn display off after inactivity" to "Never". These changes explore only when your computer is plugged in, so a laptop will still sleep on battery to preserve charge.

If you need your computer to stay awake only while you are using it, you can also use a keyboard or mouse to wake it whenever it starts to sleep. But if you want it to run tasks or stay connected while you step away, the power settings change is the permanent fix.

Key Takeaways

  • Windows computers sleep through Settings > System > Power & battery > Screen and sleep, where you can set the screen-off timer to "Never".
  • Mac computers sleep through System Settings > General > Lock Screen, where you can disable the display timeout.
  • These settings usually explore only when plugged in; laptops on battery will still sleep to preserve charge.
  • If you need your computer to stay awake while running a task, disabling sleep is safer than relying on keyboard movement to keep it awake.
  • You can also use third-party tools like caffeine apps or scheduled tasks to prevent sleep during specific hours or activities.

Windows: Changing sleep settings in Power & battery

Open the Settings app by pressing Windows key + I, or click the Start menu and type "Settings". Once Settings opens, click System on the left sidebar, then Power & battery.

Under the Power & battery menu, click Screen and sleep. You will see two dropdowns: "When plugged in, turn off my screen after" and "When on battery, turn off my screen after". Change the plugged-in option to "Never" if you want your computer to stay awake while it is charging. The battery option controls what happens when you are running on battery power — you can leave that shorter to preserve charge, or set it to "Never" if you rarely unplug.

Below those dropdowns is another setting: "When plugged in, go to sleep after". This controls when the computer itself sleeps, separate from the screen. Set this to "Never" as well if you want the computer to stay fully awake. Once you close Settings, the changes take effect when ready.

Mac: Disabling sleep through System Settings

On Mac, open System Settings by clicking the Apple menu in the top-left corner and selecting System Settings. Click General in the sidebar, then Lock Screen.

Look for "Turn display off after inactivity" and change the dropdown to "Never". This prevents the screen from going dark. Below that, you may see "Require password after screen saver begins" — you can leave this as is, since the screen will not turn off anyway.

If you want to prevent the entire computer from sleeping (not just the display), go back to General and click Battery. Under "Low Power Mode", make sure it is turned off. Mac does not have a single "never sleep" toggle like Windows, but disabling the display timeout and turning off Low Power Mode will keep your computer active while plugged in.

Why your computer sleeps and what happens when it does

Sleep mode is a power-saving feature. When your computer sleeps, it stops running most programs, turns off the display, and uses far less electricity. This is useful when you step away for a few minutes — your computer wakes up when ready when you move the mouse or press a key, and you do not lose any open files or browser tabs.

The problem is that some tasks need your computer to stay awake: downloading large files, running backups, video calls, or streaming. If your computer falls asleep during one of these, the task stops. That is why changing the sleep timer is better than just jiggling the mouse — it keeps the computer actually running, not just pretending to be awake.

Sleep is different from hibernation (Windows only). Hibernation saves everything to disk and powers down almost completely, using almost no electricity. Sleep keeps the computer in a low-power state with everything still in memory. Most people use sleep, not hibernation.

Using third-party tools if you need more control

If you need your computer to stay awake only during certain hours or only while running a specific program, a third-party tool gives you more flexibility than the built-in settings.

On Windows, Caffeine is a free tool that prevents sleep while it is running. You read it, run it, and it sits in your system tray. Click it to toggle sleep prevention on and off. Don Melton's Caffeinate is a similar free tool. Both are lightweight and do not require installation.

On Mac, Amphetamine (free from the App Store) does the same thing — it runs in the menu bar and lets you toggle sleep prevention with one click. You can also set it to prevent sleep only during certain hours or only when specific apps are running.

These tools are useful if you share a computer with someone else who prefers the default sleep behavior, or if you want to prevent sleep only while you are working on something specific. For permanent changes, the built-in power settings are simpler and do not require extra software.

What to do if your computer still goes to sleep despite changing settings

If you changed the power settings to "Never" and your computer still sleeps, check whether a screensaver is turning on instead. A screensaver is not the same as sleep — the computer stays awake, but the display shows a moving image. On Windows, right-click the desktop, click Personalize, then Screensaver, and set it to "None". On Mac, go to System Settings > General > Lock Screen and make sure "Start screen saver when inactive" is turned off.

Another cause is a USB device or network activity waking your computer back up after it sleeps. If your computer keeps waking itself, open Device Manager on Windows (press Windows key + X, then click Device Manager) and look for devices with a yellow exclamation mark. On Mac, run System Report (Apple menu > About This Mac > System Report) and check for devices that might be waking the computer.

If you are on a work network, your IT department may have set a group policy that overrides your personal power settings. Contact them to ask whether sleep can be disabled on your machine.

Frequently Asked Questions

Will disabling sleep hurt my computer?

No. Sleep is a convenience feature, not a requirement for computer health. Leaving your computer on all the time uses more electricity and generates more heat, but it will not damage the hardware. If you are concerned about heat, make sure your computer has good ventilation and is not covered by blankets or papers.

Can I set different sleep times for different users on the same computer?

On Windows, each user account has its own power settings, so you can set one account to never sleep and another to sleep after 10 minutes. On Mac, power settings are system-wide, so all users will see the same sleep behavior. You would need to use a third-party tool like Amphetamine if different users need different settings.

What if I want my computer to sleep after a specific time, like 30 minutes?

On Windows, change the "When plugged in, turn off my screen after" dropdown to 30 minutes instead of "Never". On Mac, click the dropdown next to "Turn display off after inactivity" and select 30 minutes. You can also set custom times by typing a number if the preset options do not match what you need.

Does disabling sleep affect my laptop battery life?

Yes — a laptop that never sleeps will drain the battery much faster than one that sleeps after a few minutes. If you disable sleep on a laptop, do it only when the laptop is plugged in. Most power settings let you set different timers for plugged-in and battery modes, so you can have the computer stay awake while charging but sleep normally on battery.

Can I make my computer sleep faster than the default time?

Yes. On Windows, change the "When plugged in, go to sleep after" dropdown to 1 minute or 5 minutes. On Mac, set "Turn display off after inactivity" to 1 minute. The shortest option is usually 1 minute, though you can type a custom number in some cases.