Why Your Computer Falls Asleep and How to Stop It
Your computer goes to sleep to save power and reduce wear on your hardware. The operating system automatically dims the screen, stops the hard drive, and puts the processor into a low-power state after a set period of inactivity. You can change when—or if—this happens by adjusting your power settings.
The steps differ between Windows and Mac, and the timing you choose matters. If you set your computer never to sleep, it will run continuously and use more electricity. If you set it to sleep after 30 minutes but you need it awake for a presentation, you'll have to wake it repeatedly. The goal is to match the setting to what you actually do.
Key Takeaways
- Windows computers sleep through the Control Panel Power Options menu, where you can set the screen to turn off after one time period and the computer to sleep after another.
- Mac computers use System Settings > Displays and System Settings > Energy Saver to control when the screen goes dark and when the machine sleeps.
- You can prevent sleep for a single session by using built-in tools like Windows Task Scheduler or Mac's caffeinate command, without changing your default settings.
- Plugging in your laptop or changing the power plan from "Balanced" to "High Performance" will keep it awake longer during active use.
- Moving your mouse or pressing a key will wake a sleeping computer, but some tasks (like downloads or video playback) may not prevent sleep on their own.
How to Change Sleep Settings on Windows 10 and 11
Open the Control Panel by typing "control panel" into the Windows search box and selecting it. Click Power Options, then Change plan settings next to your current power plan. You will see two dropdown menus: one for when the display turns off and one for when the computer goes to sleep.
Set the display to turn off after the time you want (5 minutes, 15 minutes, 30 minutes, or never). Set the computer to sleep after a longer period or select "Never" if you do not want it to sleep at all. Click Save changes at the bottom. These settings take effect when ready, but your computer will still sleep if you close the lid on a laptop—you can change that separately in the same menu under Choose what closing the lid does.
If you want to prevent sleep only while you are working on something specific, you can use a different approach: open Task Scheduler, create a basic task that runs a straightforward script, or use a third-party tool like Caffeine (free, from Microsoft Store) that keeps your computer awake while the app is running. This way you do not have to change your default settings.
How to Change Sleep Settings on Mac
Go to System Settings (or System Preferences on older macOS versions) and click Displays. You will see a slider for "Turn display off after" with options ranging from 1 minute to "Never." Adjust this to control when your screen goes dark.
Next, click Energy Saver in the same menu. You will see separate controls for when plugged in and when on battery. For a plugged-in Mac, you can set the computer to sleep after a certain time or select "Never." For a laptop on battery, you can set a shorter sleep time to preserve charge. If you want to prevent sleep for a single task without changing these settings, open Terminal and type caffeinate -i followed by the name of the program you want to keep awake, or straightforward type caffeinate to keep the Mac awake until you close Terminal.
Using Keyboard and Mouse Settings to Prevent Sleep
On both Windows and Mac, you can configure whether your keyboard or mouse activity prevents sleep. On Windows, go back to Power Options and click Change advanced power settings. Look for Sleep and expand it, then find Allow wake timers and set it to "Enable." This lets scheduled tasks or alarms wake your computer.
On Mac, the Energy Saver settings include an option to Prevent computer from sleeping automatically when the display is off. Check this box if you want the computer to stay awake even if the screen is dark. Be aware that some activities—like video playback or downloads—may not automatically prevent sleep on all systems, so you may need to adjust these settings if a specific task keeps getting interrupted.
What to Do If Your Laptop Closes and Still Sleeps
Laptops have a separate setting for what happens when you close the lid. On Windows, go to Power Options and click Choose what closing the lid does. You can set it to "Do nothing," "Sleep," "Hibernate," or "Shut down." Select "Do nothing" if you want the computer to keep running when the lid is closed.
On Mac, there is no direct "closing the lid" setting because Macs sleep when the lid closes by design. If you need your Mac to stay awake with the lid closed, use the Terminal command caffeinate -i to keep it running, or use a third-party app like Amphetamine (free from the App Store) that prevents sleep while active.
Plugged In vs. Battery Power
Your computer may have different sleep settings depending on whether it is plugged in or running on battery. On Windows, you can set up separate power plans for each state. On Mac, Energy Saver shows different sliders for "Plugged in" and "Battery." Plugged-in computers typically stay awake longer because there is no concern about draining the battery.
If you are using a laptop on battery and want to prevent sleep, plugging it in is the simplest solution. If you cannot plug it in, lower the screen brightness and close unnecessary programs to extend battery life while keeping the computer awake. Changing from "Balanced" to "High Performance" power mode on Windows will also keep the computer awake longer, though it uses more power.
Common Mistakes That Still Let Your Computer Sleep
The most common mistake is changing only the display timeout and not the computer sleep timeout. Your screen can turn off while the computer stays awake, or vice versa. Make sure both are set to what you need. Another mistake is forgetting that some programs (like video players or presentation software) have their own settings that override your system sleep settings—check the program's preferences if sleep keeps happening during a specific task.
On laptops, closing the lid will sleep the computer even if you have changed the power settings, unless you specifically set "Do nothing" for the lid-close action. Also, if you are on a work network, your IT department may have set a mandatory sleep policy that overrides your personal settings. If your changes do not stick, contact your IT support to see if a group policy is controlling your power settings.
Frequently Asked Questions
Will keeping my computer from sleeping damage it?
No, modern computers are designed to run continuously. However, running 24/7 will increase electricity use and may shorten the lifespan of the hard drive or battery slightly over many years. For most users, the difference is negligible unless the computer runs constantly for years without breaks.
Can I set different sleep times for different programs?
Not directly through system settings. However, some programs (like presentation software or media players) have built-in options to prevent sleep while they are running. Check the program's preferences. You can also use task automation tools like Windows Task Scheduler or Mac's Automator to run a script that keeps the computer awake only during specific times or when certain programs are open.
Why does my computer still sleep even after I changed the settings?
Check whether you are on battery or plugged in—the settings may differ. Also verify that you clicked "Save changes" after adjusting the settings. If you are on a work computer, your IT department may have locked the power settings. On Mac, make sure you are changing Energy Saver and not just the display timeout. Restart your computer after making changes if they do not take effect when ready.
What is the difference between sleep and hibernation?
Sleep puts your computer into a low-power state but keeps the RAM powered so it can wake up quickly. Hibernation saves everything in RAM to the hard drive, turns off completely, and uses almost no power—but takes longer to wake up. Windows offers both options; Mac typically uses sleep only.
Can I wake my computer remotely if it is asleep?
Yes, if you enable "Wake on LAN" in your BIOS or network settings and your computer is connected to the network. You can then send a special packet from another device to wake it. This requires some technical setup and works best on a home or office network. Check your computer's manual or BIOS settings for the exact steps.