MagicDisplay
Your external monitor's menu, in the Mac's menu bar.
A native Swift app that controls an external monitor's brightness, contrast, volume and inputs over DDC/CI. Built to share one monitor between a Mac and a PC.
macOS 14+ · Apple Silicon · Free
MagicDisplay- Client
- Personal project
- Year
- 2026
- My role
- Personal project: research, Swift and SwiftUI development, interface and distribution.
- Platforms
- macOS
In action
Worth calling out
DDC/CI on Apple Silicon
A private IOKit API resolved at runtime and a hand-written DDC/CI protocol.
Reliable input switching
Turns the Mac's output off on the way out and confirms the Mac's input on the way back.
Every monitor setting
Controls come from the MCCS capabilities string the monitor reports.
Software fallback
Without DDC on the cable, brightness and contrast become a Mac gamma curve.
The problem
I share one monitor between my Mac and a Windows PC. Every input switch and every brightness change went through the buttons behind the screen and a menu that was never meant to be used several times a day.
There was also an annoying detail: with automatic source switching on, the monitor jumped right back to the Mac as soon as I switched to the PC, because the Mac kept sending a signal.
The solution
MagicDisplay is a menu bar app for Apple Silicon Macs. One click on the icon shows a card per monitor, with brightness, contrast and volume, and a button for each input, named however I like ("Windows PC", for example).
When I switch to another computer, the app turns off the Mac's output to that monitor, so auto source doesn't pull the picture back. To come back, it turns the output on again and keeps sending the Mac's input until the monitor confirms it.
Under "More settings" you get everything the monitor lists in its MCCS capabilities string: color preset, picture mode, RGB gains, sharpness, OSD language, power and factory reset, always with a confirmation. The MacBook's built-in display gets its own brightness control too.
Each monitor has a control mode: automatic, DDC/CI or software. When the cable doesn't carry DDC, brightness and contrast become a gamma curve applied by the Mac itself.
How it works
On Apple Silicon Macs, DDC goes through IOAVService, a private API. I resolve the symbols at runtime with dlopen and dlsym: if a macOS release removes one of them, that feature becomes unavailable instead of crashing the app. The DDC/CI protocol (packets, checksums, reading the capabilities string in 32-byte chunks) is implemented by hand.
Each monitor has its own serial queue. While I drag a slider, writes are coalesced per VCP code and only the last value reaches the monitor, which keeps the I2C bus from choking. When the DisplayPort link retrains, the app reconnects to a fresh service handle on its own.
Coming back to the Mac was the hardest part. After turning the output back on, the app writes the Mac's input and reads code 0x60 until it gets three matching reads in a row, with retries and without rewriting an input that is already active. I also keep per-model profiles for monitors that stray from the MCCS standard.
Turning the output off uses CGSConfigureDisplayEnabled with session scope: restarting the Mac or replugging the cable always brings the display back.
Install
- Download MagicDisplay.dmg and open it.
- Drag MagicDisplay.app onto the Applications shortcut, then open it from your Applications folder.
- The app is not notarized by Apple yet, so macOS blocks the first launch. Go to System Settings → Privacy & Security and click Open Anyway.
Prefer the Terminal? This does the same as step 3:
xattr -dr com.apple.quarantine /Applications/MagicDisplay.app
Good to know
- Needs macOS 14 Sonoma or later on an Apple Silicon Mac (M1 or newer).
- DDC does not pass through every cable. A USB-C to DisplayPort cable is the most reliable. USB-C to HDMI cables and hubs carry a converter chip that often blocks it, and then software mode takes over.
- The interface is in English and Brazilian Portuguese and follows your Mac's language.
- Don't run it alongside another app that changes the display gamma, like DisplayBuddy or Lunar.
My role
My own project: researching DDC on Apple Silicon, the Swift and SwiftUI implementation, the interface, packaging with SwiftPM and the release flow that publishes the download here on the site.
A closer look
Built with
- Swift
- SwiftUI
- AppKit
- IOKit
- DDC/CI