USB keeps reconnecting (unplug, disconnect) [Unraid 6.8.3, Windows 10]


Recommended Posts

Guys, running out of options here. Please help.

 

In short, USB devices under Windows 10 VM keep reconnecting during the load. Two most common cases: Focusrite 2i2 soundcard resets itself during heavy playback every couple minutes or once a day without heavy use, and simple Logitech webcam also reconnects itself during Skype meeting, loosing audio and video. 

 

Things tried and noted:

  1. USB device keeps working after being unplugged and plugged back.
  2. VIA Technologies VL805 USB 3.0 Host Controller is used for passthrough. Drivers detected as USB 3 with no issues. Another VL805 controller was used before that with the same result.
  3. Tried different VM USB Controller settings: nec XHCI and qemu XHCI. Doesn't help.
  4. Tried direct USB device passthrough, connected to motherboard USB (soundcard) - no difference.
  5. Noticed that when unraid was limited by 2 cores (4 threads) USB issue was really bad, e.g. resetting every couple minutes during the load, mouse and keyboard too were freezing for couple seconds. Letting unraid to use 3 cores helps, but resets are still happening. Cores are the first ones in the list of course.

 

Overall feeling is that USB is choked by some weird issue and have no idea what else to do. Any advise? Thanks!

Edited by Omen
Link to comment
10 minutes ago, testdasi said:

Are you passing through the controller as a PCIe device?

Or are you plugging the devices to the USB controller and then attach those devices to the VM via libvirt (hence nec XHCI / qmu XHCI relevance).

Correct, passing as PCIe device. BTW also tried VFIO-PCI plugin, it makes things easier, but doesn't help with the issue.

Tried both options. Issue persists in both cases.

Link to comment
30 minutes ago, Omen said:

Correct, passing as PCIe device. BTW also tried VFIO-PCI plugin, it makes things easier, but doesn't help with the issue.

Tried both options. Issue persists in both cases.

Then I suspect it could be due to your sound card e.g. connection, power, incompatability etc. Typically a passed through controller works is 99.99% of cases.

Link to comment
9 minutes ago, testdasi said:

Then I suspect it could be due to your sound card e.g. connection, power, incompatability etc. Typically a passed through controller works is 99.99% of cases.

Tried one more thing was missing for a while - got rid of USB extension cable and connected USB card with a short cable. Seems like it helped. Weird that it was working fine with this cable on plain Win 10.

Link to comment

Still, not working correctly. At least once a day it fully disconnects USB devices, both Focusrite Scarlett 2i2, mouse and keyboard, as if the power for USB controller was out for a second.

 

I'm thinking, now it happened when I opened a share an it spinned a hard drive. Sometimes it happens during gaming - also a higher power consumption. Maybe it's somehow related to that? Still can't get why, I have Corsair HX750 PSU, and I have this USB issue right from the start of using Unraid on exactly the same PC configuration.

Link to comment
  • 3 weeks later...

Couple more insights on the topic.

  • Booted the same PC on bare metal Win 10 install and everything is working perfectly, so the issue is obviously in Unraid managing USB ports. Moreover, Win 10 installation is the same!
  • Connected USB devices directly to the motherboard, removed PCIe USB card, passed USB devices to VM - devices are working, but the issue is still randomly appearing, devices are reconnected and I have to use Hotplug USB plugin to make them work again.
  • More power or less power doesn't correlate with the issue occurrences. Overclocking CPU and memory, as well as undervolting it or using standard settings - doesn't help.

 

One more big thing. Here are right after the boot of VM:

Jul 30 20:41:33 Omen-PC kernel: usb 3-12: reset low-speed USB device number 7 using xhci_hcd
Jul 30 20:41:34 Omen-PC kernel: usb 3-11: reset full-speed USB device number 6 using xhci_hcd
Jul 30 20:41:34 Omen-PC kernel: usb 3-3.1: reset high-speed USB device number 4 using xhci_hcd
Jul 30 20:42:06 Omen-PC kernel: usb 3-12: reset low-speed USB device number 7 using xhci_hcd
Jul 30 20:42:07 Omen-PC kernel: usb 3-11: reset full-speed USB device number 6 using xhci_hcd
Jul 30 20:42:07 Omen-PC kernel: usb 3-3.1: reset high-speed USB device number 4 using xhci_hcd
Jul 30 20:42:08 Omen-PC kernel: Did not find alt setting 3 for intf 0, config 1
Jul 30 20:44:55 Omen-PC ntpd[2665]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Jul 30 20:45:02 Omen-PC kernel: usb 3-12: reset low-speed USB device number 7 using xhci_hcd
Jul 30 20:45:02 Omen-PC kernel: usb 3-11: reset full-speed USB device number 6 using xhci_hcd
Jul 30 20:45:03 Omen-PC kernel: usb 3-3.1: reset high-speed USB device number 4 using xhci_hcd
Jul 30 20:45:03 Omen-PC kernel: Did not find alt setting 3 for intf 0, config 

See how in just a minute it resets USB device. Clock issue is also weird, this topic is not valid for me: 

 

Edited by Omen
Link to comment

Finally, got some solid results! In short, the root issue is in USB sound card (Focusrite Scarlett 2i2) working not correctly with VM USB controller.

Fix: set VM USB Controller to 2.0 (EHCI), reinstall sound card drivers and now it works fine.

Still hear minor cracks here and there, which is also an issue. But connection is rock solid and devices no longer resetting.

Edited by Omen
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.