Reclaiming Clamshell Mode Under Lion (and maybe Mountain Lion, too)

Something that I noticed immediately when I moved to Lion was that  my MacBook’s display would no longer remain disabled when I opened the lid after entering clamshell mode. This is something I really liked for a few reasons: one, is cooling; another one, is that I find two displays on a distraction when I only need one (plus it seems like a waste of GPU time to be running an unused display).

A quick Google search pointed me to an OSXDaily post, which eventually pointed me to an Apple Discussions thread, regarding this issue. Turns out, lots of people like, or have become dependent on, this feature.

The solution is very simple, just enter the following command into the Terminal:
sudo nvram boot-args="iog=0x0"
And this one when you want to undo it:
sudo nvram -d boot-args
Or just zap the PRAM, though I must share that “just” zapping the PRAM never did the trick for my system.

I realize that not everybody is comfortable with using the Terminal, or find it annoying, or is lazy about it. And I definitively can see the situation where one has to tell a family member, or a client, or a friend how to do it; and they might not be in good terms with the Terminal.

With that in mind, and after reading this morning’s Ars Technica article on Mountain Lion annoyances, I decided to write a little AppleScript app that would run those commands. I’m also releasing the uncompiled version so everyone learning AppleScript or is uneasy about what I’m doing can take a peak. As far as I can tell the commands are the same for Mountain Lion so there should be no surprises, but I cannot confirm this since my Mac is not compatible.

Go ahead, give it a try, and tell me if it , or didn’t, work for you.

Update: The project is now hosted over at BitBucket under an zlib-style license.
Project Page
Source Page
Download Page


4 responses to “Reclaiming Clamshell Mode Under Lion (and maybe Mountain Lion, too)

  1. It says “the variable osver is not defined”
    using Mountain Lion 10.8.2

  2. I don’t mind using Terminal, but your script works and the Terminal commands I used to use quit working for my system (MBP 7,1). I had changed the boot-args in the nvram many times the last few days, getting no joy, but your script works. (I did encounter a couple of hangs at boot, but it has now booted, and I am looking at a dark built in display, using the keyboard & trackpad, and reading this on my external display.) __Thank you for doing this and posting it.__
    keywords: closed, clamshell, Mountain Lion, thanks

    • Thank-you very much for your comment, and I’m glad you find it useful.
      As for the issues you’ve experienced the only thing I can recommend, meanwhile, is to zap the pram (⌘,option,p,r at start-up).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s