VM USB DAC Pass Through


Recommended Posts

First post here and new to unRAID. I've finished setting up my Win10 VM with all USB devices passed through as well as GPU. everything works minus the audio. the mobo on-board audio works fine. The major issue is passing through my USB DAC (Schiit Modi) to the VM. unRAID see the USB device but when Win10 boots the device is nowhere to be found, nothing in the Device Manager either..... Any thoughts? I believe its due to the fact that its connected to USB3 and not USB2 (i have a usb2.0 pci card on the way as my mobo doesn't have any usb2.0 nor a on-board header). Also, the USB DAC doesn't have any drivers, its built to plug and play. its worked with Win7/Win8.1/Win10 with no issues until i try to pass it through to a VM.

 

::side note:: i'm able to pass through a USB Headset but i have a constant clicking sound in a USB  headset when audio is playing.

 

Anyone face anything like this? have you resolved it?

Link to comment

I have found that with usb audio, passing through discrete devices is prone to issues. I have a set of soundtracks and, like you, when I pass them through, there's a lot of noise.

 

However, if I pass through the entire usb controller and then connect the usb audio device, it works fine.

 

Good luck!

Link to comment

I have found that with usb audio, passing through discrete devices is prone to issues. I have a set of soundtracks and, like you, when I pass them through, there's a lot of noise.

 

However, if I pass through the entire usb controller and then connect the usb audio device, it works fine.

 

Good luck!

 

How did you accomplish that? Through Bios?

Link to comment

I had the same issue passing through USB dacs to my 2 vms. I got them to show but got a lot of distortion. I ended up buying 2 pci-e usb controllers and passing one to each vm.

 

This solved the issue and I have audio working perfectly now. One thing I found that some may not, when I attached the usb controller I plugged all my usbs into it. After booting I had no usb devices detected.

 

I passed an old usb pen drive to the vm using the unraid gui  and all usbs worked fine, plus it is a lot easier having plug and play!

 

If you have the extra pci-e slot and a bit of spare money, I recommend getting a usb controller. I'm more then happy to help you get it passed through to your vm.

 

Regards,

Jamie

Link to comment

I had the same issue passing through USB dacs to my 2 vms. I got them to show but got a lot of distortion. I ended up buying 2 pci-e usb controllers and passing one to each vm.

 

This solved the issue and I have audio working perfectly now. One thing I found that some may not, when I attached the usb controller I plugged all my usbs into it. After booting I had no usb devices detected.

 

I passed an old usb pen drive to the vm using the unraid gui  and all usbs worked fine, plus it is a lot easier having plug and play!

 

If you have the extra pci-e slot and a bit of spare money, I recommend getting a usb controller. I'm more then happy to help you get it passed through to your vm.

 

Regards,

Jamie

 

 

 

where those usb pcie cards 2.0 or 3.0?  ive have a 3.0 card and no go.

 

 

and you have PlugandPlay? How?!!?

Link to comment

They are usb 3.0

 

I had to plug them in and get the vm set up using normal usb passthrough.  Pass the pci device by editing the vm xml, I can provide the code if needed? . Boot into windows and install the device drivers and ensure the usb controller is shown in device manager.

 

Shut down the vm, edit the vm so that only 1 device is passed to the vm via the gui.  Edit the xml again to pass the controller and boot windows.

 

This should then give you full access to any ports on the usb controller as plug and play. I personally have a 7 port hub connected to mine, I can attach my cd drive or usb pen drives as and when needed.

 

But like I said, atleast 1 device has to be passed through using the unraid gui else I lose all devices.

 

 

Regards,

Jamie

 

P.s I will write up a proper guide and go through it with you after work today if it helps?

Link to comment

They are usb 3.0

 

I had to plug them in and get the vm set up using normal usb passthrough.  Pass the pci device by editing the vm xml, I can provide the code if needed? . Boot into windows and install the device drivers and ensure the usb controller is shown in device manager.

 

Shut down the vm, edit the vm so that only 1 device is passed to the vm via the gui.  Edit the xml again to pass the controller and boot windows.

 

This should then give you full access to any ports on the usb controller as plug and play. I personally have a 7 port hub connected to mine, I can attach my cd drive or usb pen drives as and when needed.

 

But like I said, atleast 1 device has to be passed through using the unraid gui else I lose all devices.

 

 

Regards,

Jamie

 

P.s I will write up a proper guide and go through it with you after work today if it helps?

 

 

 

Please Do!!! especially the XML portion of the guide.

Link to comment

Ok, so this may be a littler bit harder/easier then other guides but it is pretty simple.

This guide is assuming you have a PCI-E USB controller installed and a VM already set up

 

1. Open your Unraid instance, and click the following: Tools -> System Devices

2. In the very top list of PCI Devices look for as occurrence of "USB controller"

 

For me, these looked like below


05:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)

06:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)


Make note of the parts in Bold as you will need this later.

 

3. Scroll down to the section for IOMMU Groups and look through the list for the above Bold section, again for me this looked as follows:


/sys/kernel/iommu_groups/32/devices/0000:05:00.0

/sys/kernel/iommu_groups/33/devices/0000:06:00.0


 

4. Once found, look at the number (as italicized above) and ensure no other devices are in the same group. If they are, you may need to enable PCIe ACS Override - I will show you how to do this if needed

5. Go to the VM tab and click edit on the vm you wish to pass the device to.

6. Ensure at least 1 usb is passed to the vm by the list at the bottom (For this i passed across an old usb pen drive)

7. Go back to the main VM tab and click "Edit XML" on the vm you wish to pass the controller to.

8. Within the XML look for the following line (it will be at the bottom)


<qemu:commandline>


 

9. Add the following code at the bottom of this section, replacing the bold part with one of the bold sections from earlier


<qemu:arg value='-device'/>

<qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>


 

Mine looks as follows:


<qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=0a:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=00:1b.0,bus=root.1,addr=01.0'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>

  </qemu:commandline>


 

10. Ensure the part within addr is unique from the others, as you can see mine is 00.1

11. Before saving, copy the entire XML to a text file somewhere for later (If you edit the VM this section will be removed and need to be added again)

12. Click save and boot the VM

 

If the USB devices connected to the USB controller don't show up in the vm, shut it down using the unraid GUI and following the following steps

 

13. Edit the VM and pass through your usb keyboard and mouse

14. Repeat steps 9 to 12

15. Boot up the VM and install any drivers needed for the USB controller (This may not show in device manager so get it from the manufacturers website)

16. Shut down the VM

17. Edit the VM so only 1 device is passed through

18. Repeat steps 9 to 12

19. Boot up the VM and ensure the USB's now work

 

If at this point it still doesn't, let me know. For me, i brought a 7 port usb hub and connected it to my usb controller so i could plug my usb's in as needed on my desk.

 

Hopefully this helps. If anything doesn't make sense, let me know and i will re-word it.

 

Regards,

Jamie

 

P.s Sorry i didn't wrap it in code but Bold and Italic don't work inside it

Link to comment

Ok, so this may be a littler bit harder/easier then other guides but it is pretty simple.

This guide is assuming you have a PCI-E USB controller installed and a VM already set up

 

1. Open your Unraid instance, and click the following: Tools -> System Devices

2. In the very top list of PCI Devices look for as occurrence of "USB controller"

 

For me, these looked like below


05:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)

06:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)


Make note of the parts in Bold as you will need this later.

 

3. Scroll down to the section for IOMMU Groups and look through the list for the above Bold section, again for me this looked as follows:


/sys/kernel/iommu_groups/32/devices/0000:05:00.0

/sys/kernel/iommu_groups/33/devices/0000:06:00.0


 

4. Once found, look at the number (as italicized above) and ensure no other devices are in the same group. If they are, you may need to enable PCIe ACS Override - I will show you how to do this if needed

5. Go to the VM tab and click edit on the vm you wish to pass the device to.

6. Ensure at least 1 usb is passed to the vm by the list at the bottom (For this i passed across an old usb pen drive)

7. Go back to the main VM tab and click "Edit XML" on the vm you wish to pass the controller to.

8. Within the XML look for the following line (it will be at the bottom)


<qemu:commandline>


 

9. Add the following code at the bottom of this section, replacing the bold part with one of the bold sections from earlier


<qemu:arg value='-device'/>

<qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>


 

Mine looks as follows:


<qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=0a:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=00:1b.0,bus=root.1,addr=01.0'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>

  </qemu:commandline>


 

10. Ensure the part within addr is unique from the others, as you can see mine is 00.1

11. Before saving, copy the entire XML to a text file somewhere for later (If you edit the VM this section will be removed and need to be added again)

12. Click save and boot the VM

 

If the USB devices connected to the USB controller don't show up in the vm, shut it down using the unraid GUI and following the following steps

 

13. Edit the VM and pass through your usb keyboard and mouse

14. Repeat steps 9 to 12

15. Boot up the VM and install any drivers needed for the USB controller (This may not show in device manager so get it from the manufacturers website)

16. Shut down the VM

17. Edit the VM so only 1 device is passed through

18. Repeat steps 9 to 12

19. Boot up the VM and ensure the USB's now work

 

If at this point it still doesn't, let me know. For me, i brought a 7 port usb hub and connected it to my usb controller so i could plug my usb's in as needed on my desk.

 

Hopefully this helps. If anything doesn't make sense, let me know and i will re-word it.

 

Regards,

Jamie

 

P.s Sorry i didn't wrap it in code but Bold and Italic don't work inside it

 

 

 

Awesome! can't full test atm (using chrome remote desktop to my surface pro to view the unRAID webGUI) would i to use the PCIe ACS Override like you mentioned... i have my pci bridge from the mobo in the same group... thoughts?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.