Skip to content

About

GNOME extension for switching external monitor input sources via ddcutil

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitor Input Switch

Gnome Extensions Downloads

Screenshot

A GNOME Shell extension that switches an external monitor's input source via ddcutil. Lives in the Quick Settings panel.

Features:

  • Switch to HDMI (0x11), DisplayPort (0x0f), USB-C (0x1b) via DDC/CI VCP code 0x60
  • Choose one target monitor if multiple detected (I²C bus number shown to tell identical models apart)
  • Customize which inputs to show, and add HDMI 2 (0x12), DisplayPort 2 (0x10) or a custom named input
  • Expand each input in preferences to customize its DDC input ID for monitors with non-standard values
  • LG alternate switching for LG monitors that ignore the standard command (sends VCP code 0xF4 from I²C source address 0x50, offered when an LG monitor is selected)

Requirements

  • GNOME Shell 48, 49, 50, or 51
  • ddcutil installed (which ddcutil to check) and ddcutil detect should list your monitor
  • ddcutil 2.0 or newer for LG alternate switching

Install

From Gnome Extensions (Recommended)

Get it on GNOME Extensions

From Latest GitHub Release

  1. Download the latest release from Releases.

  2. Install the extension:

    gnome-extensions install -f ~/Downloads/monitor-input-switch@nemofq.github.io.zip
  3. Restart the session by logging out.

  4. Enable the extension in Extension Manager or by running:

    gnome-extensions enable monitor-input-switch@nemofq.github.io

Troubleshooting

Screen hang during detection

Cause: ddcutil detect performs kernel-level I2C operations that can freeze the desktop on some hardware.

Mitigations:

  • Sysfs pre-check before ddcutil detect: We read /sys/class/drm/*/status to check if any external display is connected. If none, we skip ddcutil detect entirely.
  • --disable-dynamic-sleep on ddcutil detect: Prevents ddcutil from progressively extending sleep intervals on unresponsive buses.

GNOME startup / hotplug race conditions

Cause: During GNOME Shell startup and after display hotplug events, the compositor is still negotiating with monitors. Sending ddcutil commands during this window can race with the DRM subsystem and leave the desktop in a broken state.

Mitigations:

  • 30-second buffer before scanning: Both the first scan (after startup-complete) and scans triggered by monitors-changed wait 30 seconds to let hardware fully settle and avoid firing during hotplug event bursts.

Contributing

Feel free to submit an issue or pull request.

Acknowledgments

Thanks to these projects for the ideas and groundwork that made this extension possible.

License

MIT

About

GNOME extension for switching external monitor input sources via ddcutil

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages