Re: Strange behavior of USB PCIe add-in cards

From: Harris Snyder <harris.snyder_at_gmail.com>
Date: Fri, 19 Aug 2022 14:55:36 UTC
Hi Daniel,

Thanks very much for your reply. Re-reading my initial email, it's
obviously missing some information, for which I apologize. Chiefly,
- I do want to go with a PCIe card instead of a hub, because the
ultimate goal is to use the card with PCIe passthrough in bhyve.
- Also, I am indeed on an AMD x86_64 system (Epyc rather than Ryzen,
but very likely suffers from the same issue you've mentioned) I'll
definitely search the mailing list for other people's reports of this.
The motherboard is a supermicro H11DSi and the CPUs are 2x Epyc 7003.
There's no chipset on the motherboard in the traditional sense for
desktop PCs.

I have ordered a third controller (built around the Renesas uPD720202,
which is also on the old side I think) based on several
recommendations, so we will see if that chip fares any better. In the
meantime, I will try:
- Updating the firmware on both of the cards that I have (I'm willing
to accept the bricking risk).
- Checking the bios for PCI timer latency
- Searching the mailing list for reports of usb stuttering on Ryzen
systems and possible solutions.

Thank you very much for all of your suggestions!

Harris

On Wed, Aug 17, 2022 at 1:08 PM Daniel Engberg
<daniel.engberg.lists@pyret.net> wrote:
>
> On 2022-08-12 22:34, Harris Snyder wrote:
> > Hello everyone,
> >
> > I have two USB3 PCIe cards (different chipset vendors) that are both
> > exhibiting the same symptoms:
> > - They are detected and attached to the xhci driver.
> > - They sort of work (a usb stick seems to work for file IO)
> > - When an interactive device (e.g. USB sound card, mouse, or keyboard)
> > is connected, they seem to drop the overwhelming majority of input
> > events. For example, the mouse moves jerkily, at intervals of several
> > seconds. Most keypresses on a keyboard are missed, and occasionally a
> > "key up" event seems to be missed and the same key is typed
> > repeatedly. A USB sound card has stutters and hitches in the audio
> > output.
> >
> > Does anybody recognize this behaviour or know of a solution? I have
> > tried:
> > - A different PCIe slot
> > - Two different PCIe USB3 cards from different vendors (and different
> > chipset vendors - VIA and ASMedia). One of the cards uses the VIA
> > VL806, which some users on the FreeBSD forum have reported working...
> >
> > I'm using CURRENT, but about 2 weeks behind...
> >
> > Thanks,
> > Harris
>
> Hi,
>
> Early USB 3 controllers were quite unstable and unreliable so unless
> you're on very old hardware I'd suggest that you look for a decent USB
> hub instead if you need more ports. In my experience VIA (Labs) VL817
> works very well in general, one device that uses it is ORICO MH4U-U3 or
> at least used to. You might want to go for the newer VL822 controller
> however finding out what chipset is used can be a bit hard but according
> to the product images this one uses it for example
> https://www.amazon.com/HOYOKI-Powered-Adapter-Slippter-Keyboard/dp/B098D7H5XD
> . I've also used one hub based on ASMedia ASM1074 which worked fine for
> my use case but the quality of the product was very questionable, this
> controller doesn't seem to be very common and if you find one it's
> usually a very poorly made product overall. There are other vendors too
> such as Cypress, Fresco Logic, Genesys Logic etc but when I looked
> they're either very rare (Cypress and Fresco Logic) or people have very
> mixed experiences (Genesys Logic) however their newer ones might be
> better such as GL3590.
>
> But if you want to give the USB PCIe cards a go the VIA one your
> mentioned is very old so I would highly suggest that you try to update
> the firmware. Unforunately that usually requires you to search various
> forums etc to find the flashing utility and firmware. Having a quick
> look this page ( https://github.com/jpmorrison/VL805 ) seems to be
> relevent and the other ones it links too. Do keep in mind that you may
> brick your card if you flash using wrong firmware or if it process hangs
> for whatever reason. This is also true for your ASMedia card, some
> controllers even include "easter eggs". See
> https://github.com/smx-smx/ASMTool ,
> https://github.com/cyrozap/asmedia-xhc-re for more information. In some
> BIOSes you have a toggle for "PCI Timer Latency" option, usually you
> want to keep this at 32 or 64 which usually is the default may also be a
> cause.
>
> Regarding your peripherals, are they known to be working and/or have
> your tried using the motherboard chipset controller instead? There are
> also reports of stuttering using Ryzen systems which may be what you're
> using (search the mailing lists for more information).
>
> Providing what hardware (mainboard, cpu) are you using and arch (i386,
> amd64) would also be helpful in trying to debug your issue.
>
> Best regards,
> Daniel