Coder Social home page Coder Social logo

Passthrough USB Device about windows HOT 29 CLOSED

dockur avatar dockur commented on July 4, 2024
Passthrough USB Device

from windows.

Comments (29)

Gothicaria avatar Gothicaria commented on July 4, 2024 1

Maybe the problem is that you gave it the Name ARGUMENTS but the Key should be ARGUMENTS

OMG I love you that was it!! Changed key to Arguments and used -device usb-host,hostdevice=/dev/bus/usb/001/006

image

image
I cant thank you enough!!!!

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024 1

Thank you again, you are a gem. Hopefully this will help others the same. Have a wonderful day!

from windows.

kroese avatar kroese commented on July 4, 2024

Hi,

I never tried it, but you should be able by adding a container variable called ARGUMENTS with the value:

-device usb-host,vendorid=0x1b1c,productid=0x0c3f

Let me know if it works!

EDIT: The above is for passing the device from inside the container to the QEMU VM. I assumed the above screenshot was taking care of passing it to the container (I am not an unRaid user). But in case that screenshot is not for the container, you need to also add an additional Docker parameter:

--device=/dev/bus/usb/001/007

Where 001 and 007 are the bus and device number you can find via the lsusb command.

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

I added the variable and the extra parameter to the docker container, (was 001/006) in my case. iCue hub not being detected by iCue in the WID so I am assuming it was not successful. :(

from windows.

kroese avatar kroese commented on July 4, 2024

Sorry I realize the USB controller in the VM is USB 3.0 and for usb-host you need a 2.0 controller.

So can you modify the ARGUMENTS container variable to this:

-device usb-ehci,id=ehci -device usb-host,bus=ehci.0,vendorid=0x1b1c,productid=0x0c3f

and see if it works?

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Still no dice. Also, I do apologise my skills are only intermediate when it comes to unraid/dockers. But I do have a good understanding of what you are asking me to execute, I will let you know if I do not understand :)

from windows.

kroese avatar kroese commented on July 4, 2024

No problem, it is a bit complicated because two different things need to be done at the same time:

  • unRaid must pass the device to the docker container succesfully
  • the container must then pass the device to the VM succesfully

I dont know which one of these steps is the problem. To debug it you could open a terminal in unraid and execute:

docker exec -it containerid /bin/bash

where containerid is the name of the running Windows container. That gives you shell access in the container, and then simply execute lsusb to see if the device is visible from inside the container. Once you verified that we can rule out a problem with the first step.

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

So this is what I get:
image

from windows.

kroese avatar kroese commented on July 4, 2024

Run sudo apt-get install usbutils

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Run sudo apt-get install usbutils

From inside the shell access or just from a new terminal?

from windows.

kroese avatar kroese commented on July 4, 2024

From inside the shell of the container (where you got the command not found error).

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

From inside the shell of the container (where you got the command not found error).

replied with
bash: sudo: command not found

from windows.

kroese avatar kroese commented on July 4, 2024

Sorry without sudo in front of it

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

image

from windows.

kroese avatar kroese commented on July 4, 2024

Run apt update to update the package list, and then install

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

That seemed to work:
image

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

image

from windows.

kroese avatar kroese commented on July 4, 2024

Okay.. so the container sees the iCue Link Hub. Strangely enough it also sees a lot of other devices (Aura LED, Logitech receiver, etc) even though you didnt pass them to the container? Are you running it in privileged mode or something? Otherwise thats not normal.

In any case that means the ARGUMENTS command should have worked. Maybe you can try with this value:

-device usb-ehci,id=ehci -device usb-host,bus=ehci.0,hostbus=1,hostaddr=6

And then use this tool ( https://www.nirsoft.net/utils/usb_devices_view.html ) and see if it shows up there instead of relying on the iCue software.

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Ok so im certain I followed this correctly
image

image

So the container is obviously seeing all of the USB devices, but not passing them through to the VM?

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Also not running in privliaged

from windows.

kroese avatar kroese commented on July 4, 2024

Can you try with this as your ARGUMENTS:

-device usb-host,hostdevice=/dev/bus/usb/001/006

If it still doesnt work can you try with some nonsense like this:

-device djskskbendjsjsmnw

And see if the container fails to start (so we know for sure that it uses the ARGUMENTS)

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

-device djskskbendjsjsmnw

First one, no change

Second nonsense argument and the docker still started

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

docker exec -it containerid /bin/bash

when I try the 1susb command again to check to see what it is seeing its gone back to the original error

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

lsusb

Sorry ignore that, it os seeing it
I made a typo

from windows.

kroese avatar kroese commented on July 4, 2024

The problem is that the ARGUMENTS value is not passed to the container, meaning all the different commands we tried were useless as it was not even used by QEMU. Because if it was used, it would fail to start if you provide an invalid commandline.

I am not an unRaid user myself, so its a bit difficult to say what is going wrong. From the screenshot it looks like you added ARGUMENTS correctly, but I am not sure.

from windows.

kroese avatar kroese commented on July 4, 2024

Maybe the problem is that you gave it the Name ARGUMENTS but the Key should be ARGUMENTS

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Just an update for you. It appears at some point the pass-through stopped working and I noted that the iCue link hub changed from Bus001/Device6 to Bus001/Device5. Going back through the steps you gave me I was able to fix it but it is likely going to happen again. Is there a way around this and/or why do you think it would change like that? I had not made any changes to the hardware etc.

from windows.

kroese avatar kroese commented on July 4, 2024

@Gothicaria I think the number changes if you unplug/re-insert the USB device.

Thats why in the FAQ section How do I pass-through a USB device I suggest to do it via the vendorid/productid because those never change.

from windows.

Gothicaria avatar Gothicaria commented on July 4, 2024

Yeah its weird as I didnt touch it. I will have to try the way you mentioned in the link and see what happens. Thankyou!

from windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.