Some MacBook Pro or Air users may want to disable their internal screen when the laptop is connected to an external display, this is generally achieved in two ways but since Mac OS X 10.7 the internal screen is more persistent and wants to stay on.
To disable the internal screen for OS X Lion based laptops, launch the Terminal and enter the following command:
sudo nvram boot-args="iog=0x0"
You’ll need to reboot for changes to take effect, and the internal display will then be completely disabled regardless of whether the Mac is open or closed.
To undo this, you can go back to the Terminal and enter:
sudo nvram -d boot-args