Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Up until yesterday (with Snow Leopard), closing the lid would cause my MacBook to sleep whether or not the external monitor was connected.

Since upgrading to Lion last night, closing the lid when the external monitor is attached just tosses all windows to that screen and keeps going.

I realize I can sleep via the Apple menu or keyboard before closing the lid. I'd rather not have to, and I'm wondering if there's a setting to restore the sleep-on-close behavior.

share|improve this question
2  
Reading for Siracusa's review, this is the normal behavior in Lion. Let's see if there's an option somewhere. –  Loïc Wolff Jul 21 '11 at 15:22
    
Have you tried doing control-shift-eject? –  user6124 Jul 21 '11 at 15:43
2  
See above: "I realize I can sleep via the Apple menu or keyboard before closing the lid" –  Paul Roub Jul 21 '11 at 15:46
    
I don't get why there isn't an option for this and why the "lion behaviour" is the default one. WHY would ANYONE EVER turn down the access to better cooling and extra screen space available by using the macbook while open with a monitor plugged in –  XAleXOwnZX Aug 5 '11 at 1:43
3  
I have a use case. I want to allow my kids to use my MacBook to watch videos. I don't want them to put sticky fingers on the notebook's own screen or keyboard so I'll just hide the Macbook behind a commodity monitor and let them bash on the Bluetooth keyboard. I might even stand the monitor on top of the closed case is it is not too heavy. –  Stuart Woodward Nov 28 '11 at 6:19

7 Answers 7

up vote 21 down vote accepted

edit: See this as the behaviour has changed: Why won't closing the lid sleep my MacBook Pro with external monitor attached after upgrading to Lion?

There are two groups of people. Those who wish to have dual displays and have closing the lid go into sleep and people who wish to disable the monitor display, close the lid and use the external monitor as if you had 'docked' with it.

Previously, if you wished to switch from the macbook to an external monitor entirely then you had to perform the following to put the laptop into clamshell mode:

  1. Make sure the computer is plugged in to an outlet using the AC power adapter.
  2. Connect a USB keyboard and mouse to your computer.
  3. With the computer turned on connect the Apple portable (using the appropriate Apple adapter if necessary) to the appropriate port on the external display or projector and turn the display or projector on.
  4. Once your computer's Desktop appears on the external display, close the computer's lid.
  5. Once the lid is closed, wake the computer up by either clicking your mouse button or by pressing a key on your external keyboard.

source: http://support.apple.com/kb/ht3131

So to put the machine in clamshell mode required you to put it to sleep and wake it back up again. As far as user experience goes, that is somewhat jarring.

As you have the other options to put the machine to sleep, it seems very likely that this change will remain.

Right now, there is no way to alter this behaviour.

share|improve this answer
2  
6. Hope that the %&@$§! MacBook doesn't fall right back into sleep again, which happened to me every day. Lion changes that for good. –  René Jul 21 '11 at 16:25
8  
This would be a great answer to "why did they change the lid-closed behavior?" And I get it. But the question at hand is "is there some way to get the old behavior back for those of in the first group?" –  Paul Roub Jul 21 '11 at 16:34
    
That reads like I'm correcting / complaining about your response; really just explaining why it's not accepted. It's actually a useful explanation for those angered / baffled by the change. –  Paul Roub Jul 21 '11 at 16:44
    
Hi Paul, I didn't take it as a complaint, don't worry. I knew it wasn't an answer but I am sure that it wouldn't have fit into the comments section. The answer may be that "you can't" but I cannot say that for sure, hopefully someone can provide a direct answer either way. –  Neil Trodden Jul 21 '11 at 16:51
1  
Yes, it sucks that people had to re-wake up their mac laptop if they wanted to use it with the lid closed, but there's an obvious solution: make the behavior configurable! Apple could even make the no-re-wake behavior the default, if that's what most people would want or expect. Then, the other half of the population doesn't have to go through the "extra" step of sleeping, before closing the lid. –  allyourcode Feb 19 '12 at 13:35

One alternative is use the "hot corners" feature instead of closing the lid to put the display to sleep.

For example, you can set it up so that moving the mouse to the bottom right corner of the screen initiates "Sleep."

The setting is in System Preferences > Desktop & Screen Saver > Screen Saver and click the Hot Corners... button.

share|improve this answer
3  
Right, but unless I'm gravely mistaken, display sleep != system sleep. –  Paul Roub Jul 21 '11 at 15:41
1  
@Paul you're right, they're two different things, they have two different shortcuts, too –  Agos Jul 21 '11 at 16:02
2  
Well, nice shortcut, but I (or especially co-workers not used to my mouse :-)) sometimes hit the corners accidentally, and I don't want it to go to sleep in the middle of a download etc. –  Alexander Klimetschek Aug 23 '11 at 9:28

I too have been puzzled by this since installing Lion, especially as I've been observing both behaviors (my MBP sometimes went to sleep when closing the lid while external monitor attached, sometimes it didn't).

I think I have found what is different in both scenarios: the power (magsafe) cable.

I believe that if you unplug the power cord before closing the lid, the mac will go to sleep when you close the lid. If the power cord is still plugged in, it won't sleep.

This might not answer the question "how can I make it always sleep", but it does answer the original question, which is "why"...

share|improve this answer
1  
Can confirm that. Clamshell mode seems to depend on external power (which makes sense I guess). But it's not as convenient as simply closing the lid. –  Alexander Klimetschek Aug 23 '11 at 9:26

if there's a setting to restore the sleep-on-close behavior

Yes, there is. To restore Snow Leopard behavior just run the following command in the Terminal while the external monitor is disconnected and reboot:

sudo nvram boot-args=iog=0x0

I've just used it on my Lion – works like a charm.

 
If you ever want to reset it back, either run the following (and reboot of course):

sudo nvram -d boot-args

or just reset your PRAM with ++P+R if for some reason you can't boot.

share|improve this answer

Though not answering your question, why not use a keyboard shortcut or the menu to sleep the machine?

I see this option as preferable as you'd use the hinge less, and probably stop it from wearing out quicker too.

share|improve this answer
    
You could also use the power button plus the S key. The problem I have is that none of these work if your computer is locked. I find it quite annoying that I have to enter my password just to put my computer to sleep, when I should be able to do it just by closing the computer. –  asmeurer Jul 20 '12 at 19:47

Well… I have "a solution" as long as you are willing to accept a few less-than-ideal aspects.

Here's how it works:

  1. Using the 'brightness' tool (included in the zip below), check the active display IDs
  2. Add your laptop display ID number to a shell script (see zip)
  3. Run the shell script via launchd to monitor /Library/Preferences/SystemConfiguration/ for changes
  4. If the script sees that your laptop display is not active, it tells the computer to sleep

Caveat

Ideally we would monitor the system for resolution changes, except that I can't find any way to do that automatically.

(It seems like there would have to be a way to do that, but my GoogleFu has not turned up any.)

"Bug"

It can take a minute or two for the script to notice that something has happened. (It seems much longer when you're waiting, but it will happen.)

HOWTO

  • You'll need to download this http://dl.dropbox.com/u/18414/scripts/ase-18037.zip
  • unzip it and read the README.txt file
  • copy the 3 included files to their proper locations (as explained in the README)
  • edit one of the files to include your monitor's ID number (ditto)
share|improve this answer

This similar to what I am experiencing:

I just upgraded to Lion on my Macbook (White 1.83 2007), I have an external Samsung XL2370HD monitor. The Macbook was sometimes running hot with the lid down with Snow Leopard.

The solution was to lift the lid half way to let it cool, and also to gain access to the built-in keyboard when the external keyboard was not hooked back up. Now with Lion, it switches back to the Macbook LCD display automatically when the lid is opened, and sometimes the colorsync settings get mixed up in the process, causing the second display to be off color until I manually reset the screen resolution to 1920 x 1080.

Also noticed that the ctrl+zoom wheel only zoomed in an area of 1280 x 800 on the samsung set to 1920 x 1080. This seems to be a bug, because restarting with the lid down into 1920 mode, all is well.

I can't find anyway to have the lid open except in mirror mode. Win 7 on Bootcamp works fine and I can lift the lid without it switching. It was very convenient to be able to close the Macbook to sleep it and then click the mouse to wake it on the ext monitor, then sleep and open the lid to wake the built-in display. That is the optimal way it should work, and has worked previously with dual displays.

  • Try restarting the Mac in just the external mode (lid closed with pull down menu restart). the lid switch now seems to toggle when you lift and close the lid. So opening it once does nothing, but opening it a second time switches it to the built-in screen, and then a third lift and close puts it to sleep again.
  • Click on the mouse in the third sleep mode and it returns to the external display (albeit with resized windows). I believe that Lion may adapt itself (learn?) automatically, which would be very cool, but I suspect that restarting in the different screen modes eventually may help reset the PRAM settings back to normal.
  • Also try changing resolutions on both sides. It seems to cache whatever you are doing, and may just be hiccuping on earlier saved PRAM data.
  • A last resort is a PRAM reset: Hold alt(option) + apple + p + r on reboot, after the chime. Hold the keys down and let it chime three times before releasing and booting up. BTW, Do this on an externally attached keyboard, lid closed if possible. This will give priority to the external monitor booted, hopefully.
share|improve this answer

protected by Community Oct 22 '11 at 16:23

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.