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.85k stars 112 forks source link

Support DPMS as alternative to DDC/CI #38

Closed tdryer closed 3 years ago

tdryer commented 3 years ago

My display doesn't accept DDC/CI requests from inactive inputs:

$ # Input is active:
$ ddcutil --bus=7 getvcp 60
VCP code 0x60 (Input Source                  ): DVI-1 (sl=0x03)

$ # input is inactive:
$ ddcutil --bus=7 getvcp 60
DDC communication failed for monitor on I2C bus /dev/i2c-7

This means that display-switch can change to a different input, but it can't change back.

I found a reference suggesting that this could be a common limitation.

I wrote a script that instead uses DPMS to control display standby. If a system on one input enables standby, and another disables it, the display switches to the only active input.

display-switch could implement this DPMS approach to support monitors that limit DDC/CI to active inputs.

haimgel commented 3 years ago

Interesting. I think that even if your monitor does not support DDC/CI from inactive inputs, the app could still work for you if you configure just the on_usb_disconnect settings on both computers. on_usb_connect cannot be used because you're trying to control from the inactive input, but "on disconnect" should work, correct?

tdryer commented 3 years ago

You're right, using on_usb_disconnect works.