Two computers, one monitor, zero fiddling – Alex Plescan
50 points by ankitg12 3 days ago | 32 comments

mckn1ght 9 minutes ago
I gave up on a hardware solution to this and currently just use Screen Sharing to "remote" into my personal machine from my work machine, which I guess only works because they're both macs, although VNC probably solves this in a cross platform way. I have an Apple studio monitor so built-in KVM isn't possible, although maybe there's a jailbreak for it since it has its own processor and firmware? I still just vastly prefer the quality of Apple displays so I optimize for that first.

Also, OT but I have the same keyboard as OP and love it :) I want to hack a TouchID key from the Magic Keyboard I bought into the chassis. But it can't traverse the Screen Sharing hack, so I do still think about this from time to time.

reply
dllu 4 minutes ago
Does screen sharing actually have reasonable resolution and latency befitting of the Apple Studio Monitor?
reply
clan 40 minutes ago
What a great idea. It should be obvious and easy but DDC commands are hard to find and should be documented better.

I have a Dell U4323QE in the office and look forward to trying this out. I wondered if it was the same DDC commands so I googled a little and found this gist (concerning DDM):

https://gist.github.com/nebriv/cb934a3b702346c5988f2aba5ee39...

Which has the very useful comment:

https://gist.github.com/nebriv/cb934a3b702346c5988f2aba5ee39...

Which states:

#define LUMINANCE 0x10 #define CONTRAST 0x12 #define VOLUME 0x62 #define MUTE 0x8D #define PBP 0xE9 #define SWAP_USB 0xE7 #define SWAP_INPUT 0xE5 #define INPUT 0x60 #define SUB_INPUT 0xE8 #define INPUT_ALT 0xF4 // alternate address, used for LG exclusively? #define STANDBY 0xD6

I much prefer simple DDC commands over using something like Synergy or Barrier. I think it is a much cleaner solution.

reply
a-dub 5 minutes ago
back in the '00s i used a hardware kvm that could be controlled by the keyboard with some weird key combo (~ ~ (1|2)? maybe?). these days i strongly prefer deskflow (oss version of synergy) for this sort of thing or just ordinary remote desktop for the secondary. (depends on the task, if you're just building for the secondary or reading email it doesn't really matter- but if you're developing interactive applications or you need to reboot a bunch or something, then having the physical hardware with a local head can help).
reply
sam_lowry_ 2 minutes ago
I still use hardware KVMs. Tesmart is OKish, but fails within a couple years, usualy. AV Access is on par with it.

Level1Techs are the best but also cost double or triple.

reply
spacedoutman 25 minutes ago
Personally i prefer two computers, two monitors, one mouse/keyboard.

Deskhop has been a lifesaver https://github.com/hrvach/deskhop

reply
albert_e 7 minutes ago
I am just using RDP from one PC into another presently -- to solve this in a low complexity way. Tried a lot of approaches in the past -- none were reliable for me.
reply
Brendinooo 4 minutes ago
I didn't know that DDC was a thing! Super cool.
reply
space_ghost 53 minutes ago
I did something similar last year with a monitor without built-in KVM but with good DCC support (Ultrasharp U3417W) and Synergy [0].

I use Synergy as part of my desk setup already, but needed a way to view the UI of a normally headless machine. The solution I built was a small shell script that terminated the active Synergy session and started a new one with a different config file (so keyboard/mouse input would map to the normally-headless machine), and fired off a DCC command to the monitor to change its input. The same script ran with a different argument would switch back to the normal display/control configuration. This solution worked pretty well until I was able to retire the headless machine early this year.

[0] https://symless.com/synergy

reply
vardalab 37 minutes ago
Yeah, this all sounds good in theory, but there's a lot of edge cases. For example, for me switching between Mac and Linux what often happens is that Linux just for some reason the it turns off the monitor port and it's black until I reboot and there was no easy way to get it back. This is while using fancy Dell monitors built-in KVM. Ultimately, I have settled on remote desktops as a more viable and quicker option.
reply
VimEscapeArtist 28 minutes ago
I use 2 computers without a KVM. My keyboard, mouse, and soundbar all support Bluetooth. All wired to the PC by default. When I switch to the Mac, I just flip each device to Bluetooth mode.
reply
ZeWaka 25 minutes ago
Yep, similar - I just use a wired USB hub that can toggle between two outputs.

I just have the monitors auto-switch on (lack of) input when I put one machine to sleep. The single click buttons on the monitor also switch.

reply
connectsnk 2 hours ago
Isn’t the answer buy a kvm switch? If yes this could have been really short
reply
swiftcoder 56 minutes ago
Depends on what class of monitor you want to run it with. A KVM that can handle 4K 144hz VRR is... not cheap, if available at all.
reply
applfanboysbgon 2 hours ago
> Conclusion

> And there you have it. A KVM solution that doesn’t require an external KVM device to pass inputs through, and a switch that can be triggered using a keyboard alone.

reply
Vvector 2 hours ago
He bought a $900 monitor that has a KVM built in
reply
csomar 59 minutes ago
Yeah, I read the whole article looking for any meat in there and there is none. I played with different setups as I, too, use both macos and linux. I remember doing a two screen setup where if you move the mouse to the edge of the linux screen, it appears on the macos one.

I guess everything old is new again?

reply
applfanboysbgon 48 minutes ago
A two screen setup is not a one screen setup. I have a two screen mouse-edge setup and I was still interested to learn about being able to use a keyboard shortcut to control a monitor with a built-in KVM to switch between two computers on the same screen. That is, in fact, new to me.
reply
timonoko 48 minutes ago
If you turn one computer display off as in "xrandr --output DVI-D-0 --off", the monitor automatically selects some other computer to display.

Thus I have 2 computers and 3 displays, and I can do sentences like "displays 13", which uses only displays 1 and 3 and sends ssh-command "displays 2" to the other computer.

reply
ryandrake 53 minutes ago
This is great. The Holy Grail of work/personal computing setups IMO. Too bad it’s so expensive.

I wish a KVM switch was a standard component of normal priced monitors these days. Especially one that also routed through all your peripherals, speakers, and everything.

reply
clan 26 minutes ago
Most people are unaware that the should buy a monitor with USB and DP-Alt mode. The same people are also unaware that they should ensure the same for the laptop they are buying.

Lower prices are always nice. But such things can be found at reasonable prices. I think awareness is a larger problem.

I am happy enough with the built-in speakers. But I do agree that line level aux out on the back would be nice.

reply
nickdothutton 57 minutes ago
I have a couple of Eizo EV3285, which have enough separate physical inputs for the 3 machines I use to drive them. Only real PITA is having to press the input selector on both. Must admit I wasn't even aware of DDC!
reply
timeinput 53 minutes ago
I have a few boxes that I switch between, but for some software it's nicer that my "main machine" be on DVI, and everything else HDMI. I may have to look at some scripting option where if the keyboard / mouse disappear (KVM switched away) change the display to use the HDMI input.

I do worry that would just add more trouble / race conditions / issues around this stuff. I feel like nvidia + linux + monitors doing anything other than staying on + attached all the time causes some headaches.

reply
mdswanson 48 minutes ago
FYI that if you have the right kind of Dell monitor, you can download their Display Manager software to do the same thing (and more): https://www.dell.com/en-us/lp/ddpm
reply
sethammons 51 minutes ago
It never occurred to me that you can send commands across DDC to your monitor. Binding that to a key on the keyboard in different OSs to trigger the monitor's built in KVM is a nice touch. I only change between my computers a couple times a day else I'd be setting this up this evening
reply
IshKebab 29 minutes ago
You can do this with even less fiddling just by getting a KVM that supports video. There are reasonably priced ones that can even do 4K 60Hz. This also means you don't have to deal with monitors that don't implement input switching via DDC/CI (thanks LG).
reply
clan 5 minutes ago
I did that at home. But I needed to try several KVMs until I found one which was stable. And I hate all the cables.

I agree that the industry hates its consumers and likes to mess things up. CEC never always quite the same. Not supported on many GPUs etc.

I do not want to appear to condone LG. But actually (sorry!) some supoort[0] it using DDC side channels (0x50 rather that 0x51). But I agree it is painful. Yet I prefer it over my cable spaghetti.

[0] https://github.com/rockowitz/ddcutil/wiki/Switching-input-so...

reply
abstractspoon 3 days ago
Zero fiddling, but substantial financial outlay
reply
swiftcoder 56 minutes ago
Any somewhat-modern monitor with multiple outputs should be able to do this. DDC support has been around for a while
reply
bartvk 28 minutes ago
Yeah but this monitor also switches its internal USB hub to USB-C. Is that really standard behavior?
reply
sciencesama 34 minutes ago
now we need the same for two macs !
reply
pixelatedindex 8 minutes ago
What’s stopping you from running the same command on both Macs? Maybe I missed something.
reply
kent-tokyo 3 days ago
[dead]
reply