I already had a cheap HDMI switch on hand, so I pulled it apart, and figured out that I could trigger it by shorting the pins which its

push button is attached to.  I could do the same by pulling a pin high with a super simple circuit. And that could be controlled
by a computer.

From there, everything else I needed to do was something I'd done in a previous project.  The usecases and corresponding resulting chains of events:

  • Switch monitors: Press hotkey -> Autohotkey echos a byte out a COM port -> Transistor goes high for duration of the byte -> Switch is triggered
  • Wake up Ubuntu PC: Press hotkey -> Autohotkey invokes wolcmd to send magic packet -> UDOO x86 wakes up -> This also triggers the monitor switching.

The above sequences pretty much explain eveyrthing involved.  The components I used are listed here:

Hardware components:

  • 3-1 HDMI switch
  • USB-Serial adapter (3.3 V)
  • 3904 NPN transistor
  • 1k Resistor
  • Header pin connectors and wire
  • 2x HDMI EDID emulator/pass-through
  • Active HDMI -> DisplayPort adapter (USB powered)

Software:

The most expensive component was actually the EDID HDMI passthrough.  This is a small component that pretends to be a monitor, so a computer always thinks it has a screen on the given port. Without this, my Windows PC thinks it has lost a monitor, and so moves
all the windows around (as well as desktop icons).
I initially considered making one myself by following this very impressive hack/tutorial.
But then I was able to find them on ebay (from Asia) at <$20.

Fixed issues:

  • When switching screens, Windows loses the monitor and reconfigures the desktop. Solved by getting an HDMI EDID passthrough so that the switched monitor is always "there".
  • When waking, the ubuntu machine, it fails to grab the screen.  This was fixed by getting a second HDMI EDID passthrough.
  • My Dell monitors behave differently with HDMI and DisplayPort sources; After sleeping my computer, HDMI input makes the monitor wait 5 minutes before going to sleep... so I bought an active HDMI -> Displayport adapter ($40)

Remaining issues:

  • I've been seeing some issues with my middle monitor not getting signal from my desktop when the monitor goes to sleep. This may be related to using the monitor's USB port to power the HDMI -> DisplayPort adapter
  • When using the Ubuntu PC, the mouse has an invisible screen to traverse to get to the remaining visible Windows screen (Not an actual issue, more of a side effect)
  • Synergy doesn't work on Ubuntu's lock screen because Synergy isn't running in that state... So I'm insecure and auto-login.
  • If I loose power, then sleep mode on the Ubuntu PC won't survive.