[PLUG] USB 3.x drivers

Ben Koenig techkoenig at gmail.com
Thu Oct 31 05:44:23 UTC 2019


On Wed, Oct 30, 2019 at 9:22 PM Chuck Hast <wchast at gmail.com> wrote:

> Konfuse me, I am interested, I figured that the 3 and above (blue colored
> ports) were probably separate.
>

Ok then, you asked for it. This may be the most amazing wall of internet
text to ever grace this mailing list. I am in no way liable for any costs
or damages incured as a result of this message.

USB2 defines mostly speed, and a simple power supply feature. The power
provided by USB2 is barely enough for an external HDD. High end hard drives
can't actually be powered reliably by a USB2 connection, so most of the
external enclosures have low-end, 5400RPM drives. It's not a super complex
connector.

For calculating speed, use the following rule...
he theoretical maximum speed of you device will always be equal to the
SLOWEST component in the system. To find this component, start with the
host controller and measure each port, cable, connector, and device from
the controller on your mainboard to the device sitting on your desk.

# The ULTIMATE USB speed list !
USB 2.x        : 480 Mb/s
USB 3.x        : 5000 Mb/s (5 Gb/s as seen on product labeling)

USB 3.1 gen1   : 5000 Mb/s
USB 3.1 gen2   : 10000 Mb/s (10 Gb/s on product labeling)

USB 3.2 gen1x1 : 5000 Mb/s
USB 3.2 gen2x1 : 10000 Mb/s

USB 3.2 gen1x2 : 10000 Mb/s
USB 3.2 gen2x2 : 20000 Mb/s

If we look at all USB devices being sold on the market TODAY (2.x is still
around, 1.x is not) you can see that all USB ports can be divided into one
of 4 different groups based on nothing other than speed. A mainboard
manufacturer may decide to colorize their ports to make it easier for the
user to identify the differences. However, there is no industry standard
for which colors should be used in this, so it breaks down into a wild west
scenario.

To make matters worse, all I have done is organize the specification by
speed. USB Revision 3.0 brings more than just improvements to speed. Many
companies gloss over the additional features added to the specification.
This includes advanced power management and other features that I honestly
don't fully understand. This trend continues with 3.1, and 3.2. While the
protocol demands backwards-compatibility, this requires trust that your
motherboard, cable, connector, OS, driver, and external HDD vendor all
implement the protocol as defined by the standard. If any of these
components fails to meet the spec (or is counterfeit) then the protocol
collapses and shit hits the fan real quick.

For best results, please make sure your USB "client" implements the same
features as your USB "host". :)


So I've described speeds, I've mentioned power management. What else? Lets
talk about the PSU!

# Power management
USB ports include features for "bus powered devices". By delivering power
over USB you can reduce the number of cables required to connect an
external RAID array, or eGPU. Sounds great, less cables! But what if my
port doesn't provide enough power? Sucks to be you. I've seen storage
devices sporadically disappear because a USB port doesn't implement the
full spec, or the spec differs from the device that was connected. This
changes slowly from version to version.

Case in point, my company used to sell a USB-C connected RAID enclosure.
This was a 2 bay RAID 1 device that was bus powered by the USB-C connector
of a Mac. This worked great, until....

# APPLE HAS A USB WHITELIST
In order to create the perfect closed system, Apple disables certain
features on USB devices that are not Certified by Apple. This means that a
USB 3.x port may only provide power as a USB2 port, even if it still gets
the speed. But why, you ask, does Apple have a whitelist???

I'm glad you asked! Many USB-C connectors on Mac systems are not actually
USB. They are Thunderbolt!

# WTF is Thunderbolt?
Thunderbolt is a PCIe-based host controller that is "compatible with" USB
standards. However, it is not USB, it runs through a completely different
driver stack, and it only exists on certain Intel chipsets.

This adds complexity. Complexity adds potential for failure. Potential for
failure means the end user is gonna have a bad time.

# Am, I done? NO, OF COURSE NOT.
Someone here expressed concern that plugging different devices into your
ports can result in the slower device taking precedence, lowering the
overall speed of the bus. e.g. a 2 port USB2 host will act like a USB 1
host if either of the ports has a USb1 device attached.

Does this happen?             Yes.
Is this supposed to happen?   No.
Why does this happen?         Read on!


# USB is a hub system
The controller has hubs
hubs have ports.
Each port may (or may not) have a device
oh and hubs can be devices too (hubs inside hubs inside hubs...)

A high quality USB host controller will provide a single port hub, and
allocate full speed and power to that one port, in accordance with whatever
USB version it implements. a LOW end controller will spread the wealth
among 4 ports.

A low of low end (read: cheap) computers actually use 4 port hubs that
struggle if all the ports are filled. The expectation is that most of these
ports are used for low-power HID devices (e.g. mouse/keyboard). On these
computers a wireless dongle for bluetooth or wifi will often appear to
intermittently disconnect. external HDD's will disappear and reconnect,
prompting a replay of the filesystem journal and, on occasion, catastrophic
filesystem failure. Also known as "data loss".

High end computers typically have 2 port hubs that are actually capable of
driving 2 ports at the same time. That said, there are so many "versions"
of USB in terms of features that it makes sense tro differentiate them so
that the user can enjoy superior UPTIME!


# So, to explain the difference between the connectors on the OP's x470
mobo:
The x470 chipset includes a USB host controller with 4 hubs

1) 4-port USB2 hub for simple devices connections
2) 2 port USB 3.1 hub for 5G transfer speeds over USB type A ports
3) 2 port USB3.1 hub for super fancy USB-c devices. Your USB-C port is
sharing rent with a type A connector. You may notice reliability issues if
you fill both ports with power hungry devices since power delivery is
likely being shared
4) your front panel port is apparently super fast. They achieve 10G speeds
by taking a 2 port, 5G hub and smashing the ports together. Double the
bandwidth, double the speed, right?


In addition, you have the new ASmedia awesome-sauce for SUPER FANCY
xx360_NOSCOPExx in LOW LATENCY VIRTUAL REALITY ohhh SNAAAAAP

# ASmedia
makes USB chipsets, and a lot of the new AMD Ryzen systems are using them
for the high end connections. They are high speed, with better-than-average
power delivery, often labeled for use with VR headsets. Bad things happen
when you plug a VIA USB device into ASM1142/2142 host controllers. Don't
ask.

I have a couple of those ports on my x370 mobo. They glow bright red and
have a fancy "VR Ready" logo next to them. I turn my computer off at night
because the glow keeps me awake. I'm somewhat jealous of the light-blue
ports Rich has :(

# So... what does this actually mean?
Don't clump your devices. The standard is flexible and it works.

BUT.. if you stuff all your mission critical devices into the same hub, it
starts to drop connections. devices will come and go, and you'll get all
kinds of strange software errors. Basically:
1) colors represent a group of ports
2) colors do NOT represent speed or reliability
3) 4 port hubs are bad.
4) Never plug a hub into a hub.


And with that, my closing thought is an Intel Whitepaper outlining RF
interference caused by USB3.0 ports.
https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/usb3-frequency-interference-paper.pdf



More information about the PLUG mailing list