Is there any way to prevent my MacBook Pro from sleeping when I close the lid on macOS Sierra? I used to use NoSleep on OS X El Capitan; unfortunately it stopped working properly after Yosemite and I've heard that on Sierra it causes problems, so I don't want to install it and potentially cause damage.

Does anyone use anything that they personally have used that prevents MacBooks from going to sleep when the lid is closed on macOS Sierra?

  • 1
    Plugged into an external monitor?
    – dstarh
    Commented Oct 7, 2016 at 20:27
  • @dstarh Oh yes, I forgot to mention: I don't have one at the moment so I'm looking for something more "software" related. Thanks for the suggestion though.
    – Oion Akif
    Commented Oct 7, 2016 at 20:51
  • why don't you want it to sleep?
    – OzzieSpin
    Commented Oct 8, 2016 at 14:28
  • 1
    @OzzieSpin sometimes I have downloads and whatnot running, and I want to close it and put it somewhere
    – Oion Akif
    Commented Oct 8, 2016 at 14:30
  • @OzzieSpin I want to be able to play music through my headphones while walking around with my laptop in my bag or under my arm.
    – minseong
    Commented Sep 19, 2017 at 15:04

8 Answers 8


UPDATE: 2022

NoSleep works perfectly on macOS Monterey 12.4 on both Intel and M1 Macs. Get the latest release from Github


Don't try these on newer macOS's


InsomniaX is not being mantained anymore & you SHOULD NOT use it. No sleep is a better option until MacOS Mojave. Haven't tested any of these with MacOS Catalina. If anyone has tested with Catalina, let us know in the comments.


InsomniaX works perfectly on my MBP 13" 2015. I am using macOS Sierra 10.12.

There's also an app called NoSleep, but it hasn't been updated in years, only use it if you're on older OSX like Mavericks or Yosemite.. I wouldn't recommend using it on Sierra..

  • I've used that one before, but wasn't sure whether it would be a good idea on Sierra. Thanks for confirming!
    – Oion Akif
    Commented Oct 8, 2016 at 13:08
  • Don't use NoSleep, I tried in mac os sierra with a MBA 13" late 2014 and it doesn't work.
    – asielrock
    Commented Nov 27, 2016 at 15:40
  • Does not work on a 2015 rMBP 15 with Sierra 10.12.3. The icon has two shaded areas, a half moon and an eye. On "Prevent Lid Sleep" the moon should become shaded. It will not become shaded when I try to use it. Commented Mar 20, 2017 at 21:40
  • NoSleep does work on macOS High Sierra, you just need it from Github: github.com/integralpro/nosleep/releases
    – adam smith
    Commented Sep 7, 2018 at 2:06

Amphetamine (Free, App Store)

Currently, the best option for modern macOS versions is Amphetamine. This is a free utility that can keep your screen awake, prevent your computer from sleeping when the lid is open, and prevent your laptop from sleeping when the lid is closed.

This is the best option over the other alternatives mentioned because:

  • It is free
  • It is compatible with macOS versions back to 10.11 El Capitan, and likely will be updated for macOS Big Sur soon after it is released (not sure if it works already)
  • It is updated frequently
  • As for keeping your laptop awake with the lid closed, you may install an optional helper tool which "adds a fail-safe for the closed-display mode," increasing the reliability of lid-close-sleep-prevention feature. The helper tool is also open source
  • It is readily available on the macOS App Store.
  • 1
    Seems to be the best option after the InsomniaX not compatible with latest versions. I like the ways I can configure the options and working with sessions (and being free as well).
    – рüффп
    Commented Oct 23, 2020 at 23:42

Tested NoSleep 1.4.0 on my MacBook Air 2012 and it works with macOS High Sierra 10.13.0. Simply need to authorize the use of NoSleep kext in Security settings when warned during install.


I actually still use NoSleep on my macbook air 2011 running on OSX Sierra and it seems to work fine still :) Haven't tried putting it on a brand new macbook pro 13 (2016) also running Sierra yet though. No sleep version 1.4.0.

  • Wow, that's funny. It never seemed to work for me after El Capitan! I thought it was dead after that. I'd still advise anyone from using it as it hasn't been properly tested (and can be unreliable) on El Capitan or above.
    – Oion Akif
    Commented Mar 12, 2017 at 10:51
  • 1
    Just to be on the safe side, don't use NoSleep on Sierra. It hasn't been updated in years.
    – ph33nx
    Commented Apr 6, 2017 at 4:11

"Anti Sleep", an app in the App Store.

  • 1
    This is interesting. I wouldn't have expected such an app to exist on the App Store, but it does seem to be working. The reviews are good but most of the people seem to be using it as a Caffeine alternative, not as a NoSleep alternative. I will mark this as the best answer if it continues to work effectively, due to its availability on the App Store and the fact that you don't need to install any helper tools to use it.
    – Oion Akif
    Commented Mar 5, 2018 at 16:16

Use Caffeinate
To begin running the caffeinate command and prevent your Mac from sleeping, open the Terminal located in /Applications/Utilities, then type the following command:


While this command is running, you will be able to close the lid on your Mac and still have OS X and your apps running and performing their tasks just as you would if the lid were to remain open.

  • 2
    According to this question, it doesn't seem to work. I tried it myself, and it didn't seem work for me. Does it work for you?
    – Oion Akif
    Commented Feb 8, 2017 at 16:53
  • 2
    Doesn't work for me either :(
    – Aldekein
    Commented Feb 24, 2017 at 16:18

One possibility is to completely disable sleep using sudo pmset disablesleep 1. However, after doing this you can't even manually issue the Sleep command from the Apple menu. Sleep mode becomes completely disabled.

To re-enable Sleep mode, use sudo pmset disablesleep 0.


You can also create an AppleScript Application and run it to toggle between settings just with just a double click. I have posted the steps here.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .