The trigger was a headless server in the cupboard that hung at the BIOS splash after a kernel update, and there was nothing I could do over SSH because there was nothing to SSH to. A wedged box with no display is a humbling thing. You can have all the orchestration in the world and still need a screen and a keyboard plugged into the actual machine. So I finally built the KVM-over-IP rig I'd been promising myself, on a Raspberry Pi.
The job of the device is simple to state: capture the target machine's HDMI output, pretend to be a USB keyboard and mouse, and serve both over the network so I can drive the BIOS from a browser tab. The PiKVM project does exactly this, and on a Pi 4 the build is well-trodden.
The two pieces that matter are video in and HID out. For video I used a CSI-based HDMI bridge, which captures with low latency straight onto the camera interface rather than going through a USB capture dongle. For the keyboard and mouse, the Pi 4's USB-C port runs in gadget mode, so the target sees a perfectly ordinary HID device and has no idea it is being driven by a Pi rather than a human. The target needs no software at all, which is the whole point. It works at the firmware level, before any OS has loaded.
The fiddly bit was power. You want the Pi powered independently of the target, so that when the target reboots, your console doesn't reboot with it. That meant a separate supply into the Pi and being careful that the HDMI bridge and the gadget-mode link didn't try to backfeed power down the wrong cable. I added an ATX control header too, so I can pulse the power and reset pins on the target's motherboard remotely, which turns "drive halfway across the house to press a button" into a click.
I printed a case for it because a Pi with a HAT and two ribbon cables hanging out is an accident waiting to happen in a cupboard. Nothing exotic, just a box that holds the ribbon at a sane angle and lets the heat out.
Did it earn its keep? On its first proper outing I watched the BIOS POST, dropped into the firmware menu, changed a boot setting, and rebooted the wedged server, all from the sofa with a mug of tea. For a box you only need a handful of times a year, that is exactly the right amount of effort: a weekend of building so that the bad afternoons become five quiet minutes.