How to Prevent a Mac From Going to Sleep

How to turn off sleep mode on Mac

What to Know

  • Click the Apple logo > System Preferences > Energy Saver, and move the slider to Never
  • To temporarily disable automatic sleep: Open Terminal and enter the command caffeinated
  • While your Mac is in caffeinated mode, it will not automatically sleep until you close the Terminal window.

This article explains how to prevent your Mac from going to sleep, including instructions to schedule an automatic sleep time after setting your screen to stay on all the time.

How Do I Keep My Mac Screen On All the Time?

Your Mac has several energy-saving features, which include sleep mode. This mode is designed to activate whenever your Mac hasn’t been in use for a while. The screen turns off, and the Mac enters a low power mode until you wake it up. If you want your Mac screen to stay on all the time, you need to disable sleep mode fully.

You can also increase the amount of time to keep your Mac screen on without entirely disabling sleep mode. Just set a time you’re comfortable with using step four below.

Here’s how to keep your Mac screen on all the time:

  1. Click the Apple logo in the upper right corner of the screen.

    The Apple icon highlighted in the macOS menu bar.
  2. Click System Preferences.

    System Preferences highlighted in the Apple menu.
  3. Click Energy Saver.

    Energy Saver highlighted in macOS preferences.
  4. Click the slider and move it to Never, which is all the way to the right.

    The turn display off slider set to Never highlighted in macOS.
  5. Your Mac screen will now stay on all the time unless you manually select Sleep from the Apple menu.

    A Mac set to never sleep.

How to Keep Your Mac Screen On During Important Tasks

Having your Mac screen shut off during an important task just because you haven’t touched your keyboard or mouse in a while can be annoying, but completely turning off sleep mode results in more power use and excessive wear and tear on your system. If you want to make sure your Mac screen doesn’t turn off during important tasks, you can use a terminal command.

Here’s how to keep your Mac screen on using a terminal command:

  1. Open the macOS Terminal app.

    Opening Terminal via Spotlight on a Mac.

    Type Terminal into Spotlight, or open it in the Finder via Applications > Utilities > Terminal.

  2. Type caffeinate.

    The Terminal command line in macOS.
  3. Press Enter.

    Press enter after typing caffeinate into macOS Terminal.
  4. Your Mac screen will stay as long as the Terminal window remains open.

  5. To disable caffeinated mode, click Terminate on the alert that appears when you attempt to close the Terminal window.

    Terminate highlighted in a confirmation box on macOS.
  6. After successfully closing the Terminal window, your Mac will once again enter sleep mode according to your Energy Saver settings.

Why Does My Mac Automatically Go to Sleep?

Your Mac automatically goes to sleep to save power for both environmental and cost-saving reasons. The automatic sleep timer is on by default, so your Mac will automatically go to sleep if it doesn’t receive any inputs for a few minutes unless you change your Energy Saver settings. Sleep Mode is supposed to be disabled whenever you watch or listen to media, but that isn’t always the case.

If you find that your Mac automatically goes to sleep when you’re watching movies or listening to music, then you may want to use the method described above to increase the amount of time before sleep mode engages or turn the automatic sleep feature altogether.

Can You Schedule a Mac to Sleep Automatically?

While your Mac is designed to sleep whenever you aren’t using it, you can also schedule your Mac to sleep at specific intervals if you like. This option is helpful if you want to disable the automatic sleep feature fully but still have the Mac enter sleep mode during times of the day when you usually aren’t using it, like when you’re sleeping at night.

Here’s how to schedule your Mac to sleep automatically:

  1. Click the Apple icon in the upper left corner, and select Preferences.

    System Preferences highlighted in the Apple menu on a Mac.
  2. Click Energy Saver.

    Energy Saver highlighted in Mac System Preferences.
  3. Click Schedule.

    Schedule highlighted in Mac Energy Saver options.
  4. Click the Sleep check box.

    The Sleep checkbox highlighted in Mac Energy Saver scheduling.
  5. Click Every Day, and select Weekdays, Weekends, Every Day, or a specific day of the week.

    The Day menu highlighted in Mac Energy Saver scheduling.
  6. Click 12:00 AM and select the time you want your Mac to enter sleep mode.

    12:00 AM highlighted in Mac Energy Saver scheduling.
  7. Your Mac will now sleep automatically at the time and day or days you selected.

    Mac Energy Saver scheduling set to automatically sleep each day at 3:00 AM.
FAQ
  • How do I prevent my Mac from going to sleep when closing the lid?

    Connect your laptop to an external display to prevent your MacBook from sleeping when you close the lid. Adjust the display sleep settings from System Preferences > Battery or Energy Saver. Then plug in your external monitor to power > connect your MacBook to the power adapter and the external monitor > and close the lid.

  • How do I prevent my Mac wireless mouse from going to sleep?

    Your wireless mouse might come with software that allows you to change when the built-in sleep setting kicks in. However, generally, you can't disable the sleep mode on a wireless mouse paired with your Mac. If you have issues with your Magic Mouse disconnecting after idle time or waking your computer, you might need to pair the mouse again from Bluetooth settings.

  • How do I prevent my Mac laptop from going to sleep?

    Select System Preferences > Energy Saver or Battery > Power Adapter > Prevent computer from sleeping automatically when the display is off. Also, if available, disable the setting Put hard disks to sleep when possible, and select Never under the Turn display off after slider.

Was this page helpful?