Live data from Hacker News

Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

github.com

11–20 of 155 posts

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#11

I've read the project's description and failed to figure what it does. What's a 'USB switch'? Where should this device be connected to? "press one button on your USB switch and all your monitors connect to a different input." - if the USB switch has buttons - why would I even disconnect/reconnect it? The project's description is shit.

> The project's description is shit.

I dunno man, this worked pretty ok for me:

> This utility watches for USB device connect/disconnect events and switches monitor inputs via DDC/CI.

And then a couple lines latter, a sample config that makes it pretty obvious how simple this goes:

> usb_device = "1050:0407" \ on_usb_connect = "Hdmi1" \ on_usb_disconnect = "Hdmi2"

Plug in a device & switches to hdmi1. Unplug & it switches to hdmi2. A USB switch is optional, one could just move where they plug their mouse into by hand, for example. But you don't seem to be interested in helping fill yourself in on anything here, on learning, on using search engines to find anything out. Honestly filling in the neophyte knowledge like that is not what project descriptions are for, in my book.

Generally, dude: relax, chill out. Most everything on this planet could use better description. But this seemed pretty clear & simple to me, at least. I think it'll work for a lot a lot of people as is. No need to be aggressively rude. Have you ever dealt with any kind of soft-kvm like technology before? Perhaps people would more self-select into this kind of project, versus rando's walking in on the street. I think that's ok.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#12

I've read the project's description and failed to figure what it does. What's a 'USB switch'? Where should this device be connected to? "press one button on your USB switch and all your monitors connect to a different input." - if the USB switch has buttons - why would I even disconnect/reconnect it? The project's description is shit.

I didn't get it at first either. You need a DDC/CI enabled monitor, which means it can switch input via software. Plug one input on each computer.

The USB switch button will send a connect/disconnect event to both computers and they will then react accordingly.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#13

I've read the project's description and failed to figure what it does. What's a 'USB switch'? Where should this device be connected to? "press one button on your USB switch and all your monitors connect to a different input." - if the USB switch has buttons - why would I even disconnect/reconnect it? The project's description is shit.

I presume USB switch refers to a USB hub with two "output" USB cables, one of which is active at a time. One can toggle the active by pressing a physical button on the switch. Use case: keyboard and mouse are plugged into the switch and you can quickly toggle them between two laptops without messing with the cables.

Yes, this is exactly what it is. Basically a KVM switch without the V. I've been using the display-switch software for months and it's fantastic. Using the inputs on the monitors to do the video switching instead of an external KVM switch means that you don't have to worry about finding a KVM switch that can handle the signal bandwidth required (in my case, three 4K60 HDR DisplayPort monitors, which is not a use case for which most KVM switches are designed).

This is the USB switch I use with it: https://www.iogear.com/product/GUS402/

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#14
Speaking from experience, download a program that can show what DDC commands your monitor supports before you bother. Mine supports many except… switching inputs (0x60 if I recall).

Documentation for most consumer monitors is pretty lacking in this regard, it seems to be a feature mostly on monitors targeted to the professional market.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#15
from a purely software perspective and sort of the inverse of this, everyone should be aware of barrier, the fork/continuation of synergy

https://github.com/debauchee/barrier

the general concept is you could have 2, 3, 4 or more individual desktop PCs at one desk, each connected to their own displays, and one keyboard and one mouse. The keyboard and mouse are on the primary workstation, you can roll the mouse off the edge of one screen and onto another.

The secondary and tertiary workstation PCs have no keyboard/mouse i/o plugged into them, just power, ethernet and display.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#16

I've read the project's description and failed to figure what it does. What's a 'USB switch'? Where should this device be connected to? "press one button on your USB switch and all your monitors connect to a different input." - if the USB switch has buttons - why would I even disconnect/reconnect it? The project's description is shit.

I didn't get it at first either. You need a DDC/CI enabled monitor, which means it can switch input via software. Plug one input on each computer. The USB switch button will send a connect/disconnect event to both computers and they will then react accordingly.

The button doesn't actually send an event

I wrote a similar program, you just listen for something connected to the hub disappearing

  if mouse no longer connected:

    tell monitor to switch output via DDC

  else if mouse now connected:

    tell monitor to switch back via DDC

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#17

Interesting. My current set up is a usb switch and an hdmi switch, so two buttons to push.

I have a similar setup, but unfortunately I'm stuck with it because my Acer monitor doesn't support the necessary DDC commands

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#18

I've read the project's description and failed to figure what it does. What's a 'USB switch'? Where should this device be connected to? "press one button on your USB switch and all your monitors connect to a different input." - if the USB switch has buttons - why would I even disconnect/reconnect it? The project's description is shit.

So here is how it works: The program runs on each computer. You plug your USB devices (presumably, a keyboard and a mouse) into a USB switch and then plug that into each computer. Then you plug each computer into each monitor (so you're limited by the minimum total number of inputs on the monitor(s) for how many computers you can switch).

When you press the button on the USB switch to go to another PC, the software detects this and sends data commands over the monitor connection (using DDC standard) to trigger the monitors to switch inputs. You can use this same data communications standard to do things like adjust the brightness of your display. For example, I have these setup on my Mac to adjust the brightness of my two attached displays (complexity increased with multiple displays and desire for each to change at same time, simpler commands with a single display):

alias day="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 80' sh" alias evening="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 32' sh" alias night="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 10' sh"

Does that make sense? As mentioned earlier, you're limited by the minimum number of inputs on the monitor(s) and/or the minimum number of computers the USB switch can be connected to. The simplicity of this system is that the display connections do not go through any switching layer and are instead directly connected to the computers (which avoids a number of compatibility issues).

I should be clear that I haven't used this yet but I'm going to try it. The Acer monitors I'm using have two HDMI ports and 1 DisplayPort so I can in practice attach 3 computers assuming I buy a USB switch which can connect to 3 or more computers.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#19
post #14

Speaking from experience, download a program that can show what DDC commands your monitor supports before you bother. Mine supports many except… switching inputs (0x60 if I recall). Documentation for most consumer monitors is pretty lacking in this regard, it seems to be a feature mostly on monitors targeted to the professional market.

I was pretty shocked that most of the ddcutil & other similar programs on Linux weren't working for two of my monitors. The utils couldn't even detect the DDC display. But I told it what i2c bus to send to & what commands to issue, and it turns out my monitors had a pretty wide range of commands.

Reminds me of an i2c motor controller I bought years ago, based off some avr microcontroller. I spent an afternoon trying to understand how I'd hooked things up wrong, trying to understand why I couldn't read the control values. Turns the soft i2c interface just didn't implement reading values off the controller at all, but served ok if I treated it as a write-only device. Frustrating tricky devices. Sometimes they lie.

But yeah, also a >15% chance your monitor doesn't support switching inputs via DDC/CI. Would be so nice if review sites would cover this sort of thing. As it is, it's just a tech-secret, something invisible to the market, no push to include it, no points deducted for getting it wrong/bad. It leaves a lot of room for the situation to sit & not improve. Better reviewing would help move things along.

Re: Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM

#20
> the app only switches monitors "one way" and relies on itself running on the other computers to switch it "the other way" as needed.

Too bad, I often need a KVM switch exactly when I'm installing a new OS on an embedded system (and from that point on I don't need the switch because I can just use the network to log in and install software).

So this solution doesn't work for me at precisely the moment I need it.

Post reply on HN