Lurker News
Simple KVM lets you control multiple PCs from one mouse, keyboard and monitor(s).

It is similar to Haimgel's display-switch (https://news.ycombinator.com/item?id=29608967), but it provides a GUI which hopefully makes it a bit easier to set up. It also supports hotkeys which effectively lets you alt+tab between computers.
I was surprised by the star-to-download ratio (55:400) on GitHub, so I thought I'd post it here as it might be useful to someone.
Feedback welcome!
Thanks, Fidel

Comments (181) 47 threads

poisonborz5 replies#
Haha, just writing a "me too here", I just came to the same conclusion, but I think my setup is better and cheaper, if a tiny bit more complex. For example, the above would need to install to all computers which is a no go for me. Also this is dependent on the USB switching, cannot be triggered fully remotely.

- DDC commands for monitor input switching
- USB KVM that has only one button to switch - mine was 25$, there are plenty of models out there
- Stream deck or prebuilt macropads are super expensive (80$+) for what they are - a few buttons. Get a cheap AliExpress macropad, they go for 5-10-15$ and have all kinds of layouts. They are also much smaller, you can get just one, or 2-3-4 buttons. Don't use the crappy software they ship with, there are github projects to program them. https://github.com/rOzzy1987/MacroPad
- FingerBot 16$ (if you already have HomeAssistant, Zigbee+BT it's faster) or Switchbot 28$ (bluetooth, has a bit more delay) to press the USB KVM button.
- Then an AHK switch to watch for keyboard shortcuts, and trigger both the DDC commands and the USB switch button.
It has a few seconds delay, but it's controlled from one source only, and can be also fully triggered remotely.

fiddyschmitt#
Nice one!
sesm1 reply#
I'm sure your setup has extra advantages over regular KVM switch and was an enjoyable hacking project for you. But from a price perspective, it's possible to buy a 4-way 4K HDMI KVM switch with a control pad on AliExpress for 29.25$. I don't know how much shipping to US will cost though, shipping to Europe was 15$.
poisonborz1 reply#
I researched a lot for KVMs before. The problem is the video output is hard to get right. What about 120hz+, multi-monitor, how stable the thing is long term. I also thought this is a long solved problem but it isn't. Looking at Ali there isn't a model with too many reviews that can do the above.

At the end of the day this is what I would recommend, it is pricey but everyone swears to it: https://www.store.level1techs.com/products/p/14-kvm-switch-d...

CTDOCodebases#
It gets expensive too when you have > 2 monitors.
layer81 reply#
> the above would need to install to all computers which is a no go for me.

With your solution, one needs to install the AHK script on all computers though?

poisonborz#
No. The macropad would be connected to one PC which would be the controller, so you press that regardless which output is selected, maybe this wasn't clear. But this is only needed to trigger - theorietically it could be triggered by a third device (eg RasPi connected to the display(s) via HDMI).

Maybe to add, this is also better than a KVM because it supports any number of display outputs which you can connect between the two devices. It's more practical to use a USB-C dock though.

legojoey17#
Seems like we all have! I ran into quite a few hiccups when I tried to automate this with a Windows and MacOS machine with just a USB switch (bad DDC values, detecting device events, etc). https://nokappa.notion.site/Making-a-software-KVM-using-only...

I ended up mostly giving up because it was a bit janky and I always had something else in more disarray.
Sweet idea on the macropad! I haven't used them before and placement of the USB switch is always a pain.

alanbernstein1 reply#
I want something like this, but my monitor doesn't support enough DDC commands for it. Any monitor suggestions?
poisonborz1 reply#
You only need input source set. I think most mainstream brands support it - you don't need DDC directly, the easiest way is using the included driver which usually provides a utility console commands. Most common suggestion is something from Dell (with its Dell Display Manager).
alanbernstein#
Unfortunately I would need this to work on Windows, Mac, and Linux, and my home monitor (Samsung) only has a Windows driver. I can use a very simple m1ddc command on my Mac to select the input on my office monitor (Dell), but not my home monitor.
MichaelMug2 replies#
After researching KVMs I also came to the same conclusion that ddc is the solution.

My use case is a bit different. I have two Windows machines and a dual monitor setup. I use NirSoft ControlMyMonitor which has a CLI and a Elgato Stream Deck.
In a normal KVM approach both monitors are showing only one computer. My use case is a bit odd- I want one computer on monitor A and the other on monitor B. I may also want to flip that. I use a portrait and landscape setup. Then I want to be able to switch mouse/keyboard independently of monitor configuration.
Each computer runs the Stream Deck software and the Stream Deck is connected to the USB switch.

fiddyschmitt1 reply#
Cool setup. Is it all working nicely with the Stream Deck & associated bindings?
MichaelMug#
Yes it works well.

The only issue I found was random disconnects when using a backlit LED keyboard and the stream deck on the same non-powered USB switch. I switched to a powered USB switch and that issue is gone.
The switch I'm using is IOgear 2x4 with a USB 5v 2a power brick. https://www.iogear.com/product/GUS402/

webdevver3 replies#
what does ddc stand for?
argsnd#
Display data channel
Aardwolf3 replies#
Does there exist any hardware knob that you can put between display and displayport cable to adjust brightness? I hate the fiddly menus in monitors and in linux no ddc utils work for me (some "leds" that should include monitor brightness only has keyboard leds)

Continue this thread — 3 replies

kthxb5 replies#
I found even these simple USB Switchers to be quite expensive, and sometimes they require drivers that don't work on Linux. I quickly sketched a simple circuit board with USB hubs and a switch and ordered them assembled (!) from one of those DIY-fabs (JLCPCB or PCBWay). They cost 25€ for 5 pcs, each with one 2-to-1 switch. I don't have any experience in circuit design and didn't have to solder anything, and they work perfectly.

These would go pretty well with this software, maybe I'll give it a try.

azalemeth1 reply#
That sounds awesome -- Please post the designs somewhere accessible! My experience of kvms is that they're either cheap and don't work in weird ways or expensive and do work, but with quirks. I think no small part of it is earthing and the avoidance of ground loops at different potentials.
SOLAR_FIELDS1 reply#
After doing a bunch of research I eventually bought a monitor with a KVM built in and I’ve had almost no issues with it. It does imply if you go this route that you are stuck with a single monitor setup, but if that is how you work anyway it’s totally fine and great.

Otherwise some KVM that is decent is as you imply not going to be cheap. The one that I have seen recommended on here before is https://www.store.level1techs.com/products/p/14-kvm-switch-d...
The manufacturer themselves even outright says it’s not perfect, but from what I can tell it’s probably the best one on the market right now

MayeulC#
> It does imply if you go this route that you are stuck with a single monitor setup

Not if you use DP-MST (DisplayPort Multi-Stream Transport, to "daisy-chain" monitors).

fiddyschmitt#
That is so cool!!

Yes I noticed prices had increased a bit over the last couple of years. Perhaps there's a market for yours.
Interesting to hear that some USB switchers don't quite work in Linux. I had assumed they were just very basic USB hubs so no special drivers required. I know some USB switches have fancier things like inter-PC file transfer or mouse sharing like this one (https://www.aliexpress.com/item/1005006202631772.html), and that often requires special software and drivers.

thefz#
They don't require software as everything happens physically. And they go for around 20€ on Amazon, I'd say less expensive than having a custom one made.
HumblyTossed#
TA linked to a few that are quite reasonable in price. I’ve owned a couple while searching for a similar set up and not a single one that I researched or bought required drivers.
jonathanlydall#
I bought this one [1] for USD 13 in 2019 and still use it with display-switch (which the OP mentions) to this day.

It's as "dumb" as is possible, according to one of the reviews the ports can be a little iffy if you've plugged things into it too many times, but it's still working perfectly for me for my 2x Dell P2419H monitors.
I chose this one due to all the wires being on the back, but I'd also be happy with the one with the remote in the OP's GitHub page.
[1]: https://www.amazon.com/gp/product/B01HV1N674

nemetroid#
I use udev for this purpose (send a DDC command when the USB switch appears):

  ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1a40", ENV{ID_MODEL_ID}=="0101", RUN+="/usr/bin/ddcutil --sn ABCDEFGHI setvcp 60 0x0f"

Load more comments