I appreciate this question, I would also appreciate a solution, and the explanation of why it happens is interesting. However, what I really want is just to be able to switch the input via command line. I know that there is a protocol that supposedly allows this (ddc?), But it seems that support for it is not standardized. This means the feature I want can't be found in the product specs. So my question: what's a mon…
If you just need "switch using keyboard", not necessarily "switch using shell", some KVM switches allow input switching using keypresses. For mine, it's , though I think that can be customized.
I sometimes want independent control of the keyboard switch and the monitor switch, so I'm not sure if a KVM is the best option for me.