30

How do you turn off the MacBook Pro’s display with the lid open while using an external monitor on Mac OS X 10.10 Yosemite?

All the previous methods—such as the one’s listed here—that have worked on Mavericks no longer work on Yosemite.

Does anyone know the way to do this on Mac OS X 10.10 Yosemite? Turning down the brightness is not the same as turning off the display as the GPU still sends a signal to the internal display and the external monitor.

These were the terminal commands to achieve this on Mavericks:

Enable

sudo nvram boot-args="iog=0x0"

Disable

sudo nvram -d boot-args

Anyone know how to achieve this on Yosemite?

Jash Jacob
  • 4,443
  • 10
  • 36
  • 64
chance
  • 403
  • 2
    Yeah, sadly this appears to be something that regressed with the release of Yosemite. One would think this to be a feature by now. Ugh. – TechTrip Oct 29 '14 at 23:32
  • 1
    I share you sentiments exactly, you would think such a basic feature would be included. Still holding out hope that someone will find a software workaround to this soon. – chance Oct 30 '14 at 02:47
  • Hi, agree experimenting with this I can get it to work only by closing the lid. As long as the laptop is plugged in it doesn't sleep. Thus you need a usb keyboard and mouse to quirk with this setup. A concession until Apple fully addresses the issue. – TechTrip Oct 30 '14 at 15:59
  • Right, well that's intended behavior by closing the lid, using a usb kb and mouse. I prefer to keep the lid open for additional airflow as the heat that rises from the keyboard doesn't get trapped from underneath the closed clamshell. – chance Oct 30 '14 at 20:11
  • Some lateral thinking: Use a magnet to trick the MacBook into thinking the lid is closed. "Use at your own risk" yada yada. – Steve Moser Feb 18 '16 at 15:15

8 Answers8

19

Found this wonderful free application :

https://github.com/Eun/DisableMonitor/

Works like a charm. Warning: The app is not in development anymore and warns that it might cause irretrievable dataloss.

grg
  • 201,078
  • 2
    This application reduces the brightness of the monitor to 0, but it remains on! So probably it consumes more. Is there a way to completely turn off? – Fred K Dec 18 '15 at 10:15
  • If you choose to mirror the external display (not add a separate desktop) this should reduce the workload – Nir Golan Jun 14 '16 at 07:55
  • 4
    @FredK After the display was disabled, it won't allow me to move the mouse to the disabled display anymore (expected result), turns out it does more than reduce the brightness to 0. At least the expected results are archived. – Mengdi Gao Dec 05 '16 at 01:41
  • @MengdiGao Only if you equate "can't move mouse to" with "turn off display". – Andreas Dec 30 '16 at 16:45
13

The equivalent command for Yosemite is:

sudo nvram boot-args=niog=1

I've only tested it on my Late 2008 15-inch MacBook Pro, but it works for me. Your mileage may vary.

Source: I read the IOGraphics source code, specifically IOGraphicsFamilyModuleStart() in IOFramebuffer.cpp.

Technical details: We need to clear bit 0 (kIOGDbgLidOpen) in the module's gIOGDebugFlags variable in order to change how it handles lid open events.

Previous versions of the code would set this variable to whatever value iog specified in the boot arguments, or 0x03 if iog wasn't specified.

The code in Yosemite first sets gIOGDebugFlags to 0x43, then bitwise ORs it with the value specified by iog (if it exists), and finally bitwise ANDs it with the bitwise complement of the value specified by niog (if it exists). In other words, iog can now only set bits in gIOGDebugFlags, but the new niog can clear bits. So we specify niog=1 in the boot arguments to clear bit 0.

rwg
  • 146
  • @RyanHeitner 3 steps work fine! If you need a solution for sleep&wakeup, please visit OSXdaily-Post with Section "Disable the Internal Laptop Display in OS X Yosemite" a hint to correct wake up procedure. Have fun! – andreas-supersmart Mar 24 '15 at 11:53
  • Works on mack book with nvidia graphic cards, potentially need to switch to "better performance" in the Energy Saver settings to switch to your nvidia graphic card (like on my 2009 Mac Book Pro) – Ronan Quillevere Jun 23 '15 at 08:53
  • Thanks for this! Also according to your findings the command pre-yosemite should be "iog=0x2" since otherwise you're setting FBVLThrottle to 0 which caused an issue for me with my monitor. – 1110101001 Feb 26 '21 at 22:09
  • As others noted, this also unfortunately gets lost when the laptop goes to sleep and wakes back up. I spent a little bit of time tracing through the iokit hierarchy, and it seems like this is how it's structured:
    • kIOGDbgLidOpen controls whether we should reprobe on lid open event

    • When the lid is closed, seems like internal (backlit) display is not present in iokit hierarchy at all. "Clamshell" mode is nothing more than this fact along with a iopm setting to prevent sleep when the lid is closed.

    – 1110101001 Jun 07 '22 at 03:53
  • The reprobing is done by AppleGraphicsControl which is not open source. It's not clear to me how exactly this works, but I assume upon receiving the request something goes through the attached outputs and creates an IODisplay for each of them. Conversely, in clamshell mode something must prevent the IODisplay being created for internal.

    Unfortunately I think this means it's basically impossible to disable internal display at the lowest level unless someone wants to disassemble NVDA driver to figure out what happens during a reprobe event and how the IODisplay is being created.

    – 1110101001 Jun 07 '22 at 04:14
  • Seems like the probe gets routed to IONDRVFramebuffer.cpp. I think that's about as far as I can trace just reading the code, seems like from then on it gets to driver-specific things.

    And of course note that we can't just noop the probe because upon a wake from sleep we need to discover the external monitor as well.

    – 1110101001 Jun 07 '22 at 04:36