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.56k stars 229 forks source link

usbipd error loading vhci_hcd failed #1010

Closed LZY-SPCA closed 1 month ago

LZY-SPCA commented 1 month ago

usbipd error loading vhci_hcd failed while attach usb device to wsl

LZY-SPCA commented 1 month ago

usbipd-win version image windows 11 23H2

dorssel commented 1 month ago

Within WSL, what is the output of zgrep CONFIG_USBIP /proc/config.gz?

michal5520pl commented 1 month ago

@dorssel

CONFIG_USBIP_CORE=m
CONFIG_USBIP_VHCI_HCD=m
CONFIG_USBIP_VHCI_HC_PORTS=8
CONFIG_USBIP_VHCI_NR_HCS=1
CONFIG_USBIP_HOST=m
# CONFIG_USBIP_DEBUG is not set

I have the same problem with WSL2 pre-release

Wersja podsystemu WSL: 2.3.14.0
Wersja jądra: 6.6.36.3-1
Wersja usługi WSLg: 1.0.64
Wersja MSRDC: 1.2.5326
Wersja Direct3D: 1.611.1-81528511
Wersja DXCore: 10.0.26100.1-240331-1435.ge-release
Wersja systemu Windows: 10.0.22631.3880

Apologies for Polish, but I hope it's readable

PS. I have the same version as @LZY-SPCA

dorssel commented 1 month ago

What happens if you load the module by hand: sudo modprobe vhci_hcd?

michal5520pl commented 1 month ago

No module vhci_hcd found, unfortunately. Did Microsoft some fail regarding that module? I will try to compare versions, maybe

dorssel commented 1 month ago

Normal (non-pre-release) versions of WSL don't use modules, they have all drivers compiled in a monolithic kernel.

The pre-release version of WSL is switching to modules (CONFIG_USBIP_CORE=m), so you will have to load vhci_hcd. usbipd-win will try to do that automatically. If you don't have that module, there is nothing I can do about it.

LZY-SPCA commented 1 month ago

I ran modprobe vhci_hcd successfully and solved this problem.

michal5520pl commented 1 month ago

I've tried again and modprobe vhci_hcd indeed worked. Probably I have mismatched one letter due to tiredness. I have resolved the problem with putting .conf file in /etc/modules-load.d with vhci_hcd inside

kingsoftech commented 1 month ago

hello everyone am currently facing the same issue with the following output CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_VHCI_HC_PORTS=8 CONFIG_USBIP_VHCI_NR_HCS=1

CONFIG_USBIP_HOST is not set

CONFIG_USBIP_DEBUG is not set