Switch between Mac and Linux on one monitor keyboard-only using a KVM-capable monitor (MSI MPG 321URX) plus DDC commands via m1ddc (macOS) and ddcutil (Linux).
Key Takeaways
Built-in KVM on the MSI MPG 321URX routes USB peripherals to whichever input is active, eliminating external KVM hardware.
DDC commands sent over HDMI/DisplayPort/USB-C let you change monitor input from the command line without touching the monitor.
macOS: m1ddc + Hammerspoon binds input switching to a hotkey; Linux/KDE: ddcutil setvcp 0x60 0x10 bound via KDE shortcuts manager.
USB-C Alt Mode reports as a second DisplayPort in ddcutil capabilities, requiring deduction to find the correct input code.
Windows users may skip CLI entirely if the monitor vendor’s software supports shortcut-triggered input switching.
Hacker News Comment Review
Commenters split between this DDC/software approach and dedicated hardware KVMs (Level1Techs ~$500); hardware wins on zero-lag multi-monitor setups but costs significantly more.
A real risk flagged: certain monitors (e.g., Xiaomi ultrawides) can behave unpredictably or become non-recoverable when sent DDC input-switch commands, so testing cautiously matters.
Alternative workarounds discussed: Synergy for keyboard/mouse sharing, xrandr display-off to trigger auto-input switching, and Logitech MX multi-device peripherals plus manual input flip.
Notable Comments
@GeorgeDewar: Warns some monitors can be bricked by DDC commands; calls out Xiaomi Mi 34” ultrawide specifically as a dangerous target.
@eleventen: “avoid HDMI” – HDMI tolerates renegotiation poorly; recommends DisplayPort or USB-C for KVM switching reliability.
@timonoko: Using xrandr --output ... --off causes the monitor to auto-select another input, enabling scriptable switching without DDC at all.