Live data from Hacker News

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

github.com

101–110 of 155 posts

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

#101
post #74

PSA: Many 4K Dell monitors (like my Dell UltraSharp U3219Q ) have a built-in KVM switch and they support full DDC commands for switching the input as well (over HDMI, DP and USBC). I can control them from Mac and Linux with hot keys that trigger the appropriate ddc commands.

Sweet !

  :~$ sudo ddcutil detect
  Invalid display
  I2C bus:             /dev/i2c-1
    EDID synopsis:
    Mfg id:           AUO
    Model:            
    Serial number:    
    Manufacture year: 2009
    EDID version:     1.3
    DDC communication failed
    This appears to be a laptop display. Laptop displays do not support DDC/CI.
  Display 1
  I2C bus:             /dev/i2c-2
    EDID synopsis:
    Mfg id:           DEL
    Model:            DELL U2415
    Serial number:    CFV9N94S0Y2S
    Manufacture year: 2019
    EDID version:     1.3
    VCP version:         2.1

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

#102
I use a similar setup with a hotkey, but the downside is that my monitors take about 5 seconds to switch, which in my case is a serious slow down.

I do not know if other monitors would be faster. I looked at KVM that support high resolution, but they are insanely expensive and I am not even sure they would not introduce any latency.

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

#103
post #80

I bought a fantastic curved Samsung monitor and it supports reading from the port that tells you the current input but not setting it. It also has the worst possible input switcher that cycles until it finds a valid input. I wish it were easier to hack on monitor firmware. I'd love to improve it.

I’ll never buy anything from Samsung again. The software on their otherwise delightful hardware is absolute crap.

Or their dryers...or their dishwashers...I hear their phones are okay...It sucks when a multinational conglomerate has a sketchy quality issue.

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

#104
post #88

My shell-script solution I've been using for the last year or two: #!/bin/bash src="pc" while true; do lsusb -d 04d9:a0d1 >/dev/null # Keyboard connected? ret=$? if [ $ret -eq 0 -a "$src" != "pc" ]; then src="pc" ddcutil --noverify setvcp 60 0x0f # Switch monitor input to DP elif [ $ret -eq 1 -a "$src" = "pc" ]; then src="laptop" ddcutil --noverify setvcp 60 0x11 # Switch monitor input to HDMI fi sleep 1 done

> sleep 1 One second latency ... not ideal. Is there any way to sleepwait on a USB config change instead? [EDIT]: this might help: https://stackoverflow.com/questions/469243/how-can-i-listen-...

You can use `udevadm monitor` or venture into `dbus-monitor` to capture events from udev.

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

#106

This looks fantastic, I was recently disappointed to learn that there don't seem to be any good KVMs under ~$200, that support anything higher than 4k@60Hz. Apparently Thunderbolt/DisplayPort are not really a thing yet for some reason, so I ended up getting a USB (KM) switch instead. With this project, it looks like I'll be able to have my cake and eat it too.

Check https://dancharblog.wordpress.com/2021/07/05/usb-c-gen2-bi-d... end of post links to DP and HDMI 2.1 switches

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

#107
post #88

My shell-script solution I've been using for the last year or two: #!/bin/bash src="pc" while true; do lsusb -d 04d9:a0d1 >/dev/null # Keyboard connected? ret=$? if [ $ret -eq 0 -a "$src" != "pc" ]; then src="pc" ddcutil --noverify setvcp 60 0x0f # Switch monitor input to DP elif [ $ret -eq 1 -a "$src" = "pc" ]; then src="laptop" ddcutil --noverify setvcp 60 0x11 # Switch monitor input to HDMI fi sleep 1 done

> sleep 1 One second latency ... not ideal. Is there any way to sleepwait on a USB config change instead? [EDIT]: this might help: https://stackoverflow.com/questions/469243/how-can-i-listen-...

Add udev rule, to launch script when an input is connected:

   ACTION=="add", DEVPATH=="*/input/*", RUN+="/usr/local/bin/script.sh $devnode"

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

#108

Earlier quoted context omitted.

How's the latency?

I don't notice it when using it for work. I barely notice it when using it for console games. Probably wouldn't want to use it for competitive shooters, but non-issue for most other games. Few more notes: - I use PCIE rather than USB for the capture card - Can be costly if you need 4k + multiple inputs (for multiple "monitors" as different OBS windows) - I had issues getting the capture card to recognize scaled HiDPI…

[deleted]

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

#109

Earlier quoted context omitted.

How's the latency?

I don't notice it when using it for work. I barely notice it when using it for console games. Probably wouldn't want to use it for competitive shooters, but non-issue for most other games. Few more notes: - I use PCIE rather than USB for the capture card - Can be costly if you need 4k + multiple inputs (for multiple "monitors" as different OBS windows) - I had issues getting the capture card to recognize scaled HiDPI…

You can do this without a capture card using https://ndi.tv/tools/ - other clients on your LAN can view in OBS or with the included program. I'm yet to try it with 4k.

No help with consoles of course, and perhaps not an option for a work machine.

edit: feature list also mentions "KVM remote control of any workstation running Scan Converter from NDI Studio Monitor"

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

#110

It's cool but it only works if you have a rust compiler that can actual compile this (1.55.0) and no one does. That means you have to install a compiler from outside of your system repositories 100% of the time. Is suggesting everyone, curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ... really such a great idea? Even ignoring the curl | sh it's going to bork many systems now having two rusts. Rust proj…

Under actions, the project is being CI'd and the artifacts are kept there eg: https://github.com/haimgel/display-switch/actions/runs/15284... But yeah, actual releases would be nice.
Post reply on HN