Hacker News new | ask | show | jobs
by mritun 1649 days ago
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.
7 comments

Wow! Thanks for that comment, I have a Dell U3818DW with a KVM switch and I didn't know you could control it with DDC commands!

So for linux (e.g. fedora):

  dnf install ddcutil
  ddcutil capabilities -d 1 # show the available commands
  ddcutil setvcp 60 0x11    # for example switch to HDMI 1
  # assign a global shortcut key to the `ddcutil setvcp` command you need
And for windows:

  - download the "Dell Display Manager" software from their support site
  - assign a shortcut key in the Dell Display Manager: "Input Manager" tab => "Favourite Input Shortcut Key"
I used the same shortcut (Ctrl-Alt-ScrollLock) for both linux(kde)/windows
I have a shortcut on my Linux desktop to switch my Dell U3818DW display to its HDMI input where a second graphics card passed through to Windows is running on as a KVM guest.

  #!/bin/bash
  ddcutil setvcp 60 0x11
On my Windows guest desktop, I set up a shortcut for Dell Display manager to switch back to my Linux host and primary graphics card on my display's DisplayPort input

  "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" SetActiveInput DP
Trivial to set up and works great.
Thanks. I also discovered winddcutil, for those of us on Windows with Dell monitors too old to be supported by Dell Display Manager.

https://github.com/scottaxcell/winddcutil

Well, 4K is not exactly a requirement. And while most older don't have the ability to swithc USB my U2415 displays (released in 2014) supports switching input over DDC. And honestly, I'd expect any half-decent display sold in the last decade to support it as well. But I could be very wrong. The samsung and AOC display I have connected at work also supports them and the samsung is quite old. For USB though I have to press a button. Or use the excellent virtualhere software for connecting USB over the network (that I could easily script to switch over usb as well).

I have a short script that will allow me to change input on a specific display. Very handy. However please note, that while this does work for HDMI, DVI and Displayport only DVI/HDMI seems to have an active connection when another input has been selected.

That means that while I can switch to another input I can not switch back from the same computer but must install something on the other machine to give it back. This is of course exactly what the linked article is doing, but with HDMI/DVI I don't have to have that requirement. And on top of that, operating systems in general seem to believe that, when using displayport, switching to another input is equivalent to disconnecting the display altogether and thus remove it and rearrange windows etc. Insanely frustrating.

Again, no problem with HDMI/DVI. So although Displayport is a much better interface and I've been a strong advocate for it, these issues makes me hate it with passion.

DDC can also be used to change display brightness, which in my opinion is way too cumbersome to do manually (especially if you have more than one display).

However, they're currently unobtanium. I've been wanting one to solve my working from home problem to allow me switch computers with the same setup.
Lenovo T32p-20 is also pretty good and not only obtainable (I obtained three just a couple days ago), but currently available at a discount.
I'm not sure why people are responding telling me that random monitors are available. Do they have built-in KVMs? If not, they aren't what I'm looking for.
Which is unobtanium? I just ordered a Dell 4K from Amazon about 5 days ago and it got here in 3 days.
The one specifically mentioned...

As well as Dell's 40" ultrawide, that also has the built-in KVM (there are not that many models that have the built-in KVM).

Right. I ordered one on Amazon (but Dell is the seller) and got it a few days later. Amazon shows they (U3219Q) are still in stock.
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
record scratch

Whoah. How do I obtain these ddc commands on macOS?

https://github.com/MonitorControl/MonitorControl for example, though I'm sure there are others.
I use MonitorControl as mentioned but if you want something with a CLI then https://github.com/kfix/ddcctl works
I wish I could search for this feature in online shops parameterized search.