How to Prevent Mac from Sleeping When You Close the Lid


There are times when you wish to close the lid of your Mac but still want it to stay awake and not go into sleep mode. You misn’t want to do this when you are listening to music and do not need to look at the screen. By default, OS X automatically sends your machine into sleep mode as soon as you close the lid. However, a third-party app can help you prevent your Mac from dong this.

InsomniaX lets you keep your MacBook awake even when the lid is closed so that you can continue to listen to music or whatever else you were doing on it. In order to run the aforementioned app on your machine, your system configuration must match the following:

  • MacBook Air or MacBook Pro
  • Intel 64-bit processor
  • Mac OS X 10.8.5 or later

If your system specs match the above configuration, you are all set to run the app on your machine.

Preventing Mac from Sleeping When the Display is Closed

1. Download InsomniaX from the MacUpdate website, and save it to your Mac. Double-click on the downloaded archive to extract the actual app file, and then double-click on that app file to launch the app. You will get the following prompt anew need to select “Open.”


2. Click on “Agree” on the following screen to allow the app to be installed.


3. As soon as you click Agree in the previous step, the app will instantly be added to the menu bar. It will show up as a little moon icon appearing on the menu bar that you can click on to pull down the app menu.

Click on that moon icon, and select the option that says “Disable Lid Sleep.”


4. Enter in your username and password to allow the app to make changes to your system. When that is done, click on “OK” to move forward.


5. The feature should now be enabled, and you can confirm it by pulling down the app menu from the menu bar and seeing if the option that you changed above has an icon before its name.


6. From now on your mchine will not go into sleep mode even when you close the display. If you change this option frequently, the app offers you the ability to set a hotkey to switch between enable and disable status of the feature with a single key combination.

To set that up, click on the app icon in the menu bar, select “Preferences” followed by “Set Lid Sleep Hot Key,” and press the keys that you wish to set as hot keys.


7. You can now use this key combination to control the Lid Sleep feature on your MacBook.

To check if the app worked, simply close the display on your Mac, then open it up again, and you will notice that it did not sleep this time. The app worked for you!


Should you wish your MacBook to continue doing something and not go to sleep even when you close the display, the above app can help you get that done on your machine.

Image credit: MacBook Colors


  1. You might want to update this… InsomniaX doesn’t work on rMBP 13″ early 2015 running El Crapitan. You can’t even check off Disable Lid Sleep anymore. Only prevents sleep when lid is opened. Is someone working on a fix for this? I need to be able to close the computer and still access iTunes and other files while the lid is closed!

  2. Face it, Macs suck. Go Ubuntu or even Windows for more customizability.

    1. In my opinion, Macs are far better than Windows as they don’t get stuck in the middle of a task and they are really faster than Windows.

    2. Ubuntu (not everything works 100% of the time) Windows(ugly)
      I have used ubuntu for 10+ years and I can say it’s nice to have something nice (a Macbook pro 15-inch retina display) that just WORKS and looks and feels nice AND can still deliver.

Comments are closed.