The best way to use monitor(s) with multiple computers

Andrzej Wojciechowski

For quite some time now my desk setup consists of two monitors and several computers connected to them. The number varies between 2 up to 4, which is a maximum number of inputs my monitors support. Sometimes I use one of the monitors with one computer, and the second with a different computer. Other times I use both monitors with the same computer and switch both of them to use with another PC. I’ve tried multiple different ways to conveniently control which computer’s screen is displayed and I think I’ve found the best solution.

The monitors + computers setup & issues

I use two 27 inch Dell monitors, each of which has the same video input ports:

  • HDMI 1
  • HDMI 2
  • DisplayPort
  • Mini DisplayPort

The computers I use with the monitors are:

  • a desktop PC (running Windows) with two HDMI ports
  • a desktop PC (running Linux) with one HDMI and one DisplayPort ports
  • a MacBook connected to Thunderbolt dock with DisplayPort port and HDMI port
  • a Windows laptop with USB-C and Mini DisplayPort ports

And I prefer all of these computers connected to both of the displays. As you can imagine, there are a number of different ways to connect all of these devices. That’s not a problem. The issue is to remember which input on which monitor corresponds to which computer. Another issue is that my monitors use touch (capacitive) buttons, which require attention to select the correct menu and input. In total, it takes a noticeable amount of time and (what’s a lot worse) quite a bit of attention to switch the monitors to display the screen from the correct computer.

DDC – Display Data Channel

Most of modern monitors and computers support a standard used for communication between the display and host computer. The standard is called Display Data Channel (or DDC) and was introduced by VESA (the same organization responsible for standard display mounts and DisplayPort interface). It enables us to control the monitor settings from a computer. The actual functionality depends on a display, but in a lot of cases you can access all or most of the settings you’d access via display menu – like brightness, contrast, or current input.

There are several software tools utilizing DDC standard. One of them is official Dell Display Manager which also works via command line (ad ddm.exe). For Linux there is a great tool called ddcutil, which in my case works perfectly. ddcutil is even able to scan the connected displays and prints available options. Regardless of the actual software, DDC seems as a great starting point.

In order to switch the monitor input via DDC we need to simply set a right display’s register value to a corresponding value. In case of my Dell U2715H it’s simply executing command such as ddm.exe /2:SetActiveInput HDMI1 /1:SetActiveInput HDMI1 using Dell Display Manager, or ddcutil setvcp --display 1 0x60 0x11; ddcutil setvcp --display 2 0x60 0x11 using ddcutil. ddcutil uses literal addresses and values, so 0x60 refers to the address corresponding to monitor’s input, and 0x11 is the value for HDMI1 input.

So that fixes the problem of using the monitor’s menu, but it’s still not convenient enough.

Monitor’s input switching automation

Now, that we’ve figured out how to change the monitor input from a computer, it’s time to automate this. I’ve developed a simple, light and multi platform app I called Simple Command Runner with this task in mind. It allowed me to define a what commands are supposed to be executed and assign them to selected action. As a result I didn’t need to remember which computer was connected to which input of which display (let alone remember the address and value for ddcutil). Instead I could simply select “Set monitors to the PC with Linux” or “Set left display to the PC with Windows and right display to the PC with the MacBook”. I could run configure a DDC tool and run the Simple Command Runner on each of my machines to easily and conveniently switch displays inputs.

This approach worked well for quite some time. But eventually it became cumbersome in a couple of cases:

  • launch the app on currently used machine in order to switch to a different machine
  • if I locked or put to sleep my last used computer (or all of them) I needed to either wake up the last used one (not necessarily the one I needed at the moment) or I had to use the monitors’ menu.

Eventually I ditched this approach for a far better and, in my opinion, the best possible approach.

Stream Deck

Recently I came across a very interesting computer accessory called Elgato Stream Deck. Unlike the name suggests, it’s not only great for doing streaming, but it’s also great for productivity. The product’s website states the compatibility with Windows and macOS, but there are numerous Linux programs) that interface with the Stream Deck.

As you have probably guessed by now, I have decided to give this little device a try. I’ve purchased the Stream Deck Mini (the size does not matter), connected it to my Linux desktop and assigned the ddcutil commands. And it turned out to work perfectly! Now I can switch each monitor input (or both at once) to a computer without remembering to which interface is is connected. Regardless which computer (and which monitors’ inputs) was used last.

Imagine this: you finish your work on Windows desktop, put the computer to sleep and walk away from the desk. After some time you need to do something on a new laptop. Simply connect it to the Thunderbolt dock (which I normally use with my MacBook), and simply select the desired display configuration form Stream Deck. Works like a charm.

Why I’ve decided to connect the Stream Deck to this particular computer? Firstly, I wanted to use it with a desktop computer as it is always connected to the monitors. Secondly, I don’t trust Windows running for too long without turning it off. And obviously, the Stream Deck requires an active computer to be any useful.

There is only one caveat. The computer the Stream Deck is connected to must be awake and unlocked if you want to use the Stream Deck. But I can live with that. That’s why I’d use a small, low power computer like a Raspberry Pi connected to the monitors and to the Stream Deck if I could. But in my case I use all of the monitors’ inputs from time to time.

I hope this setup example will be useful.