9

I’m using my MacBook Pro (OS X 10.6) standing in a shelf with an external screen on my desk so I don’t use and need the internal screen. But if the internal one is on it’s shown in spaces.

It is possible to use the MacBook with the internal screen switched off by putting it to sleep and wake it with an external input device while the Book is close. But this way always needs a short sleep and interrupt working. So I wonder if it’s is possible to switch off only the internal screen by software (an app, via Terminal, AppleScript, a keyboard short cut etc.) without switch off the external screen?

I know that there’s a shortcut for “sleep screen“ but this affects all screens including the external one.

Tobi
  • 141

7 Answers7

4

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

Then reboot again, or you can just zap PRAM by holding down Command+Option+P+R during reboot, which clears out the boot-args as well. If you were to disconnect the MacBook Pro from an external video source, zapping the PRAM would be how you’d want to reenable the internal display.

This is the opposite of “clamshell mode” – where the Mac laptop is closed and the screen is still turned on. Clamshell can look nice, but without adequate air flow the Mac may overheat, thus running the computer with the display open is recommended. If you’re going to do this, be sure to set the primary display so that the menubar, Dock, and alert windows go to the proper screen.

Source: OSXDaily

ruddfawcett
  • 1,902
  • 2
  • 15
  • 31
  • Thanks. But unfortunatly I’m running the Snow Leopard. Furthermore the rebooting is more effort than using the clamshell mode. Plus: In clamshell my internal display is off but after waking the MacBook I can open it while the screen stays off. – Tobi Apr 18 '12 at 08:41
  • This seems like a dangerous and terrible idea. Am I missing something? I am well aware that you just zap the PRAM. – Jason Salaz Apr 24 '12 at 07:23
  • What exactly is this doing? Does anyone know what exactly happens when you do this, or if there's a better option out there? I've seen this all over the net, but no answer to the "how it works" question. – Aaron Ash Jun 25 '12 at 16:12
2

A solution for clamshell mode that works using Monterey without Third Party tools:

  1. run sudo nvram boot-args="niog=1" in Terminal
  2. reboot with the External Display connected
  3. close the lid
  4. use a plastic card (or similar which can't cause harm to your screen) to hit any key with the lid very slightly opened so that the internal display is not triggered
  5. continue to open the lid

This behaviour gets reset as soon as your Mac goes to sleep, so use a tool like Amphetamine (or native pmset in Terminal) to keep your computer awake. If your Mac went to sleep with the lip opened, it may be that closing it and waiting of a couple of seconds will turn the external display on. After opening then, clamshell mode persists.

Update It seems to be the case that MacOS has a detailed protocol of determining when allowing lid-open clamshell mode. If you have an external input device available, follow these steps:

  1. Run sudo nvram boot-args="niog=1"
  2. Run sudo pmset -a lidwake 0
  3. Reboot
  4. Unplug the external monitor
  5. Close the lid
  6. Plug in the monitor
  7. Trigger your external input device (or plastic card)
  8. Reopen the lid

Lid-open clamshell mode should now have been invoked.

2

If I understand it correctly, you want to only be using your external display and have the internal display to be shut off. To achieve this, you want to put your macbook in clamshell mode.

To do this you must have your macbook attached to
        a) an external power source
        b) an external display
        c) external keyboard + mouse.
Then all you do is close the lid (see pic below).

When you want to put your mac to sleep you press opt+cmd+eject, and when you want to turn it on again you press any key on your wireless keyboard, having your macbook closed at all times.

More info can be found here.

MBP in clamshell mode

  • Thats exactly what I do at the moment and what I said in the comments above ;-) I wont a solution that doesn’t need the short sleeping to switch the display off. – Tobi Apr 21 '12 at 17:44
  • I'm not sure what you mean then. You don't have to "put your macbook to sleep first" like you say in the comments to enter clamshell mode. Can you explain what you mean? – Milo Wielondek Apr 21 '12 at 17:51
  • I just like to switch off only the internal display and us the Mac as like it is in clamshellmode, but I want to prevent the step of sleeping and wake the Mac. So the result is the same as with your way but without the detour of sleeping. – Tobi Apr 21 '12 at 18:00
  • You do not have to put your mac to sleep in order to use clamshell mode. Maybe you're doing something wrong? Can you explain what you mean by sleeping your mac? Do you want to have the lid open, is that it? – Milo Wielondek Apr 21 '12 at 18:02
  • @Tobi If you're talking about the short delay that occurs when you close the lid, then the only solution that comes to mind is to dim your screen using the F1-key on your keyboard. That way your internal screen will appear off, but it will however still be present in spaces (although it won't show on the second monitor). I'm afraid there's no other way around that than using the clasmshell mode. You'll either have to live with the delay or accept that your internal screen must stay on. – Milo Wielondek Apr 21 '12 at 18:40
  • With sleeping the mac I mean close the lid or press cmd+alt+eject. That makes the book sleep, indicated by the pulsing white LED. – Tobi Apr 23 '12 at 08:45
  • @Tobi Tobi, I have to tell you, you got me really confused. You don't have to sleep your mac to go into clamshell mode. You just connect/power on your external monitor and close the lid. Again, there is NO need to put your mac to sleep. – Milo Wielondek Apr 23 '12 at 14:10
  • But the Mac goes to sleep automatically if I close the lid, doesn’t it? – Tobi Apr 23 '12 at 14:15
  • @Tobi no it doesn't if the three conditions I listed in my answer are met. At least it shouldn't. – Milo Wielondek Apr 23 '12 at 14:17
  • I tried it. If I close the lid the Book goes to sleep after a few seconds. Now I can wake it with the lid closed an the internal screen is off, but thats exactly the step I want to aviod … – Tobi Apr 23 '12 at 15:53
  • @Tobi make sure you have the external screen turned on when you close the lid. That way you should only notice a ~2 sec delay and flashing of screen when your switches clamshell mode. – Milo Wielondek Apr 23 '12 at 16:44
  • The screen is on, external power source, mouse and keyboard are plugged … the Mac goes to sleep, though – Tobi Apr 23 '12 at 16:53
  • @Tobi I see. Then you might as well start troubleshooting your mac, since this is not the default behavior, i.e. something is wrong with your macbook in particular. Sorry! – Milo Wielondek Apr 23 '12 at 17:13
  • Hrmpf … any Idea what could be wrong? – Tobi Apr 23 '12 at 18:15
  • @Tobi nothing comes to mind, sorry. Perhaps a custom setting/preference. You can post a new question and see if someone can help you with that. – Milo Wielondek Apr 23 '12 at 18:27
  • @Tobi PS. if you feel like I've been of any help, I would appreciate you awarding me your bounty! – Milo Wielondek Apr 24 '12 at 08:09
  • Sure, but in my opinion a bounty should only go to an answer that solves the problem, which non of the answers here does … – Tobi Apr 24 '12 at 08:58
1

You know, you could just put the laptop into display mirror mode instead.... Just turn the brightness all the way off on the laptop display.

Old Pro
  • 6,132
  • 3
  • 29
  • 71
  • 1
    Thats no option for me because the external monitor needs more pixels than the internal one … – Tobi Apr 23 '12 at 08:41
  • @Tobi, oh well then, you'll just have to upgrade to Lion. What you are asking for cannot be done under Snow Leopard. – Old Pro Apr 23 '12 at 10:34
  • What do you mean? What can Lion do in this case that SL can’t? – Tobi Apr 23 '12 at 14:16
  • 2
    @Tobi, in Lion if you have an external display plugged into the laptop and the laptop is plugged into a power source, when you close the laptop lid the internal display is turned off without putting the laptop to sleep. Just like you want. – Old Pro Apr 23 '12 at 16:39
  • Thanks. What happens if I reopen the lid (cause that’ll be better for cooling the Book)? – Tobi Apr 27 '12 at 16:00
  • @Tobi, I'm bummed I didn't get the bounty for this, but anyway, I don't recall what happens when you re-open the lid, but if the screen comes back on (probably) then instead of closing the lid in the first place you can just put a magnet on the laptop (just below the left speaker grill) to make the hardware think you closed the lid. – Old Pro Apr 27 '12 at 20:58
  • Sorry, but I gave the bounty to no one because all answers given here are (more or less comfortable) workarounds an no answers to my question. ruddfawcett got half of the bounty automatically since his answer had two upvotes. – Tobi Apr 27 '12 at 22:07
1

If it wasn't clear from the comments, the behavior of clamshell mode changed in 10.7:

  • If a laptop is connected to an external display, closing the lid doesn't put the laptop to sleep.
  • If you open the lid after that, the internal display is turned back on.

sudo nvram boot-args=iog=0x0 restores the behavior in 10.6 and earlier.

If others were looking for a way to trigger normal display sleep (like when pressing ⌃⇧⏏), you can use SleepDisplay.

Lri
  • 105,117
0

While I haven't been able to find a command that will sleep the display natively, there is an app you download that will do it. There are two options from here.

  1. Install the app to the Applications folder and from Terminal or SSH run open /Applications/Sleep\ Display.app

  2. Right click on the app from the Downloads folder and click "Show Package Contents". Navigate to Contents/MacOS and copy the sleepdisplay file.

    Navigate to /usr/bin (you can use the ++G shortcut and type the directory in) and paste the binary file. You will now be able to type the command sleepdisplay into Terminal or through SSH and the display will immediately go to sleep.

Hope this helps!

Matt Love
  • 6,403
  • 1
    Thank you but this software affects all screens not only the internal one. It does the same as ctrl + shift + eject. – Tobi Mar 30 '12 at 12:56
  • Just so you know, even if you find away to selectively put displays to sleep so that the built in display is asleep and the external display is not, it will still show up in Spaces as a useable desktop. If you really want to use your MacBook Pro's hardware with an external display and not use the built in display, I would suggest clamshell mode. – Matt Love Mar 30 '12 at 13:53
  • The clamshell mode is what I use at the moment but I would like to switch off the internal display (as clamshell does) without putting the MacBook to sleep first. – Tobi Mar 30 '12 at 13:57
-1

I wanted to do similar thing and this is what I found. Clamshell is the answer but an overlooked step of clicking a mouse button to switch on the external display worked. I found this at: http://osxdaily.com/2012/06/08/quickly-enter-clamshell-mode-with-an-external-display-in-mac-os-x/

Ninad
  • 1
  • This does not answer the OP's question as your solution also works by first sleeping and then waking the Mac. – gentmatt Oct 30 '12 at 11:04