One thing I’ve always wondered is why it’s not common to be able to use a laptop as a generic keyboard and monitor for another computer. For doing maintenance on a headless machine it feels silly to go buy a keyboard and monitor when my laptop already is those.
The GPD Pocket 3 has a KVM module that lets you do exactly this: it has HDMI & USB-C inputs and then it acts as a display, keyboard, and mouse for whatever machine it's connected to: https://gpd.hk/gpdpocket3
There's also the up-and-coming Minisforum V3 tablet that has a video input so that it can act as an external monitor, but I don't think it'll be able to share it's keyboard and mouse.
I agree with you, though, it really would be nice if this were a more common feature.
Not much of a hardware guy so don't know if this is at all plausible, but it'd be nice to see that as an extension port on the framework laptops.
That surely is the advantage of having modular ports. This is a fairly niche application so I can see why it's not a standard option, but for those who want it it could be a real game changer.
I've had some success searching "lapdock" as well, they're marketed towards using them with smartphones it looks like but can't see why you couldn't plug it into a server or computer as well.
The expansion ports on FW laptops are just backed by the same USB-C/TB4 ports you’d have on any other laptop. I don’t think the expansion form factor would make it any easier unfortunately
Oh no I didn't think it'd make things easier to implement, it's just that the need for a port is quite niche so it's unlikely you'd see it on many laptops, but if you have modular ports that justification is obviously far less a problem
But as I say, I don't know if a KVM module can be implemented over USB-C
Seriously. A friend of mine built a cyberdeck specifically for this -- his mouse and keyboard can be switched to an external port and then cabled to another machine, and there are two HDMI ports on the side, one output and one input, with an internal switch to select either the deck's own machine, or the external input, as the source for the deck's monitor.
As someone who often deals with headless machines, the best solution I have found for using my laptop as a monitor is this: https://www.amazon.com/dp/B0BJ2YDV7Q It's basically a chip to capture the HDMI signal from a headless machine, and expose an emulated webcam via USB to your laptop. It's so tiny the electronic is basically built into the cable.
For the keyboard I haven't found a good solution other than buying a standard wireless keyboard (with integrated trackpad, for the rare cases where a mouse is needed).
For the keyboard I use a CH340+CH9329 cable, the former is a USB to UART converter and the latter is a UART to USB-HID converter. Feels unnecessarily complicated but hey at least it's only $3. It's effectively a USB "keyboard" controlled by another host.
Then I use a ~30 line Python script to forward key press to it. I really hope someone make a better integrated solution (or me having time to do it), though.
That's basically what I do as well. I combined a similar HDMI dongle with a Logitech K400 Plus wireless keyboard+trackpad combo. It's an absolutely terrible membrane keyboard for everyday use, but having the trackpad and keyboard in the same device, using the same single dongle that has a storage slot in the keyboard makes things really easy for light, occasional use.
There was a time when FireWire did that kind of thing -- not specifically with remote displays, but providing a high-bandwidth (for the time) wired network link between two PCs.
At home, in the Ye Olde 10/100 Ethernet days, sometimes I plugged my laptop into my desktop with 400Mbps FireWire to transfer big files.
No special cable required; any dumb FireWire cable with the right connectors on each end ("big" for the desktop, "little" for that particular laptop) worked just fine between any two FireWire devices.
I think Display Target Mode only worked with Thunderbolt, which was different.
I just used Firewire (er... maybe IEEE-1394, since it was in PC space) as a temporary and fast network connection for running (eg) IP stuff and file transfers with SMB, but it could have been used permanently.
At the time, plugging a Firewire cable in betwixt two Windows machines generated this network automatically, with RFC 3330 addresses for each end.
It just worked; each machine could be addressed by name nearly instantly after connection, and whatever file shares they had available could then be accessed with the same mechanisms that would be used on the normal Ethernet LAN.
I never did anything particularly complex with it.
At some point in college (in the mid 90s) I had a Linux box and a Sun box (pre-solaris) and had them connected up using X11 over SLIP over RS232 with a null modem and gender changer. The sun workstation could be completely controlled through RS232- you could reset the machine, do stuff to the boot system, etc. IIRC the max baud I could use was 19200, or maybe 38400.
> The sun workstation could be completely controlled through RS232
As a terminal right? the native function for RS232 was dumb terminals, and at some point that got abstracted a few thousand times to what we consider to be common terminals. You were running a proper paleo setup!
Yeah but then you're limited to Ethernet speeds, which (if even present on a modern laptop) is often 1/20th the speed of its fastest USB port.
I just want to image the SSD without disassembling the laptop, damnit
Thanks for posting this. It is pretty much solving a major pain point for me (as is TFA, seemingly on a brief skim), even if with some usability friction.
I have a Flipper Zero and have always fantasized about having some sort of VMware/VirtualBox-like application that operates in a capture mode to forward all inputs to another device (similarly as to the guest machine in the VM player) with a keyboard shortcut to release the HIDs back to the host.
In the Flipper Zero's case (or any SBC/SOC/microcontroller/whatever-term-is-appropriate), it would be so lovely to be able to operate in all four combinations of:
Host - BT - Flipper - BT - Second device
Host - USB - Flipper - BT - Second device
Host - BT - Flipper - USB - Second device
Host - USB/GPIO - Flipper - USB/GPIO - Second device
Unfortunately, I don't work so close to the hardware, so I've no idea where to even begin with this. A man can dream. Sigh.
You still need software support for it on the host device.
While you can imitate Keyboard and Mouse (and they would work through boot or without OS), Video is out of question for now.
And while there is still some value on it using on a healthy system, most of the time KVM device is needed when something is not working.
NB there is/was Intel ATM which provides (at least on paper and on rare, extremely rare posts on Internet) KVM-like experience and power control. Theoretically it can be used as the basis for single USB port KVM interface.
You can deduce the answer by charitably interpreting that the situations in which I’m attaching a keyboard and monitor are those in which that’s a reasonable action.
Idk about all machines ever, but I remember being able to access ssh over a serial port.
Though in that specific case for me, it was more of a necessity rather than just a quirky way of using ssh (due to the “machine” just being a dev board with a UART ESP32).
To access the serial port remotely you need to add hardware to bridge it to the network. Or you go up to the machine and plug in another computer with a keyboard and monitor to access it directly.
There is/was a tool called x2x, which somehow let you send your input (mouse/keyboard) to another machine (I think via X forwarding tricks, although I don’t know how it worked, so I could be wrong).
I tried it around a decade ago and at the time it felt a bit abandoned. I vaguely remember that it might not have worked with every window manager? Anyway, I assume it hasn’t got better supported since then. But it did feel magical.
Later, things like x2vnc made the idea more cross-platform (X on the local unix-like box, VNC on some other platform), but only with two machines.
After that, Synergy became a thing, and supported many machines, but then they eventually went to a model that tended to require payment.
Later, Barrier forked from Synergy, and it allows much of the same functionality. It's still very free, and it still works, but it's kind of abandoned.
Today, there's Input Leap. It is (naturally) a fork of Barrier, and it is still sees regular development.
So, you'll accept any solution, except the existing ones that work?
XDMCP solves this exact issue. You use one device which becomes virtually an attached terminal of another device which is actually headless and with no input devices of its own. We've had this for 30+ years.
No, we already use the solutions that actually work, and are speculating why there isn't one with the simple, obvious user experience. Why shouldn't we?
…except for when they can’t. The relevant retort would be that I could instead be using hardware with a remote management interface like IPMI, and building a custom OS installation image with remote access preconfigured. But even then I’m not sure how you’d have me troubleshoot surprise network issues.
One approach is to copy the data to a location that you control first (eg: RAM) and perform both the check and the use of that data from the trusted location. That can be difficult though on embedded devices with constrained resources.
Correct me if I'm wrong but I think that's how Gameboy carts show custom logos bypassing the Nintendo copyright check thing - one logo to pass the internal check and another for display.
This is really interesting. I've been researching some viable options like this. I have a beefy Network Attached Storage (NAS) server that I actively look for excuses to make use of. I have connected with some 40g and 10g interconnects for it across the house. I also have a PS5 & XBox that use USB hard-drives for additional storage.
I looked into whether I could expose my NAS storage to PS5 & XBox. Turns out that it's possible! It's possible by mounting the NAS shares over iSCSI or NFS, and then emulating a USB storage device using the g_mass_storage module that exposes said storage to USB hosts.
Besides time and cost, one major blocker for me right now is the bandwidth that such a system would provide. It's just not that big of an upgrade. Raspberry Pi very famously supports USB-OTG (similar/same as xDCI), but it only does so with USB 2.0 speeds, and so do all the other SBCs in that class that I found, except for one, RockPi4. RockPi has a Gigabit ethernet port, so if you max out ethernet, you can provide stable HDD speeds to both the PS5 & Xbox.
It would be really interesting to explore a solution where you have the ability to plug in a custom PCIe network card (or an express card) that lets you go beyond 1gbe because then you can really saturate the USB 3.0 interface.
It does require a client to talk to the server but seems to work pretty well. My thought is to setup a "thin USB client" on my desk that I can attach USB devices to which then are attached or switched to whatever metal or VM host I want in my lab.
Unfortunately the consoles don't allow installation of such a USB over IP client so I can't use this, but for other usecases where the clients are running general purpose OS, this could be great!
You guessed it, it's NAS -(Ethernet)-> SBC -(USB)-> PS5. This is partially because they are on different floors and partially because the NAS server doesn't have any OTG ports.
> Also how does content play on the PS5?
As far as the PS5 is concerned, it just has a USB hard drive plugged into it. It doesn't know how it works under the hood.
Raspberry Pi 5 has a gigabit ethernet port, as do a number of other SBCs, like the NanoPi variants from FriendlyElec for example. In fact the NanoPi R6S has two 2.5G ethernet ports in addition to a 1 gigabit port.
I'm grateful for this extremely detailed article. Great quality here.
The fact that this has been achieved gives me hope that a networkless Synergy / Mouse Without Borders setup might be possible using just a modified USB cable. That's great for people like me who need to operate multiple computers simultaneously.
I was looking into similar recently just wanting to do 10Gbps between two USB-C machines over USB with just a USB-C cable. Unfortunately most Ryzen boards still don't have Thunderbolt (which supports this natively and easily). And "dual role" USB controllers were quite uncommon (or as this article details, possible but not supported) until USB 3.2/4.0 - and even then it seems a bit hit and miss. It's totally crazy to me it's not easier to network two machines with a USB-C cable (without Thunderbolt).
I also love the part about the lock bit being cleared after a suspend, that seems to be such a common issue.. super common way to get SATA devices out of the state preventing secure erase for example.
The ability to use a PC as a USB device opens up lots of fun possibilities. It's a little bit tragic that the required xDCI option is there in the hardware on this device, but it's not exposed and requires firmware hacking to access.
The hardware is capable, but the vendor has just turned it off and locked away the controls.
> However, dealing with a Raspberry Pi is a hassle: plugging in the wires, booting the board, accessing the shell, etc
Probably just could have configured USB OTG, so its powered by the device you plug in, enable shell, then scripted this. Then you can configure mounts over ssh, commands over ssh, probably even mount the device.
That being said, I encourage people to try to understand their devices, read the kernel, etc. Its something I strive to continually improve. Lets fix our own shit :D.
The "Zero" variants of boards tend to allow power over the OTG port, so you can do some interesting things. (Of course, annoying if your powering-device resets power to it). Particularly, if I didn't suck at DTS/u-boot stuff, you could make a PiKVM for <$75. (You can get $10 1080p/60fps HDMI capture cards, you use the OTG port for kb/mouse).
Still, even if you had to external power it, those little boards have pins for power in. It would still be cheap/fairly elegant. And or a USB-C Hub should power it, and give you a place to put more non-host usb devices like a usb-eth dongle.
I would like to make one with some of the (Raspberry|Orange) Pi 3, but again, I've lost too much of my life to dts/u-boot stuff. BSP/mainline woes. It's just easier to be a software-only, cloud-machines-only guy and live minimally.
This article was exciting because I'd love to imagine cheap old laptops being salvagable as little KVM instances, but it seems like OTG/xDCI is just not a priority.
This reminds me so much of the early internet hacker culture that it's actually triggering nostalgia. What a great write-up! When ESR talked about becoming a hacker (hacker in the Hacker News sense), this is the type of person he was talking about.
The combination of curiosity, dedication, and technical ability is exceedingly rare, and majorly impressive. Thanks so much for sharing!
I have a Celeron N3350/Pentium N4200/Atom E3900 based system, that exposes an xDCI switch in the bios, and upon enabling it, I do get some other options, and upon bootup into linux a PCI device "USB controller: Intel Corporation Device 5aaa (rev 0b)"
But the UDC device node is not showing up. So it seems I have to dig a bit further using inspiration from the OP
I'm actually trying to do this on a Raspberry Pi right now to emulate a HDI. There are a lot of existing libraries that do this. I needed to do this because the native SendMessage/PostMessage ways to send keystrokes to a Windows process break down when you need to send modifier keys -- I needed to send ":" but I could only send ";". I tried endlessly to send the "shift" modifier key to no avail.
I actually considered directly writing to memory to "trick" the program to think certain keys are pressed (but this doesn't work for emulating actual typing input), or hook into functions with a dll injection and interleave fake input somehow.
Imagine a world were all kinds of platforms could be add hoc merged into one large "kernel" that allows to combine all sorts of hardware into one huge device. Old laptops, old phones, it's all merged into one huge abomination.
I'm somewhat irrationally irked by the use of the word "emulated". It does not "emulate" a USB device, it becomes one! This mechanism is exactly what all your gadgets with Linux on-board use to be USB devices.
It's an extremely obscure feature for which the device lacks the hardware to do it properly (no VBUS switching), which is almost certainly untested. If I were designing a mass-market product, I would disable it too.
They got the BIOS from a 3rd party vendor, disabling it by default and hiding the setting was probably the easiest way to prevent anyone from accidentally trying to use it.
Its under "advanced" tab in BIOS. How many people accidentally stumble there? And how many of those people will have problems with it? And of the tiny number of people who end up enabling it and have problems, how many will then complain to Lenovo? That seems like really marginal case! Especially when it needs also things to happen from OS side too, so just flipping the flag in BIOS in itself shouldn't do much. How much trouble would it have been to add warning "this is not supported, use at own risk"?
A quick (and less intrusive) way to copy files quickly is by setting 2 machines to manual IP addresses and connecting them directly with an Ethernet cable, then using SMB to copy files from one to the other
If not using SMB, and python installation can serve a directory over HTTP using `python -m http.server`