Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

07151129

macrumors newbie
Original poster
Jan 25, 2020
10
2
Apple iogctl tool lets one simulate clamshell events. This makes it possible to disable the built-in display when there's an external display connected without closing the lid.

https://github.com/07151129/iogctl explains how to build and use the tool. Note that you need to set the boot-args from recovery OS if you have SIP enabled.

Note there's also https://github.com/Eun/DisableMonitor, but it attempts to do much more than iogctl, essentially replicating Apple logic for clamshell.
 
Last edited:
  • Like
Reactions: profcutter
Ok, if I know nothing about Xcode and programming, how do I do this? I have a MacBook pro with a cracked screen, I want it to default to the external display. Thanks!
 
Here's a build compatible with 10.14.4 and newer. It has been tested with 10.14.6 but not with any newer OS version:


Earlier OS versions need a different build of iogctl.

I usually do iogctl injectCS.enable; iogctl injectCS.close; iogctl injectCS.disable to fake clamshell close event. You may need to reconnect the external display afterwards. This could be automated with launchd.

Note that you have to update your boot arguments as described in the README (there are guides online that describe how to do that on a Mac).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.