Jump to content
jonp

New USB Pass Through Method with USB 3...Please Test

45 posts in this topic Last Reply

Recommended Posts

All,

 

I've been experimenting with a new emulated USB 3.0 controller that's built into QEMU.  This controller may provide better support for USB 3.0 capable devices, and may also lower CPU demand on the system.  I'd like to get some feedback from others out there.  Let me know if this changes anything for you, specifically with devices that previously did not work.

 

First off, this is NOT PCI device pass through, this is USB "assignment" which means attaching a physical USB device to an emulated USB controller (clicking the checkboxes in the webGui).  Here's how to test:

 

1 - Create or edit a VM and assign it some USB devices.

2 - Stop the VM

3 - Edit the VM's XML

4 - Look for this line:

 

<controller type='usb' index='0'>

 

Change it to read as this:

 

<controller type='usb' index='0' model='nec-xhci'>

 

Then also delete the <address> line below it and then click update.

 

Now start up your VM.  Keep in mind, after booting up, it may take a few moments for the OS to recognize the new controller / new device.  I tested this with Windows 8.1 and Windows 10 so far with just one set of USB devices and it seems to be working just fine.

 

Please report back here with your findings after attempting this.

 

Also, please remember that if you edit the VM again outside the XML editor, this change to the USB controller will be lost, so if you are trying different devices with the VM and want to change some assignments, repeat the entire procedure from beginning to end.

Share this post


Link to post

Hi Jonp,

 

The USB Controller device comes up in Device Manager, but Windows can't identify the drivers to download. I was able to still mouse-around using Chrome Remote Desktop, but unfortunately no USB capability.

 

I tried searching for NEC-XHCI drivers but the only one I could find was a Dell driver package which wouldn't install on my VM.

Share this post


Link to post

Hi Jonp,

 

The USB Controller device comes up in Device Manager, but Windows can't identify the drivers to download. I was able to still mouse-around using Chrome Remote Desktop, but unfortunately no USB capability.

 

I tried searching for NEC-XHCI drivers but the only one I could find was a Dell driver package which wouldn't install on my VM.

 

What version of Windows?  I'm assuming Win 7?

Share this post


Link to post

Yes, Win7 64-bit

Ok, that's what I thought. I think this is only going to work with Win 8.1 and Win 10.

Share this post


Link to post

Just used this with my Win 8.1 x64 VM with the following USB devices:

Logitech MX518 mouse

HP USB Keyboard

Microsoft Xbox 360 Wireless Controller

FLIRC USB

 

Previously using the GUI, the system would only recognize the KB + M, and there would be a device with no properties called "vport0xxx" (x = forgot, sorry).

 

Using the above xml, the system immediately recognized all USB devices, all in <1 minute.

 

Additional to above, I had to go from:

 <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>

 

to

<controller type='usb' index='0' model='nec-xhci'>
      </controller>

 

Hope this helps!

Share this post


Link to post

Jonp: I followed your instructions to the "t".  I pasted in the new line, deleted out the old and the address line, hit update and tried it out.  It didn't work, nothing there, so I went back to replace the changes with the old code, and the "new" code was replaced by the old, or it just didn't update.  Are you doing this from the Edit XML menu or from someplace else?  I just can't seem to make it stick.  Thanks ~ Dave

 

BTW, using Win10 Pro and 6.1.3 and USB3.0 (4 port)card.

Share this post


Link to post

Jonp: I followed your instructions to the "t".  I pasted in the new line, deleted out the old and the address line, hit update and tried it out.  It didn't work, nothing there, so I went back to replace the changes with the old code, and the "new" code was replaced by the old, or it just didn't update.  Are you doing this from the Edit XML menu or from someplace else?  I just can't seem to make it stick.  Thanks ~ Dave

 

BTW, using Win10 Pro and 6.1.3 and USB3.0 (4 port)card.

 

Do you pass through the USB card to the VM?

After you edit the XML you must not edit the VM template. That resets the manual edit you did.

Share this post


Link to post

I just tried this with a Windows 10 VM and it works fine.  I didn't have any devices that didn't work, but all my passed in USB devices are working.  Did take quite while when first starting the VM.  I assume it took Windows a bit to load the driver.

Share this post


Link to post

I'm using a Windows 10 VM and this definitely did some wonders for me. Now, the USB 3.0 hard drive I have will mount without any complaints, whereas before it wasn't even showing up.

Share this post


Link to post

I'm using a Windows 10 VM and this definitely did some wonders for me. Now, the USB 3.0 hard drive I have will mount without any complaints, whereas before it wasn't even showing up.

 

Thanks for reporting.  This is good to hear.

Share this post


Link to post

Using this method with Windows 10, Fliirc, Logitech Keyboard/mouse combo were both recognized and work without a hitch.

 

Other system I pass a controller on to for hot plug and play, so didn't test there.

Share this post


Link to post

I also had to use this to get WIN10 to recognize an external USB3 hard drive.

Share this post


Link to post

Needed to use this to get USB HDD's and Sticks to work on my Win 10 VM. 

Share this post


Link to post

Maybe a silly question.

Is this only applicable to devices that are already visible inside of unraid already? and as a prereq do you do need a PCI expansion usb3.0 card to be already passed through to your vm?

 

 

Share this post


Link to post

Hi,

I have tried to edit the XML several times via VM manager in an attempt to get devices passed thru. Once I have completed the edit and select update it reverts back to it original settings.

 

Where else can I find the XML file so I can make the edits after the template is made so I can make the changes stay?

 

Thanks

 

[uPDATE] After shutting down server for the night and with a fresh start everything worked as it should.

Share this post


Link to post

I was able to get my three Logitech devices (keyboard, mouse, trackpad) to work with this method, but my USB sound card, Microsoft Xbox One controller wireless receiver, and Steam Controller wireless receiver continued not to work. I had to use the hostdev method described here: https://lime-technology.com/forum/index.php?topic=36768.0

 

Now all is well, except for the distorted audio issue coming through my USB sound card any audio device being active causes this as well. I experienced this on a previous rig running unRAID trial, and confirm that it sounds the same as the issue I was getting on GPU audio and onboard audio at that time.

Share this post


Link to post

Hey I just tried out this menthod as I had a USB mic (ID 17a0:0303 Samson Technologies Corp. C01U Pro condenser microphone) and one of the new Xbox one wireless adapters for windows (045e:02e6 Microsoft Corp.) which were both having issues on my Z97N-Wifi motherboard from gigabyte.

 

The USB mic would show up in unRAID but when passed through to windows the VM could not see it at all.

 

The Xbox one adapter was recognised by windows fine but got error 10 failed to start.

 

Switching to this new mothod has fixed both of these problems ^_^

Share this post


Link to post

Just used this with my Win 8.1 x64 VM with the following USB devices:

Logitech MX518 mouse

HP USB Keyboard

Microsoft Xbox 360 Wireless Controller

FLIRC USB

 

Previously using the GUI, the system would only recognize the KB + M, and there would be a device with no properties called "vport0xxx" (x = forgot, sorry).

 

Using the above xml, the system immediately recognized all USB devices, all in <1 minute.

 

Additional to above, I had to go from:

 <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>

 

to

<controller type='usb' index='0' model='nec-xhci'>
      </controller>

 

Hope this helps!

 

Hi All,

 

This may be unrelated in terms of OS as most of the posts mention that the OS being used is Windows, but I'd just like to add that this has successfully solved my problem of trying to get multiple usb devices recognized in Ubuntu 15.10. If anyone needs more information please send me a message and I'll do my best to help.

 

Thanks,

Rj

Share this post


Link to post

Hi Jonp,

 

The USB Controller device comes up in Device Manager, but Windows can't identify the drivers to download. I was able to still mouse-around using Chrome Remote Desktop, but unfortunately no USB capability.

 

I tried searching for NEC-XHCI drivers but the only one I could find was a Dell driver package which wouldn't install on my VM.

 

This is happening  to me as well, however I am running Windows 10.

Share this post


Link to post

Tested on a new VM Win10, all devices continue to work but i still get static with my Soundblaster 2 usb stick, whether is in the 3.0 or 2.0 slot, grrr!

Share this post


Link to post

I tried the above and it seems to work, but I can`t see any of my Flash drives I plugged in, although the Device Manager says the USB is working. I also deleted the USB line about the vendor ID if that matters.

Share this post


Link to post

After trying this my microsoft lifecam webcam started working on my VM. Would not appear to work any other way. Also my USB hub started to work. Thank you very much!

Share this post


Link to post

@jonp, This solved so many of my vm headaches with tying to figure out how to keep the keyboard and mouse working along with the virtual cd rom drives to simply install windows. Any chance we could at least get a check box to have it added to the vm xml instead of needing to rewrite the xml after evey edit?

 

My mother board and bios settings wont allow me to rip apart the usb hubs, so short of purchasing a pcie card, shutting down the vm to swap in and out usb devices is my only choice, which requires editing the xml manually every time.

Share this post


Link to post

@jonp, This solved so many of my vm headaches with tying to figure out how to keep the keyboard and mouse working along with the virtual cd rom drives to simply install windows. Any chance we could at least get a check box to have it added to the vm xml instead of needing to rewrite the xml after evey edit?

 

This is the default USB controller in unraid 6.2 beta.

Share this post


Link to post
Guest
This topic is now closed to further replies.