qemu/KVM - usb device occasionally disconnects

Well, what an interesting plot twist - turns out my thought-to-be useless efforts to set up a VM to get around my degrading fakeraid controller wasn’t so useless after all.
As a call-center agent I’m forced into home office - oh, btw, before you get the wrong picture of me: I’m not one of those fishy Idians (no offense) working in a scam-center - but I’m working for the big Shell oil company, which started an offspring company in the energy sector - so, I’m doin honest work.
Our IT department specifically required Win10 for the OS - although I can’t see why as we using Citrix anyway - which, as the name and history according to wikipedia suggest - should also have a unix client available. Anyway … nevermind.
So, as I had to get this working quickly, I already got the VM game ready, I now looked for a way to connect my audio interface to it. As I hadn’t time to tinker around a lot I’ve gone the quick and dirty way to use the usb redirect option. Overall it does work very well - but for some reason this very device keeps dropping out every now and then and reconnects itself after a few seconds. So far I got lucky to not have it happen during an active customer call - but I sense it will happen sooner or later. From asking google it seems like using this feature set to usb 3 can lead to some issues, as only usb 2 mode was tested enough so far. So, I tried to set the usb to usb 2 - but this causes even more problems as using the default usb 3 mode. I also didn’t had time yet to try to use vfio and 1-to-1 passthru as with my gpu, but will try that over the weekend.
Did any of you experienced such weird behaviour before?
I have a few thoughts about this problem, but due to time restrictions I wasn’t able to test any of them yet.
As my motherboard does have a few different usb root hubs I already tried changing around the connection to a different one - but the problem persists - so I would guess the root hub isn’t the issue here. As my keyboard and mouse don’t show that issue I even tried switching them around - but still no fix. I even tried to connect it to the physical usb3 root hub on the board - but that made the issue even slightly worse than better.
The next option I’ll try over the weekend is to set the audio interface to vfio and use passthru - if this works at all.
As I’m not experienced enough yet to tinker around with the bare XML or try to start the VM via command line I use the virt-manager gui. So, although it may be an option to go the low-level way I’m lack a lot of experience and can’T afford to get lost during testing to not have a working vm at all, as I require it for work.

Maybe some of you has some ideas if mine fail.

Matt

Hi
It should just be a matter of identifying the USB ID’s and allocating them, should not need vfio for this… I have a keyboard/trackpad hooked up for the qemu machines, it just gets allocated via;


-device usb-host,vendorid=0x05af,productid=0x0808

When vm started it’s present…

From looking at the command line via /proc/<pid> that’s what the virt-manager gui already does.

Hi
When the device is plugged in is it on it’s own root hub, something else that gets disconnected etc?


lsusb -tv

Yes, as my board does have several root hubs for its many different connections (like the ones on the back of the board, then those one can connect front-panel headers to, the “internal” ones like inter-connects on the board) I already tried to use different combinations. Interestingly, the audio interface is the only device that seems to have this issue. All other devices I have connected and passed to the VM don’t show any problems during my 9h shift. It also doesn’t seem to matter to what port I connect the interface to - or if I connect it to the same root hub as other devices like keyboard or mouse are connected to - or connect it to its own root hub.
I also tried to figure out if it’s an issue with linux or the vm - but it looks like it’s an issue with passing it to the vm - as when running it on the linux host os it doesn’t show the issue - only when passed to the vm.
The next option I’ll try is to use vfio on it and using device passthru instead of usbredir - maybe it helps.