dorssel / usbipd-win

Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
GNU General Public License v3.0
3.35k stars 210 forks source link

Unable to "attach" usb device through WSL #975

Open NickM1111 opened 1 month ago

NickM1111 commented 1 month ago

Hi, Similar to other posts I have seen, I am having difficulty attaching my usb device to the WSL. The error message I am getting is: usbipd: info: Using WSL distribution 'Ubuntu' to attach; the device will be available in all WSL 2 distributions. usbipd: error: Unable to run 'usbip' client tool. Please report this at https://github.com/dorssel/usbipd-win/issues.

I am running the latest version of usbipd-win_4.2.0.

Can you please advise on how to fix? Thanks

dorssel commented 1 month ago

What is the version of Ubuntu? After you've tried to attach, what is the output of mount in WSL?

shufang-ding commented 1 week ago

What version of Ubuntu is it? What is the output from mountWSL after trying to connect?

Yes, I also encountered this problem:

Persisted: GUID DEVICE

PS C:\Windows\system32> usbipd bind --busid 3-4 PS C:\Windows\system32> usbipd attach --wsl --busid 3-4 usbipd: error: Windows Subsystem for Linux version 2 is not available. See https://learn.microsoft.com/windows/wsl/install. PS C:\Windows\system32>

Tried the following commands, but none of them solved the problem: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --update wsl --set-default-version 2 wsl --install -d Ubuntu

Will not work

dorssel commented 1 week ago

@shufang-ding

PS C:\Windows\system32> usbipd bind --busid 3-4 PS C:\Windows\system32> usbipd attach --wsl --busid 3-4 usbipd: error: Windows Subsystem for Linux version 2 is not available. See https://learn.microsoft.com/windows/wsl/install. PS C:\Windows\system32>

That's a completely different error than reported by the OP. Not related at all. Please file a new issue if you want to resolve it.