haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.83k stars 110 forks source link

Support for USB-C to HDMI Cables? #47

Closed stonecharioteer closed 3 years ago

stonecharioteer commented 3 years ago

Hello again,

I am running this on a MacBook Pro (15-inch, 2018) (Catalina 10.15.7 (19H2)). I have two identical monitors and I made the following config:

usb_device = "2109:2811"

[monitor1]
monitor_id = "DELL U2415 S/N 860704844"
on_usb_connect = "DisplayPort2"

[monitor2]
monitor_id = "DELL U2415 S/N 808931925"
on_usb_connect = "hdmi1"

Monitor 1 uses an mDP Cable to a full sized Display cable, using a Dell Display Cable to USB-C adapter. While the other monitor uses a direct USB C to HDMI display cable.

While monitor 1 seems to switch perfectly, Monitor 2 fails with the following error:

08:17:21 [ERROR] Failed to get current input for display 'DELL U2415 S/N 808931925': Ddc(InvalidChecksum)

at start. And when trying to change the monitor, it outputs:

08:16:38 [DEBUG] (1) display_switch::display_control: Setting display 'DELL U2415 S/N 808931925' to Hdmi1(0x11)
08:16:38 [INFO] Display 'DELL U2415 S/N 808931925' set to Hdmi1(0x11)

But fails to perform any such change. What could be wrong here?

haimgel commented 3 years ago

There could be either of the two issues:

  1. The "USB C to HDMI display cable" does not pass DDC/CI commands properly.
  2. The monitor itself supports input switching only on mDP interface and not on the HDMI interface (some monitors do that, but Dells are usually not that stupid).

This is not a limitation of all USB-C to HDMI converters per se (I'm using one of these on my MacBook and it works), but some of them are better than the others... Hard for me to say where exactly the problem is, I'd recommend trying with a different USB-C/HDMI adapter, or with a different computer with a native HDMI output, if possible.