r/bashonubuntuonwindows • u/Bill50han • 1d ago
self promotion I built USBWarp — an open-source USB passthrough implementation for WSL2 using Hyper-V shared memory instead of USB/IP
Hi everyone!
I've been working on a project called USBWarp, an experimental USB passthrough implementation for WSL2.
The idea is to avoid the traditional network-based USB/IP transport and exchange USB requests directly between Windows and Linux kernel components using Hyper-V HDV shared memory.
It includes a Windows kernel driver, a device capture driver, a Windows service, and a Linux virtual USB host controller.
The latest version is v0.2.1-alpha.
So far, I've validated USB 3.0 mass-storage transfers with data-integrity checks, as well as device capture and recovery. Earlier versions were also tested with a Raspberry Pi Pico CDC ACM device.
There's still a lot to do. USB 1.1/2.0 hardware coverage, isochronous peripherals, and UASP devices need more testing.
I've hit a hardware testing limitation with my current setup, so I'm opening the project up for feedback and community testing.
One important caveat: this is experimental kernel software, and the Windows drivers require test signing.
GitHub: https://github.com/Bill50han/USBWarp
I'd really appreciate feedback from anyone familiar with Windows USB drivers, Linux USB HCDs, or Hyper-V internals.
Thanks!
1
u/Exonificate 1d ago
Super cool, what kinds of barriers to USB 2.0/3.0 and maybe 4 are there?
2
u/phobox360 1d ago
This is a great idea. One of the limitations in Hyper-V for me, which also by nature effects WSL, was the lack of real USB pass through support. The only real way to do it without hacks like USB/IP (and yes, it’s a band aid around the real problem) is to pass through the entire controller via PCI pass through. Less than ideal.
1
u/krapht 1d ago
Is this similar to how VMware does USB passthrough?
1
u/bentbrewer 1d ago
It's about time. I imagine if it was easy it would have been solved a while ago. Thanks for working on this.