-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Odd issue sharing a USB device between Windows and WSL2 #458
Comments
That is weird indeed. It looks like (not sure, though), that VBoxUsbMon is not able to replace the hardwareId/driver. So, the device is present (with the original driver), then Can you try the following:
|
Reproduction of the issue appears less reliable than I initially assumed — just restarted my machine and can't seem to reproduce it for now... 🫤 Anyway, I'm using this setup on a daily basis so it'll probably pop up again in the near future. If it does, I'll go through the above instructions. Thanks for the prompt response! For now, the only (potentially) relevant observation is that the Yubikey initially gets identified as a |
What is the output from |
They're identical ( Good to note that the actual device listed is a |
Well... The issue does not appear to be related to Instead, it seems that Windows occasionally doesn't load the Yubikey smart card driver properly. When encountering the problem described above, the smart card functionalities don't work on the Windows-side either (hadn't actually tested that). The entire I'm guessing VBoxUsbMon simply trips over the underlying issue on the Windows-side (whatever that may be; still trying to work that one out). |
Okay — spoke too soon, the saga might continue... I've installed the Yubikey Smart card Minidriver in Windows, replacing the generic Microsoft driver for the smart card with a driver provided by Yubico. Now the problem only occurs when using This device shows up in device manager after These are the only related errors and warnings that show up in Event Viewer (repeated for every attempt at attaching the device): With these messages:
Furthermore, one sort of related "information" event shows up:
|
Can you try version 2.4.1? |
Just installed it — will keep you posted should anything change (or not change 😉)... |
@thijsputman |
It still happens occasionally. I haven't been able to determine any kind of (relevant) pattern to it. For now it's infrequent enough (and reliable resolved by a reboot) to just be a minor nuisance... |
Still interesting... Are you perhaps running a third party virus scanner? |
Nope. Only thing I can think of is that I'm running a relatively "old" Windows installation; about 2,5-years since it was freshly installed. |
I've been having a similar issue for a while now but never discovered this particular issue before. It seems to have the same symptoms. Powershell looks like this: > usbipd wsl attach -b 1-1
usbipd: info: Using default WSL distribution 'Ubuntu'; specify the '--distribution' option to select a different one.
usbip: error: Attach Request for 1-1 failed - Device in error state
usbipd: error: Failed to attach device with busid '1-1'. Looking at Device Manager, the device now shows up as something called Event viewer for `usbipd-win` shows a similar error as above:
I have the same Kernel-PnP warning:
But I don't see the DeviceSetupManager Errors. Is there anything I can try / get that might help figure this out? I'm able to work by copying files over to Windows first but it's still clunky. When Edit: Just trying to cover all questions previously asked, I'm not using anything other than Windows Defender, and |
@supleed2 If that does not work ... maybe your issue is related to https://borncity.com/win/2018/07/06/windows-10-v1803-hcvi-causes-driver-error-code-39/. Try with core isolation off. |
Thank you for the help! I managed to get it working, now I can get back to being productive ❤️ I had installed VirtualBox to test yesterday and it wasn't able to pass through the usb device either, so I had uninstalled it immediately. Noting the steps I took here incase it helps in the future:
|
@thijsputman |
Haven't seen the issue occur since I installed 3.0.0 — prior to that it'd only been happening occasionally (once or twice per month), so maybe it still will... Anyway, we can probably conclude it's an esoteric problem specific to my hardware/drivers; feel free to close the issue. |
Hey I'm having this exact issue. I tried and successfully passed the yubikey through for the firs time a couple days ago , everyhting worked fine including attaching then detaching multiple times, then a windows update forced a reboot (I cant describe in words how much I hate it and how much time ive spent trying to prevent the reboot but I digress) and ever since the reboot I can't connect again, I just get the same VirtualBox USB error. |
Using
usbipd-win
2.4.0 to connect a Yubikey into WSL2.Next to using the Yubikey in WSL2, I'm running a
gpg-agent
on the Windows-side to be able to use the Yubikey for SSH operations from Windows too. I'm attaching and detaching the Yubikey from WSL2 as needed in order to use it in Windows.This work like a charm, with one very odd caveat:
If upon booting the system I use the Yubikey in Windows first (through
gpg-agent
/scdaemon
), I'm subsequently unable to attach it to WSL2 until I reboot the system (details below). If instead I first attach it into WSL2 I can seemingly keep detaching and attaching it at will (and using it in Windows) without any further issue...In the first (failing) case, the following is shown on the WSL2-side:
The log produced by
usbipd
on the Windows-side (captured in 2.3.0; the problem persists in 2.4.0 though) appears to indicate the device is somehow busy?What I've tried to resolve the issue:
usbipd
on the Windows-sidegpg-agent
andscdaemon
on the Windows-sideusbipd
serviceNone of these actions appear to resolve the issue. The only solution (thus far) appears to be to reboot Windows and ensure I first attach the device to WSL2 before attempting to use it from Windows....
The text was updated successfully, but these errors were encountered: