Gentoo Archives: gentoo-user

From: Sid Spry <sid@××××.us>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB problem/questions (not Gentoo specific)
Date: Thu, 24 Sep 2020 19:35:27
In Reply to: [gentoo-user] USB problem/questions (not Gentoo specific) by Jack
1 On Tue, Sep 22, 2020, at 7:11 PM, Jack wrote:
2 > I've got a Ryzen 5 2600 in an MSI B350 Tomahawk motherboard. The specs
3 > imply that the CPU produces four USB 3.0 ports and the chipset produces
4 > 6 USB 2.0 and four USB 3.1 (although the last four are not available
5 > with this motherboard.
6 >
8 Even high end motherboards tend to only bring out 1 or 2 root hubs. That the
9 chip supports 4 root hubs does not mean all of them were used. Typically there
10 are two groups of USB3 and one or two groups of USB2.
12 Sometimes it's just one USB3 root hub and they attach all of the USB2 ports to
13 it, making everything run at USB2 speeds.
15 With USB2, hubs are required to have a translation unit that speeds USB1
16 packets up to USB2 speeds. Even with these translators you can incur delays
17 waiting for slower USB1 devices to respond as they will take ~4x longer, and
18 then the buffered data is sped up when it is put on the bus.
20 With USB3 there is no such requirement. This would be fine as the USB2 is
21 on separate wires but most USB3 silicon seems to be implemented in such a
22 way that USB2 transactions slow down the USB3 transactions. In some cases
23 this is visible with `lsusb -t`: putting a USB2 device on a USB3 bus will
24 downgrade all devices to USB2 speeds (showing USB3 devices that were
25 5000M as 480M), and even if it is not visible, you may see transfers take ~10x
26 as long.
28 I found all of this out when benchmarking flash drives. My motherboard was
29 wired such that every important USB3 port shared the keyboard and mouse
30 ports. If you plug a USB1.1/USB2 keyboard and mouse in, everything else
31 slows down.
33 USB3.1 I think explicitly addresses this issue saying that USB3 should always
34 run at USB3 speeds, but vendors still seem to be churning out broken
35 motherboards.
37 > lsusb shows
38 > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
39 > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
40 > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
41 > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
42 >
43 > lsusb -t shows
44 > /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
45 > /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
46 > /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
47 > /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
48 >
50 I am pretty sure the pairs of ports are linked. This seems to be a new
51 development, and I'm not really sure what it means yet.
53 > Bus 01 shows 10p because there is a 4 port external hub connected, so
54 > that should be the 6 USB 2.0 ports - two rear ports, and two two port
55 > headers (JUSB1 and JUSB2)
56 > Bus 02 is (I assume) advertised by the B350 chipset, but I don't expect
57 > it to show up on any physical ports or headers
58 > Bus 03 is a mystery, as I have no idea where the extra USB 2.0 ports
59 > are coming from
60 > Bus 04 should be the USB 3.0 generated by the CPU, and I assume should
61 > be what feeds the JUSB3 and JUSB4 USB3 headers
62 >
63 > The rear IO panel has 2 USB 2.0 ports, and if I plug anything into
64 > them, they show up as ports 8 and 9 on bus 1.
65 > The front of the case has two USB3 ports, which show up on the bus 1,
66 > ports 1 and 2 if the connector is in JUSB4 on the mobo, or ports 3 and
67 > 4 if using JUSB3.
68 > The three Type-A USB3 connectors on the back show up on bus 3, ports 1,
69 > 2, and 4, with port 3 presumably being the Type-C connector. I don't
70 > have anything to test in the Type-C port.
71 >
72 > I'd be really surprised if the back IO panel on the mobo is miswired,
73 > but why are the supposed USB3 ports all showing up as USB2? I have one
74 > webcam capable of USB3, but it's only connecting at 480M (per lsusb -v)
75 > but it's plug shows the standard USB logo, not the superspeed version.
76 >
78 Your motherboard technically isn't miswired per the USB spec. But it is
79 miswired in the sense de facto none of your ports may support USB3.
81 You'd have to do more testing yourself to ensure your system is broken
82 in the same way mine is, but it is definitely possible. If you get a response
83 from the manufacturers please let me know what it was.
85 I have a cheap Intel embedded system with this same problem, and a
86 B350 system from ASRock with suspicious USB3 behavior that I haven't
87 been able to investigate well.
89 Cheers.
91 P.S.: Another funny one I have is a B350 motherboard having enough
92 VFIO groups to do GPU passthrough, but arranged explicitly so you
93 can't compartmentalize devices. Everything except the NVMe port is
94 in one giant group.
96 Sounds like false advertising to me.


Subject Author
Re: [gentoo-user] USB problem/questions (not Gentoo specific) Jack <ostroffjh@×××××××××××××××××.net>
Re: [gentoo-user] USB problem/questions (not Gentoo specific) Jack <ostroffjh@×××××××××××××××××.net>