Gentoo Archives: gentoo-user

From: Jack <ostroffjh@×××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB problem/questions (not Gentoo specific)
Date: Thu, 01 Oct 2020 00:17:41
Message-Id: OUZYHJVZ.SUC6ABZY.45VSIWEO@L5VT3QJF.KQAPRXO2.2NEO2VLR
In Reply to: Re: [gentoo-user] USB problem/questions (not Gentoo specific) by Sid Spry
1 Top posting because this is just an interim update - no new real info
2 yet.
3
4 I think part of my problem is that i don't have any real USB3 device to
5 test with. It might end up being reasonable for a USB2 device plugged
6 into a USB3 port to show up connected to a USB2 hub - but that hub is
7 actually part of the USB3 host controller. I have a real USB3 thumb
8 drive arriving soon, so we'll see how that shows up when I connect it.
9
10 Separate but related is my new webcam, which shows up as a USB2 device,
11 although lsusb -v says it is capable of SuperSpeed, which would imply
12 USB3. I have other problems with that device, so I'm not really sure I
13 trust anything it says about itself. I may start a separate thread
14 about it, but not without more research first.
15
16 Jack
17
18 On 2020.09.24 15:35, Sid Spry wrote:
19 > On Tue, Sep 22, 2020, at 7:11 PM, Jack wrote:
20 > > I've got a Ryzen 5 2600 in an MSI B350 Tomahawk motherboard. The
21 > specs
22 > > imply that the CPU produces four USB 3.0 ports and the chipset
23 > produces
24 > > 6 USB 2.0 and four USB 3.1 (although the last four are not available
25 > > with this motherboard.
26 > >
27 >
28 > Even high end motherboards tend to only bring out 1 or 2 root hubs.
29 > That the
30 > chip supports 4 root hubs does not mean all of them were used.
31 > Typically there
32 > are two groups of USB3 and one or two groups of USB2.
33 >
34 > Sometimes it's just one USB3 root hub and they attach all of the USB2
35 > ports to
36 > it, making everything run at USB2 speeds.
37 >
38 > With USB2, hubs are required to have a translation unit that speeds
39 > USB1
40 > packets up to USB2 speeds. Even with these translators you can incur
41 > delays
42 > waiting for slower USB1 devices to respond as they will take ~4x
43 > longer, and
44 > then the buffered data is sped up when it is put on the bus.
45 >
46 > With USB3 there is no such requirement. This would be fine as the
47 > USB2 is
48 > on separate wires but most USB3 silicon seems to be implemented in
49 > such a
50 > way that USB2 transactions slow down the USB3 transactions. In some
51 > cases
52 > this is visible with `lsusb -t`: putting a USB2 device on a USB3 bus
53 > will
54 > downgrade all devices to USB2 speeds (showing USB3 devices that were
55 > 5000M as 480M), and even if it is not visible, you may see transfers
56 > take ~10x
57 > as long.
58 >
59 > I found all of this out when benchmarking flash drives. My
60 > motherboard was
61 > wired such that every important USB3 port shared the keyboard and
62 > mouse
63 > ports. If you plug a USB1.1/USB2 keyboard and mouse in, everything
64 > else
65 > slows down.
66 >
67 > USB3.1 I think explicitly addresses this issue saying that USB3
68 > should always
69 > run at USB3 speeds, but vendors still seem to be churning out broken
70 > motherboards.
71 >
72 > > lsusb shows
73 > > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
74 > > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
75 > > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
76 > > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
77 > >
78 > > lsusb -t shows
79 > > /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
80 > > /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
81 > > /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
82 > > /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
83 > >
84 >
85 > I am pretty sure the pairs of ports are linked. This seems to be a new
86 > development, and I'm not really sure what it means yet.
87 >
88 > > Bus 01 shows 10p because there is a 4 port external hub connected,
89 > so
90 > > that should be the 6 USB 2.0 ports - two rear ports, and two two
91 > port
92 > > headers (JUSB1 and JUSB2)
93 > > Bus 02 is (I assume) advertised by the B350 chipset, but I don't
94 > expect
95 > > it to show up on any physical ports or headers
96 > > Bus 03 is a mystery, as I have no idea where the extra USB 2.0 ports
97 > > are coming from
98 > > Bus 04 should be the USB 3.0 generated by the CPU, and I assume
99 > should
100 > > be what feeds the JUSB3 and JUSB4 USB3 headers
101 > >
102 > > The rear IO panel has 2 USB 2.0 ports, and if I plug anything into
103 > > them, they show up as ports 8 and 9 on bus 1.
104 > > The front of the case has two USB3 ports, which show up on the bus
105 > 1,
106 > > ports 1 and 2 if the connector is in JUSB4 on the mobo, or ports 3
107 > and
108 > > 4 if using JUSB3.
109 > > The three Type-A USB3 connectors on the back show up on bus 3,
110 > ports 1,
111 > > 2, and 4, with port 3 presumably being the Type-C connector. I
112 > don't
113 > > have anything to test in the Type-C port.
114 > >
115 > > I'd be really surprised if the back IO panel on the mobo is
116 > miswired,
117 > > but why are the supposed USB3 ports all showing up as USB2? I have
118 > one
119 > > webcam capable of USB3, but it's only connecting at 480M (per lsusb
120 > -v)
121 > > but it's plug shows the standard USB logo, not the superspeed
122 > version.
123 > >
124 >
125 > Your motherboard technically isn't miswired per the USB spec. But it
126 > is
127 > miswired in the sense de facto none of your ports may support USB3.
128 >
129 > You'd have to do more testing yourself to ensure your system is broken
130 > in the same way mine is, but it is definitely possible. If you get a
131 > response
132 > from the manufacturers please let me know what it was.
133 >
134 > I have a cheap Intel embedded system with this same problem, and a
135 > B350 system from ASRock with suspicious USB3 behavior that I haven't
136 > been able to investigate well.
137 >
138 > Cheers.
139 >
140 > P.S.: Another funny one I have is a B350 motherboard having enough
141 > VFIO groups to do GPU passthrough, but arranged explicitly so you
142 > can't compartmentalize devices. Everything except the NVMe port is
143 > in one giant group.
144 >
145 > Sounds like false advertising to me.
146 >
147 >
148 >