I have tried out a KVM switch to control 2 PC's and he works fine, also on linux.
I have known them professionally but that was expensive stuff.

These days they are quite inexpensive fully electronic and easy to use.
They work on a hot-key keyboard stroke, but has also an autoscan mode.
This last thing I don't understand why.
But in manual mode you can boot and reboot the PC you want (or shut down).

If you connect the PC's with ethernet and a switch you can do what you want on each PC and login on them.
You can use one PC with windows and the other with linux.
But you can also use a dual or multi-boot on both.
So a lot of possibilities.