Why Your Computer Sleeps and How to Stop It
Your computer enters sleep mode to save power when you are not actively using it. During sleep, the screen goes dark, the hard drive spins down, and most components draw minimal electricity—but the computer stays in memory and wakes when ready when you move the mouse or press a key. This is useful when you step away for coffee, but it becomes a problem when you need the computer to stay awake while you are away from the keyboard: during a long read, a video call, a presentation, or while you are reading something on another device.
You can prevent sleep in three ways: adjust the power settings in your operating system, use a built-in feature designed for specific tasks, or install software that simulates activity. The right choice depends on whether you want to disable sleep permanently, just for one session, or only while a particular program is running.
Key Takeaways
- Windows and macOS both let you change how long the computer waits before sleeping, or disable sleep entirely, through power settings in System Settings or Control Panel.
- Windows has a "presentation mode" and macOS has a "caffeinate" command that prevent sleep for a single session without changing your default settings.
- Plugging in your laptop's power adapter often changes sleep behavior automatically—many laptops are set to sleep only on battery power.
- Third-party software can keep your computer awake by moving the mouse or pressing keys at intervals, but this is less reliable than using built-in operating system features.
- Some programs, like video players and web browsers during calls, have their own "do not disturb" modes that prevent sleep without affecting your system settings.
Changing Sleep Settings in Windows
Open Settings and go to System > Power & battery (or Power & sleep on older Windows versions). You will see two sliders: one for "Screen timeout" and one for "Sleep timeout." The screen timeout controls when the display turns off; the sleep timeout controls when the computer itself enters sleep mode. Set either or both to Never if you want the computer to stay awake indefinitely.
If you are using a laptop on battery power, Windows may show separate settings for plugged-in and battery modes. The plugged-in mode often defaults to a longer timeout or never sleeping at all. If you are plugged in and the computer is still sleeping, check that you are adjusting the correct set of sliders.
These changes affect your computer globally—it will not sleep until you change the setting back. If you want to prevent sleep for only one session, use Presentation Mode instead: press Windows key + A to open Quick Settings, then click Presentation mode. This disables sleep, notifications, and screen dimming for as long as you leave it on, and you can turn it off just as easily when you are done.
Changing Sleep Settings on macOS
Go to System Settings > General > Sleep. You will see options for "Sleep after" with a dropdown menu. Select Never to prevent the computer from sleeping, or choose a specific number of minutes. Like Windows, this setting applies globally until you change it back.
For a single session without changing your default settings, open Terminal (in Applications > Utilities) and type caffeinate, then press Enter. The Terminal window will stay open and the computer will not sleep as long as it remains running. To stop, press Control + C. You can also type caffeinate -t 3600 to keep the computer awake for exactly one hour (3600 seconds), after which it will resume normal sleep behavior.
If you are giving a presentation or video call, macOS also has a Focus mode that can prevent sleep. Go to System Settings > Focus, create or select a focus mode, and enable Sleep in the options—this prevents the computer from sleeping while that focus is active.
Using Laptop Power Settings
Many laptops are configured to sleep only when running on battery power, and to stay awake when plugged in. If your laptop is sleeping even when plugged in, check your power plan. On Windows, right-click the battery icon in the system tray and select Power settings, then look for Power plan settings. You may see options like "Balanced," "Power saver," or "High performance"—each has its own sleep timeout. Make sure you are editing the plan you are currently using.
On macOS, the same System Settings > Sleep menu applies whether you are plugged in or on battery. Some older Mac models had separate settings, but current versions use one setting for both states.
Third-Party Software and Workarounds
If you cannot access system settings or prefer not to change them, third-party software can simulate keyboard or mouse activity to prevent sleep. Programs like Caffeine (macOS), Don't Sleep (Windows), or Amphetamine (macOS) run in the background and periodically move the mouse or press a key, tricking the operating system into thinking you are still using the computer.
These tools are less reliable than changing your actual power settings because they depend on the software continuing to run and the operating system recognizing the simulated activity. If the program crashes or your system updates, sleep mode may resume without warning. They are most useful as a temporary measure when you cannot modify system settings, such as on a shared or work computer where you lack administrator access.
Some programs have built-in features that prevent sleep while they are running. Video players often have a "prevent sleep" checkbox in their settings. Web browsers used for video calls sometimes prevent sleep automatically during a call. Check the preferences or settings of the program you are using—it may already have what you need.
What to Do If Your Computer Still Sleeps
If you have set sleep to "Never" and the computer is still sleeping, check whether a different power plan is active. On Windows, open Control Panel > Power Options and look at which plan has a radio button next to it—that is the active plan. You may have changed the wrong one. Also check whether your computer is set to sleep when you close the lid; this setting is separate from the timeout settings and overrides them.
On macOS, if the computer sleeps despite your settings, restart it and check the settings again—sometimes the change does not take effect until you restart. Also verify that you are in the correct user account; sleep settings are per-user, so if you logged in as a guest or a different account, those settings would not explore.
If you are using a presentation mode or caffeinate command and the computer still sleeps, the feature may have timed out or been disabled. Presentation mode in Windows, for example, turns off automatically after a certain period if you do not interact with the computer. Re-enable it or restart the caffeinate command.
Frequently Asked Questions
Will keeping my computer from sleeping damage the hardware?
No. Modern computers are designed to run continuously. Servers run 24/7 without damage. The main cost is electricity and heat—your computer will use more power and may run slightly warmer. If you are concerned about heat, make sure the vents are clear and the room is well-ventilated, but there is no risk of hardware failure from leaving the computer on.
Can I prevent sleep for just one program, like a read?
Some programs have their own "do not disturb" or "prevent sleep" option in settings—check the preferences of the program you are using. On Windows, you can also use the command line tool caffeinate.exe (if installed) or third-party software to keep the system awake while a specific program runs. The simplest approach is usually to change your sleep timeout temporarily and change it back when the task is done.
Does closing the laptop lid put it to sleep even if I disabled sleep mode?
Yes, on most laptops. Closing the lid has a separate setting from the sleep timeout. On Windows, go to Control Panel > Power Options > Choose what closing the lid does and set it to "Do nothing." On macOS, this setting is in System Settings > General > Sleep under "When closing the lid."
What is the difference between sleep and hibernation?
Sleep keeps your computer in memory and powered on, so it wakes when ready. Hibernation saves everything to disk, powers off completely, and takes longer to wake. On Windows, you can enable hibernation as an option in power settings, but most users prefer sleep. Hibernation is rarely used on modern computers because sleep is faster and uses very little power.
Can I schedule the computer to sleep at a specific time?
Windows does not have a built-in scheduler for sleep, but you can use the command line tool shutdown /s /t [seconds] to schedule a shutdown, or create a task in Task Scheduler to run a sleep command at a set time. On macOS, you can set a sleep schedule in System Settings > General > Sleep under "Schedule." This is useful if you want the computer to sleep automatically at night without having to remember to disable the "Never sleep" setting.