Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust input switching #30

Open
haimgel opened this issue Sep 24, 2020 · 2 comments
Open

More robust input switching #30

haimgel opened this issue Sep 24, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@haimgel
Copy link
Owner

haimgel commented Sep 24, 2020

To achieve more robust switching, and to not flicker the monitor uselessly, the app should do something like this, when input switch if required:

  • Get the current inputs (with several retries).
  • If already on the desired input, do nothing.
  • If not on the desired input, or if the current state cannot be determined, do the input change.
  • Try to read the current input, and re-try Support different inputs on different monitors #3 if we are still not on the right input (but not retry if the read command failed in general, because some monitors could be set to a new input but could not report the input back).

Unfortunately, the DDC implementation varies between different monitors and is often buggy. The write command also does not have meaningful feedback (we don't know if it succeeded or not), and for some monitors, we do need to retry to reliably switch the inputs.

@haimgel haimgel added the enhancement New feature or request label Sep 24, 2020
@andornaut
Copy link
Contributor

andornaut commented Dec 28, 2020

My setup:

Macbook (closed lid) -
                       \
                         -->  KVM  -->  External display on DisplayPort1
                       /
Linux desktop --------

When switching from Linux to Mac the external display will sometimes not wake-up. I have found that display-switch can help workaround this flakiness by sending a DDC input switch command (even though only one input is connected). My display-switch.ini is as follows:

usb_device = "1532:0e03"
on_usb_connect = "DisplayPort1"

The monitor is connected to the KVM via DisplayPort1, and there are no other display cables attached to the monitor.

This workaround seems to work. (Though there are some issues WRT the timing of the DDC input-switch command, which I hope can be improved via the addition of a retry mechanic to display-switch. Please see #48). I wonder if implementing this issue as stated in the description would make this use case no longer viable?

If already on the desired input, do nothing.

Perhaps the behaviour above could be toggled by a setting, as I believe that sending a "redundant" input-switch command has the pleasant side-effect of fixing the wake-up issue with my Macbook. Incidentally, this issue seems somewhat common with Macbook + KVMs. I'm using a Level1tech's KVM and would like to suggest display-switch as a solution to others experiencing these issues.

@haimgel
Copy link
Owner Author

haimgel commented Dec 29, 2020

Yeah, your issue is not exactly the same, but related. It makes sense to do what you're proposing here (thanks for the PR!), and hopefully I'll expand on that in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants