archedraft

***GUIDE*** Passthrough Entire PCI USB Controller

Recommended Posts

3 hours ago, saarg said:

xen-pciback.hide= is just another method to hide the devices so it's not used by any other driver, but instead of using the ID it uses the PCI number. This is a better way if you have to devices with the same ID, but only want to hide one of them. 

Using this will not make the device show up in the other devices list as it's not bound to the vfio driver. 

You can probably use both xen-pciback.hide and vfio-pci.ids at the same time. 

 

 

What think I need to do is bind both of my USB3 PCI-Express cards to the vfio-pci driver or does the xen-pciback.hide option make it so the kernel will never try to use the two devices?  I attach them to different virtual machines.  When I tried this using the ID 1b6f:7052, one of the cards worked and it locked the other one up.  Currently I am not binding the vfio-pci driver to either card and so far no issues but I would really rather not have the kernel ever touch them if possible.  

Edited by csmccarron

Share this post


Link to post
Share on other sites
12 hours ago, saarg said:

xen-pciback.hide= is just another method to hide the devices so it's not used by any other driver, but instead of using the ID it uses the PCI number. This is a better way if you have to devices with the same ID, but only want to hide one of them. 

Using this will not make the device show up in the other devices list as it's not bound to the vfio driver. 

You can probably use both xen-pciback.hide and vfio-pci.ids at the same time. 

 

@methanoid

Looks like you have a space after vfio-pci.ids=

 

Thanks... missed that!

Share this post


Link to post
Share on other sites
10 hours ago, csmccarron said:

 

What think I need to do is bind both of my USB3 PCI-Express cards to the vfio-pci driver or does the xen-pciback.hide option make it so the kernel will never try to use the two devices?  I attach them to different virtual machines.  When I tried this using the ID 1b6f:7052, one of the cards worked and it locked the other one up.  Currently I am not binding the vfio-pci driver to either card and so far no issues but I would really rather not have the kernel ever touch them if possible.  

 

The kernel should not try to use the two devices with pciback.hide.

I don't know how they work behind the scene, so don't know if it will work better with pciback.hide than with vfio-pci.ids. 

 

Share this post


Link to post
Share on other sites
2 hours ago, saarg said:

 

The kernel should not try to use the two devices with pciback.hide.

I don't know how they work behind the scene, so don't know if it will work better with pciback.hide than with vfio-pci.ids. 

 

 

Thanks for the information, I will try it out when I get back from Michigan and let you know how it worked out.

Share this post


Link to post
Share on other sites

In an effort to decrease latency, I want to move from a Synergy setup to a physical USB switcher to share keyboard and mouse between my Win10 Gaming VM and my MacBook.

 

Currently I passthrough a wired USB Xbox 360 controller to my Win10 Gaming VM. I did a test where I unplugged it and plugged it back in to see if it would pop back up in Windows. Sadly it didn't until I rebooted the VM.

 

So I'm guessing I need to pass through my motherboard USB Controller to get plug-and-play to work, especially when the USB switcher comes into play.

 

Here's the output of the commands. I'm guessing I won't be able to do this with my C236 WSI motherboard? :(

root@Unraid:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

root@Unraid:~# lsusb                                                                                    
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 006: ID 045e:028e Microsoft Corp. Xbox360 Controller
Bus 001 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additionally, I can't add another PCI-e card since it's an ITX board.

Edited by spencers

Share this post


Link to post
Share on other sites
6 minutes ago, spencers said:

In an effort to decrease latency, I want to move from a Synergy setup to a physical USB switcher to share keyboard and mouse between my Win10 Gaming VM and my MacBook.

 

Currently I passthrough a wired USB Xbox 360 controller to my Win10 Gaming VM. I did a test where I unplugged it and plugged it back in to see if it would pop back up in Windows. Sadly it didn't until I rebooted the VM.

 

So I'm guessing I need to pass through my motherboard USB Controller to get plug-and-play to work, especially when the USB switcher comes into play.

 

Here's the output of the commands. I'm guessing I won't be able to do this with my C236 WSI motherboard? :(


root@Unraid:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

root@Unraid:~# lsusb                                                                                    
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 006: ID 045e:028e Microsoft Corp. Xbox360 Controller
Bus 001 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additionally, I can't add another PCI-e card since it's an ITX board.

 

Why don't you try FIRST and then report back?? ;)  And you might decide that fiddling with EHCI/XHCI in BIOS may separate your USB2 and USB3 controllers. It's in this thread (works on my Gigabyte board and others too). Then you would have two USB2 controllers (in effect) and leave unRAID stick on one, passthrough the other.

Share this post


Link to post
Share on other sites
5 hours ago, spencers said:

In an effort to decrease latency, I want to move from a Synergy setup to a physical USB switcher to share keyboard and mouse between my Win10 Gaming VM and my MacBook.

 

Currently I passthrough a wired USB Xbox 360 controller to my Win10 Gaming VM. I did a test where I unplugged it and plugged it back in to see if it would pop back up in Windows. Sadly it didn't until I rebooted the VM.

 

So I'm guessing I need to pass through my motherboard USB Controller to get plug-and-play to work, especially when the USB switcher comes into play.

 

Here's the output of the commands. I'm guessing I won't be able to do this with my C236 WSI motherboard? :(


root@Unraid:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

root@Unraid:~# lsusb                                                                                    
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 006: ID 045e:028e Microsoft Corp. Xbox360 Controller
Bus 001 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additionally, I can't add another PCI-e card since it's an ITX board.

 

 

This is why i really dont like the layout of having the option to assign USB devices without passing through the usb controller.  certain devices dont work correctly when it is done.  and then youre stuck guessing if something broke or not.  I believe other people in here have had the same problems with xbox controllers/receivers.  typically the worst is when they try adding multiple xbox controllers/receivers iirc.  

 

passing through a controller is a pita as shown, but once you do it, its worth it.  makes everything a whole lot easier.  

Share this post


Link to post
Share on other sites
19 hours ago, methanoid said:

 

Why don't you try FIRST and then report back?? ;)  And you might decide that fiddling with EHCI/XHCI in BIOS may separate your USB2 and USB3 controllers. It's in this thread (works on my Gigabyte board and others too). Then you would have two USB2 controllers (in effect) and leave unRAID stick on one, passthrough the other.

Thank you for the tip! I’ll look into that in this thread. I don’t need USB3 passthrough fortunately so if I can just passthrough one USB2 port, I’d be set! Thanks again! My USB switcher arrives Monday so I’ll be sure to provide an update even though my use case is pretty specific. 

Share this post


Link to post
Share on other sites

So I've done this and it's all well and good, but for some reason my VM (win10) decided to go to sleep whilst I was away. And since then, the USB3 PCIe card doesn't work in the VM. It appears in the Edit VM bit etc, but doesn't appear in windows. It also doesn't passthrough power (ie: plug in phone, doesn't charge)

 

Any ideas?

Share this post


Link to post
Share on other sites
So I've done this and it's all well and good, but for some reason my VM (win10) decided to go to sleep whilst I was away. And since then, the USB3 PCIe card doesn't work in the VM. It appears in the Edit VM bit etc, but doesn't appear in windows. It also doesn't passthrough power (ie: plug in phone, doesn't charge)
 
Any ideas?
Reboot the server? Maybe redo the VM and disable sleep (sure the LT guide tells u too)


Sent from my Redmi 4X using Tapatalk

Share this post


Link to post
Share on other sites

Tried that, rebooting didn't seem to work this time. Will try again at some point. And sleep was most definitely disabled, and still is. I read somewhere that it could have been suspended due to something running out of space

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.