I have my Late 2013 Retina MacBook Pro attached to an external display. I use both displays. At night, when I leave my computer, I want to close the lid to put the Mac to sleep.

Since Lion, there is the famous 'Clamshell mode', which is for a lot of people, but not for me. This causes OS X to switch to single-display mode, using only the external display, if I close it.

Until Mavericks I could prevent this by the famous: sudo nvram boot-args="iog=0x0" kernel parameter, but since Yosemite, this does not work. Is there any solution? I don't want to plug off my computer for the night or put it to sleep by selecting a menu command. Both solutions are really lame.

  • What is preventing it to Sleep when you close the lid ?
    – Ruskes
    Commented Oct 24, 2014 at 19:20
  • If your laptop is connected to a power source and has an external display attached, it will not sleep, but use Clamshell mode instead, as far as I know.
    – gklka
    Commented Oct 24, 2014 at 19:21
  • what does your "pmset -g" shows as settings?
    – Ruskes
    Commented Oct 24, 2014 at 19:54
  • Here it is: gist.github.com/gklka/19541500bd8ca1f91bd7
    – gklka
    Commented Oct 24, 2014 at 19:58
  • Not only can I no longer simply shut the lid to sleep the Mac…if I now press the power button to sleep the Mac, but then shut the Mac's lid, it reawakens the system again in clamshell!
    – 2540625
    Commented Dec 16, 2014 at 2:59

8 Answers 8


Unplug or detach the power adapter before you close the lid. "Closed clamshell mode" requires the MacBook to be plugged into an outlet to activate.

I actually discovered this through trial and error but here's proof! :)



I had this issue too and came up with a service that monitors your lid state and puts the machine to sleep when the lid is closed: https://github.com/pirj/noclamshell. Easily installable via Homebrew.

  • 2
    This is excellent and exactly what I was looking for. I cannot stand clamshell mode when all I want to do is close the lid while I grab lunch and don't want anything displayed across my 3 monitors. Great solution. If you ask me this should be an option to toggle within display preferences. A well-deserved upvote!
    – Art Geigel
    Commented Jun 11, 2020 at 13:50

I'm currently doing this at work which is the best thing I can come up with without the even more annoying unplugging of something:

    • Press power to put your ancient Mac to sleep.

    • Press ctrl+shift+eject to put your older Mac to sleep.

    • Press ctrl+shift+power to put your newer sans-eject Mac to sleep.
  1. Close lid.
  2. Next day: Open lid to wake up the mac.
  • Step 1 of course is just the power button for older macbooks. Any idea what it is for newer Macbooks, namely the late 2016 model? I have no power button, just a fingerprint button next to + and it doesn't put the computer to sleep. Commented May 3, 2017 at 16:49

Download INSOMNIAX for Yosemite is free http://www.macupdate.com/app/mac/22211/insomniax enter image description here

  • The preferences shown in your screenshot are not preventing my Yosemite MBP from sleeping upon lid-shut when connected to an external monitor. Nor does any combination of prefs prevent clamshell mode, unfortunately.
    – 2540625
    Commented Dec 16, 2014 at 1:44

My "perfect solution" for keeping the MacBook lid open but internal screen switched off/only using secondary screen, even with power unplugged(!) using two terminal commands:

Enable "screen off":

sudo nvram boot-args="niog=1"

Disable clamshell in Yosemite:

sudo nvram boot-args="iog=0x0"

Source: OS X Daily - Disable the Internal Screen on a MacBook Pro or Air in OS X Mavericks

The trick: putting Mac to sleep and waking up (unplugged)

  1. (When unplugged) simply close the lid to put Mac to sleep.
  2. To wake up, plug in power and wake up with keyboard/mouse (or any external USB/firewire/bluetooth device).
  3. Mac wakes up → open lid (it should stay off), unplug power.
  4. Voilá!
  • 6
    what? ... i mean... WHAT? Commented May 22, 2015 at 17:24

Not sure it's an exact answer to your question, but how about a Hot Corner to put it to Sleep?

Sleep Hot Corner image

... or add a key command...

Key Command

  • 1
    Thanks, but this is not easier than pressing the power button shortly. I really want to close only the lid to initiate sleep. :/
    – gklka
    Commented Oct 24, 2014 at 19:15
  • No worries - my Mac Pro doesn't have a lid, so for me, swiping to the bottom left corner with the mouse is by far the fastest.
    – Tetsujin
    Commented Oct 24, 2014 at 19:17

From what I can tell, if the macbook is plugged in and the external display is attached, it should not go to sleep and work similarly to the Mavericks method. I still have the nvram setting applied and so far so good; the only difference is that I have to keep the lid closed and use USB for keyboard and mouse.

Not perfect but close!

  • 2
    You did not understand me. I want it to sleep even when external display is attached.
    – gklka
    Commented Oct 29, 2014 at 23:51
  • Ah my bad, I thought you wanted the opposite!
    – TechTrip
    Commented Oct 29, 2014 at 23:54

I have not found an answer to this yet, but a very "workable" workaround.

I have set a Hot Corner on my mac to "Put Display to Sleep". Now before I close the lid, I drag the pointer to the chosen corner with a rather nonchalant swipe across the touchpad.

An extra step but works quite well for me. Hope that helps.

You must log in to answer this question.

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