USB Soft KVM is a lightweight Linux service that turns a simple USB switch into a full-featured KVM solution. By combining an inexpensive USB switch with software-based monitor switching via DDC/CI, you get complete keyboard-video-mouse control on a budget. This software solution automatically switches your monitor’s input using DDC/CI commands over the I2C bus whenever you toggle the USB switch. It’s perfect for users with a laptop and desktop sharing one monitor.

https://github.com/mevdschee/usb-soft-kvm
The problem it solves
Hardware KVM switches with integrated monitor switching typically cost much more than basic USB switches, which may cost even as little as EUR 10. Many people already use USB switches to share keyboards and mice between two computers, but they’re forced to manually press the monitor’s input button every time they toggle peripherals. USB Soft KVM bridges this gap, transforming an inexpensive USB switch into a complete KVM solution by adding automated monitor switching.
How it works
The service runs on your desktop PC and monitors USB device connections using lsusb. When it detects your keyboard is connected (meaning the USB switch is pointing to the desktop), it sends a DDC/CI command to switch the monitor to DisplayPort. When the keyboard disappears (USB switch toggled to the laptop), it switches the monitor to HDMI. The monitor responds to these commands via the I2C bus that’s already built into your video cable. No extra wiring needed beyond what you already have.
Hardware requirements
You need a monitor with DDC/CI support, which includes most modern displays. The key component is a USB switch to toggle peripherals between computers. Your desktop PC must have I2C bus access, which is standard on Linux systems. The laptop doesn’t need any special configuration since the monitoring service only runs on the desktop.
Choosing a USB switch
You can choose between two approaches:

- Option 1: USB switch with built-in hub
- Option 2: Bidirectional USB switch (if you already have a hub)
Choose based on your setup: if you already have a hub, a simple bidirectional switch works great. Otherwise, get a switch with built-in hub. Consider how many USB ports you need and whether you require USB 3.0 speeds or if USB 2.0 is sufficient.
Installation and configuration
Setup requires identifying three things: your I2C device path, your monitor’s input source values, and your keyboard’s USB device name. Running sudo ddccontrol -p reveals the I2C device and available input sources with their numeric values. Comparing lsusb output before and after plugging in your keyboard shows its exact device name. You edit these values into the monitoring script, install the systemd service, and enable it. The entire process takes 10 to 15 minutes if you follow the included documentation carefully.
Reliability in practice
The systemd service runs continuously in the background checking USB device status every two seconds by default. This polling interval is configurable if you want faster or slower response times. DDC/CI commands are inherently reliable since they’re part of the VESA standard, though some cheaper monitors may take a second or two to respond. In daily use the switching is seamless enough that you stop thinking about it. The service logs to systemd journal, making troubleshooting straightforward if something goes wrong.
Limitations and future work
The most important limitation is that this solution only works with two devices. The current implementation detects the presence or absence of a keyboard to toggle between two predetermined monitor inputs. Supporting three or more devices would require a different approach, where each device would need their own script to change the input source of the monitor. This solution I’ve built currently only works on a Linux desktop because it relies on direct I2C device access and systemd service management. Also, the desktop PC must remain powered on for switching to work, since that’s where the monitoring service runs. While the solution is Linux only, the connected laptop may also run Windows or MacOS. Porting the desktop support from Linux to Windows or Mac would be nice follow-up work, also adding a GUI for all 3 major platforms would be a nice addition.
Conclusion
USB Soft KVM delivers full KVM functionality for under EUR 25 by combining a cheap USB switch with software-based monitor switching. This represents significant savings over traditional hardware KVM switches, making it an attractive option for budget-conscious users. If you run Linux on the desktop and have a DDC/CI-capable monitor, the software is free and installation takes 10 to 15 minutes. It is a joy to use!