Mac os (Mountain) Lion + external display + sleep when closing the lid

I recently dared to upgrade from Snow Leopard (10.6) to Mountain Lion (10.8), skipping Lion (10.7) altogether.

One of the mayor disturbances I had, was when I was using my Macbook Pro at my home office. I use an external display (some Samsung SyncMaster) as well as my MBP’s main display.

I put my MBP to sleep by simply closing the lid, keeping the power source and external display attached.

Pre-Lion this resulted in my MBP neatly going to sleep mode, in Mountain Lion this resulted in Mac OS using the external display as sole display and keeping the MBP running… Not something I was interested in, as it would either require me to unplug power before closing the lid or manually clicking the sleep button for my MBP to go to sleep.

After some great searching, I came along this post (page 3 and 4 have useful information) and I’ll summarize it here:

  1. Unplug your external display
  2. open Terminal (via spotlight for example) and type:
    sudo nvram boot-args="iog=0x0"
  3. Type your Mac password
  4. Reboot and wait for Mac OS X to fully boot
  5. Plug your external display back in. The resolution might be wrong and it might not recognise your display.
  6. Go to sleep by closing the lid. It should now work correctly.
  7. Upon reopening, the resolution will be fixed (if not, close and reopen or replug the external display — I’m sure it’ll be solved now).

I’ll add this info as well that jk10003 added:

If it screws up your system, just zap the PRAM next boot (cmd-opt-p-r) and you’ll be back to the default Lion state. Or if you can still get into terminal, this command will get you back to Lion’s default state as well:

sudo nvram -d boot-args

 

 


Posted by

in

, , ,

Comments

5 responses to “Mac os (Mountain) Lion + external display + sleep when closing the lid”

  1. Daniel Panayotti avatar
    Daniel Panayotti

    Thank you very much, it really worked perfect for me.

  2. Géraud de LAVAL avatar
    Géraud de LAVAL

    It works like a charm!
    The last sentence was a bit threatening!

  3. Michael Johnston avatar

    If you add it to com.apple.Boot.plist in the kernel flags string located in /Library/Preferences/SystemConfiguration, the preference will stick even if you reset your PRAM.

  4. Erik avatar
    Erik

    Nothing happens when i do the above. After reboot it’s the same as before, internal display is still on!

    Macbook Pro early 2011 using a minidisplay to dvi adapter.

  5. Myung Chul Park avatar

    Thanks. It’s working!

Leave a Reply to Géraud de LAVALCancel reply