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
Crappy KVM solutions are easy. Good ones are hard.
[1] https://www.store.level1techs.com/products/hardware (no affiliation)
- Mac goes to sleep
- Gnome will default back the default monitor configuration and move the windows around
They do have a 1.2 DP KVM with EDID emulation, but you loose all the benefits of the 1.4 DP.
Its all on their FAQ forums
https://forum.level1techs.com/t/official-l1techs-kvm-faq-ult...
EDID emulation done right is expensive.
2 years later switched from m1 to m2 and it no longer works well enough (may also be the Sonoma upgrade stil gotta verify that). The devices get disconnected and glitch etc.
Went to check with dell and monitor is "not supported" on macos.
I am at a loss for words.
One question I couldn't see an answer to is whether or not the I can make the network port "sticky" to my Dell notebook (plugged in over USB-C), or will it "move" to my Desktop PC when I switch to it?
I read last year how recent standard made higher wattage delivery over USB-C now standard (I think it was the latest Thunderbolt one), so I'm waiting until these monitors can do that.
I did have a considerably more expensive TESmart [1] but couldn't use it because it had some weird incompatibility between it, thunderbolt docking station [2] I used with it (which also work flawlessly), and the MBPs connected to it. I could never figure out why, even raising the issue to support with no luck.
My two cents.
[0] https://www.amazon.com/gp/product/B088WGKFZH
In this case what's crappy is those desktops rearranging windows when you turn off a monitor. I'd rather have my PC not know whether a monitor is connected or not, like used to be with vga.
A lot of software didn't really care and just sent signals into the void, but it's possible to do that with DVI or DP, too.
https://www.amazon.com/dp/B083JKDNRJ
I was hopeful and tried using this Monoprice KVM switch (linked below), but it just wasn't worth it in my experience. Despite supporting Display Port 1.4, I could not use my monitor to its full ability with my PC (3440x1400 @165Hz w/ 10 bit color). Dropping the connection when switching inputs was also incredibly annoying; every time I switched away from my Macbook it would go to sleep.
https://www.amazon.com/dp/B093N1DR8Y
I'm happy to switch inputs on both the USB switch and my monitor separately because it's not actually too large of a hassle, and the monitor doesn't "disconnect" when switching video inputs on my monitor so my Macbook doesn't immediately go to sleep.
If anyone is in the market for a KVM switch, consider a USB hub first. You might find yourself satisfied. They're much less of a hassle and cost very little in comparison to a full featured KVM switch.
2 2.5k/1440p monitors both 144hz and it switches every time. Highly recommend. Albeit a bit pricey.
It's basically a hardware remote-desktop at that point though, so the "KVM" part only applies to the KVM device being connected to another physical device on location.
EDIT: To clarify further, the advantage of this is PiKVM is undetectable by work laptops. Nothing is installed on the work laptop, it's strictly HDMI + USB cables going to the KVM. I know this because I use one for my FAANG job.
- 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.
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.
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...
With your solution, one needs to install the AHK script on all computers though?
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.
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.
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/
In addition to the other links posted, ddcutil.org has some more good info: https://www.ddcutil.com/#introduction
These would go pretty well with this software, maybe I'll give it a try.
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
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.
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.
The monitor that is suitable for gaming and has high DPI high refresh and built-in KVM switch is Gigabyte M28U, clicking one button switches input source and USB peripherials, works quite nicely, there's also M32U but with less DPI.
It's not perfect especially since the input switching for the display is quite slow but there's leg in hardware kvms too.
https://xpufx.com/posts/hundred-percent-software-kvm-switch/
At least one of the computers must be on and running Windows, but maybe only one?
If it detects the USB device being inserted, it changes monitor inputs to the Windows computer. If it detects the USB device being removed, it changes monitor inputs to the Linux computer.
TIL KVMs existed before the mouse, which explains the odd order.
I have not tried because I am concern with affecting the hardware. Based on your inspiration I just found Thunderbolt KVMs such as [1] and [2].
[1] https://sabrent.com/products/sb-tb4k
[2] https://www.reddit.com/r/Thunderbolt/comments/11gos6n/kvm_sw...
It would probably work if you were okay with the delays.
I wrote sth similar for myself, without requirement of USB switch or other hardware. it sends DDC command to HDMI/USB-C monitor and HID++ byte code to Logi MX keyboard and mouse.
Code is too messy to share but here's snippet if anyone want to write their own:
hid_devices = [
{
'name': 'Logi Bolt Receiver',
'receivers': hid.enumerate(0x046D, 0xC548),
'command': [ # MX Keys Mini as first device on the receiver
bytes([0x11, 0x01, 0x09, 0x1A, 0x00] + [0] * 15), # change host to 1
bytes([0x11, 0x01, 0x09, 0x1F, 0x01] + [0] * 15), # change host to 2
bytes([0x11, 0x01, 0x09, 0x1D, 0x02] + [0] * 15)] # change host to 3
}, {
'name': 'Logitech Unified Receiver',
'receivers': hid.enumerate(0x046D, 0xC52B),
'command': [ # MX Anywhere 3 as first device on the receiver
bytes([0x11, 0x01, 0x0A, 0x1A, 0x00] + [0] * 15), # change host to 1
bytes([0x11, 0x01, 0x0A, 0x1E, 0x01] + [0] * 15), # change host to 2
bytes([0x11, 0x01, 0x0A, 0x19, 0x02] + [0] * 15)] # change host to 3
}, {
'name': 'MX Keys Mini Bluetooth',
'receivers': hid.enumerate(0x046D, 0xB36E),
'command': [
bytes([0x11, 0xFF, 0x09, 0x1E, 0x00] + [0] * 15), # change host to 1
bytes([0x11, 0x01, 0x09, 0x1F, 0x01] + [0] * 15), # change host to 2
bytes([0x11, 0xFF, 0x09, 0x1D, 0x02] + [0] * 15)] # change host to 3
}, {
'name': 'MX Anywhere 3 Bluetooth',
'receivers': hid.enumerate(0x046D, 0xB025),
'command': [
bytes([0x11, 0xFF, 0x0A, 0x1A, 0x00] + [0] * 15), # change host to 1
bytes([0x11, 0x01, 0x0A, 0x1E, 0x01] + [0] * 15), # change host to 2
bytes([0x11, 0xFF, 0x0A, 0x19, 0x02] + [0] * 15)] # change host to 3
}
]My current setup includes two Dell monitors (U2415 with 2x HDMI "MHL" inputs and built in USB-3 hubs.) I'm using these with a Linux X86_64 desktop. I also use Logi vertical mouse and ATK (A.JAZZ) keyboard, both on Bluetooth and both also have dongles.
I would dearly love to use the keyboard/monitor/mouse on a Raspberry Pi 5 (BT and two micro-HDMI ports) with a pure S/W based solution rather than spending $$$ for a H/W KVM switch.
Thanks!
Edit: WRT messy code - no judgement, no shaming here. BTDT.
import hid
VID = 0x046D
HID = 0xB023 # 0xB35B
if __name__ == "__main__":
h = hid.device()
h.open(VID, HID)
h.set_nonblocking(1)
# this works for keyboard
# h.write([0x11, 0x01, 0x09, 0x1F, 0x01] + [0] * 15)
# this works for mouse
h.write([0x11, 0x01, 0x0A, 0x1E, 0x01] + [0] * 15)
h.close()1. lock screen
2. Switch USB switch to the other source
3. Press space to activate the other PC
4. Monitor should automatically sitch to the "new" active source.
So I use mechanical USB switches.
for keyboard and mouse, I use two of these:
https://www.amazon.com/dp/B01I0Y3GEE/
They have no extra keyboard/mouse latency, and no weird side effects like boot keys that don't work or modifier keys that are in the wrong state.
Issues I've had before with mouse/keyboard:
- hotkey conflicts
- mac boot keys break (hold down <key> for <some boot function>)
- modifiers stick in wrong state
- weird delays
- combinations with mouse+keyboard break
Pro: you shouldn't have the issues you listed. Con: you'll lose the hot key commands for the KVM.
The other thing is, many KVMs will add a hub between your keyboard/mouse and the system you're connected to. This is convenient because you have just one cable to each system. But sometimes this is a source of incompatibility. I think the hub requires the system to be able to enumerate devices one-level removed, and the enumeration might be the source of delay. It also might be beyond bios-level firmware, which is less capable than many OS usb stacks. I believe this might have been the problem with mac boot keys.
I know a mechanical usb switch is not very elegant, but I find the reliability it adds is worth it to me.
The benefit of SimpleKVM is that I just have to run it on my home PC, and I can switch between work and home.
I use it between a Windows PC & a Macbookpro (Linux version available but I don't have Linux)
Unfortunately I can't install it on my work computer due to policy & VPN.
The benefit of SimpleKVM is that I just have to run it on my home PC, and I can switch between work and home.
It doesn't use DDC commands direct to the monitor(s), instead swapping it for a HDMI matrix combined with a traditional KVM for swapping around inputs smoothly when you roll your mouse over the edge of different operating systems.
The switching client runs on Windows, MacOS and Linux (if you use X).
Well not for me because my boxes run multiple operating systems, but for someone with just multiple windows computers it would be great.
When it detects a USB device being plugged in, it changes the monitor input to this computer. When a USB device is removed, it changes the monitor input to the other computer.
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1a40", ENV{ID_MODEL_ID}=="0101", RUN+="/usr/bin/ddcutil --sn ABCDEFGHI setvcp 60 0x0f"HDMI on the other hand typically allows the ddc-commands even on ports that are not the active input.
Not sure if the above must be the case but it has been the case for all displays I've used.
I would love to see a future piece of software, one that could use any number of USB KVM's like this software does -- but could also serve as the main GUI for any number of local VM's and/or remote VM's -- connected over USB or Ethernet or software-controllable "smart" hardware KVM switch or some other intermediary layer.
In other words, abstract:
a) VM GUI;
b) Connection medium to that VM (USB, Ethernet, Smart Hardware KVM Switch, Firewire, ?, ???)
c) How/where the a given VM GUI is displayed on the local monitoring computer, i.e., be able to shrink screen, display on a multi-row, multi-column display (like a Zoom meeting!), group various related VM GUI's, have a local directory and search for VM (for example, if I've got a software development environment of various x86 Windows VM's and various ARM Android VM's -- then I might want to group by CPU or Operating System or software stack version, etc., etc.)
Now, probably all of this software infrastructure exists in one form or another.
For example, in QEMU, local or remote VM's can be created and then they can be connected to via TCP/IP...
But, to centrally manage all of those QEMU VM's and non-QEMU ones as well, as well as regular PC's running any OS on "bare metal" over any connection medium (a heterogenous network of computing machines) -- that would be the goal of this software!
VNC, or something like it, could be used on the client-side of bare-metal PC's, but wouldn't be necessary for VM's...
Anyway, KVM over USB (the original article), is a great idea!
It works great for my needs. Perfectly for switching between Macs or PCs with Intel iGPUs. It almost works perfectly with my gaming PC (which sometimes does double duty as a Windows/Linux workstation) but its Nvidia GPU can get cranky when used with Thunderbolt GPU passthrough for some reason under both operating systems. I think the issue is actually in drivers, but good luck getting Nvidia to care about this use case. I’m considering putting an old AMD GPU in the second slot on the PC and using that for passthrough duty.
I got this https://www.aliexpress.com/item/1005002941646654.html a year ago. It has some minor compatibility problems with my Macbook Pro (or Apples' multiport adapter) which require me to remove and reinsert the USB-C cable from the Macbook once in a while, but it otherwise works very well.
A year later, there are multiple such devices starting from $30, or even less.
It's nice for a wfh setup where I have a personal desktop and a work laptop, and I can quickly switch between them just by changing the display output.
Also allows copy-paste across OSes.