Turn off MacBook LCD when lid is open while connecting to external display in OS X Lion
I guess you know what I’m talking about. Let’s go to the solution directly first:
Go to Terminal and input the command as follows, press Enter, input password as needed.
sudo nvram boot-args="iog=0x0"
Restart and try it out!
When you want to get back to Lion’s default state, use this command:
sudo nvram -d boot-args
If experiencing problem when restart, restart again and press ⌘, ⌥, P, R together to reset PRAM. (Not sure how to fix this yet, as I guess, it works only for Nvidia video card? Check your MacBook’s specification.)
And here’s why we are doing this:
I found a lot of people have the same habit as me that, we don't want extended desktop because the mouse always travels to some places that hard to find or something like that. So we connect external display to MacBook, close the lid to put system to sleep, then activate display by external mouse or keyboard, then open the lid to keep the MacBook cool. In Snow Leopard age, doing such a thing, the MacBook's LCD won’t wake up when you open the lid. But in Lion, it will turn on automatically.
Fortunately, we can always do some tricks in Terminal like before. Thanks to chenga.8, @hengdm, @hello_kukoo, @apple4us to provide the useful tip.