Skip to content

DisplayToggle 1.8

Choose a tag to compare

@zy0816 zy0816 released this 28 Aug 14:04
· 1 commit to main since this release

Fixes: built-in display could not be turned back on

On some machines, once the built-in display was switched off it could not be turned on again at all — right-clicking reported an error and the screen stayed dark. Submitting the configuration is evidently not enough there; the system simply doesn't act on it.

Turning it on now escalates through three routes until the display actually lights up:

  1. CGRestorePermanentDisplayConfiguration — switching off is session-scoped, so the permanent configuration still has the display enabled. Cheap, and no flicker.
  2. Sleep and wake the displays, forcing the topology to be rebuilt — the same mechanism that recovers from an unplug
  3. Submit once more afterwards, since the IDs are usually accepted again once the topology has been rebuilt

Turning the display off is unchanged — if that fails there's nothing else worth trying.

Because this can now take a dozen seconds, the toggle runs off the main thread so the menu no longer freezes. If every route fails, the message says what was tried and points at the lid.

New: turn the built-in display off automatically on connect

A new menu option, off by default. When an external display is connected, the built-in one switches off on its own.

It only fires on the transition where a display is newly present — a standing check would switch the display off again right after you turned it on by hand.


Ad-hoc signed and not notarized: right-click → Open on first launch, or xattr -dr com.apple.quarantine /Applications/DisplayToggle.app. Requires macOS 13+.