Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usbipd: error: Failed to attach device with busid '1-9'. #1144

Open
bujtor-nokia opened this issue Feb 21, 2025 · 6 comments
Open

usbipd: error: Failed to attach device with busid '1-9'. #1144

bujtor-nokia opened this issue Feb 21, 2025 · 6 comments

Comments

@bujtor-nokia
Copy link

bujtor-nokia commented Feb 21, 2025

Hi, I am unable to attach a device to wsl. I performed the following commands:

  1. usbipd list
  2. usbipd bind --force --busid 1-9
  3. usbipd attach --wsl --busid 1-9

The error that I get is:

usbipd attach --wsl --busid 1-9
usbipd: info: Using WSL distribution 'Debian' to attach; the device will be available in all WSL 2 distributions.
usbipd: info: Detected networking mode 'nat'.
usbipd: info: Using IP address 172.27.32.1 to reach the host.
WSL usbip: error: Attach Request for 1-9 failed - Device in error state
usbipd: error: Failed to attach device with busid '1-9'

The logs from the usbipd server are:

fail: Usbipd.ConnectedClient[3]
An exception occurred while communicating with the client:
System.IO.FileNotFoundException: Unable to find the specified file.
at Usbipd.ConfigurationManager.GetVBoxDevice(BusId) + 0x153
at Usbipd.VBoxUsb.d__0.MoveNext() + 0x6b
--- End of stack trace from previous location ---
at Usbipd.VBoxUsb.d__1.MoveNext() + 0x17e
--- End of stack trace from previous location ---
at Usbipd.VBoxUsb.d__1.MoveNext() + 0x2b9
--- End of stack trace from previous location ---
at Usbipd.ConnectedClient.d__8.MoveNext() + 0xf03
--- End of stack trace from previous location ---
at Usbipd.ConnectedClient.d__8.MoveNext() + 0x18f9
--- End of stack trace from previous location ---
at Usbipd.ConnectedClient.d__5.MoveNext() + 0x32f
dbug: Usbipd.Server[1000]
connection close: Unable to find the specified file.
dbug: Usbipd.Server[1000]
connection closed

The things that I have tried to fix:

  • reinstall usbipd
  • reinstall the driver of the device
  • resintall wsl
  • I checked on 2 other identical PCs (same windows, same driver versions, same wsl) it worked on both of them
@dorssel
Copy link
Owner

dorssel commented Feb 21, 2025

usbipd attach --wsl --force --busid 1-9

I think you mean bind here.
When using --force, you may have to reboot before attach actually works.

@bujtor-nokia
Copy link
Author

bujtor-nokia commented Feb 21, 2025

@dorssel Yes, you are right, I modified the original post. Doesn't work without force either...

usbipd list
usbipd bind --busid 1-9
usbipd attach --wsl --busid 1-9

@dorssel
Copy link
Owner

dorssel commented Feb 21, 2025

Some devices cannot handle dynamic driver switching well. What may help is:

usbipd bind --force --busid 1-9
<reboot>
usbipd attach --wsl --busid 1-9

Remember that binding is persistent; you only have to do it once and it survives reboot. Unbinding or binding again without --force will actually undo the previous force (and likely will require another reboot, and likely will not work for your device).

@bujtor-nokia
Copy link
Author

Hi, we still got the same error after performing the actions you suggested...

@dorssel
Copy link
Owner

dorssel commented Feb 28, 2025

Can you check in Windows Device Manager and see what the state of the "USBIP Shared Device" is?

@jmzagorski
Copy link

I saw that same error message in Event Viewer after a windows 11 update. I had to unbind all my existing bindings and re-bind. It seems like @bujtor-nokia tried that based on his steps, but I wanted to post this in case someone else needed help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants