* Re: [gentoo-user] USB problem/questions (not Gentoo specific)
2020-09-24 19:35 ` Sid Spry
@ 2020-09-26 18:09 ` Jack
2020-10-01 0:17 ` Jack
1 sibling, 0 replies; 4+ messages in thread
From: Jack @ 2020-09-26 18:09 UTC (permalink / raw
To: gentoo-user
On 2020.09.24 15:35, Sid Spry wrote:
> On Tue, Sep 22, 2020, at 7:11 PM, Jack wrote:
> > I've got a Ryzen 5 2600 in an MSI B350 Tomahawk motherboard. The
> specs
> > imply that the CPU produces four USB 3.0 ports and the chipset
> produces
> > 6 USB 2.0 and four USB 3.1 (although the last four are not available
> > with this motherboard.
>
> Even high end motherboards tend to only bring out 1 or 2 root hubs.
> That the
> chip supports 4 root hubs does not mean all of them were used.
> Typically there
> are two groups of USB3 and one or two groups of USB2.
The mobo specs say I should have 6 USB2 ports (two on the rear plus two
headers), 4 USB3 ports on the rear (three Type-A and one Type-C,) plus
two USB3 headers. I know there is another USB3 hub in the chipset
which is not available through the mobo. dmesg and lsusb show two USB2
hubs and two USB3 hubs (one of which is clearly the unavailable one.)
Where is the extra USB2 hub coming from and where is the missing USB3
hub?
>
> Sometimes it's just one USB3 root hub and they attach all of the USB2
> ports to
> it, making everything run at USB2 speeds.
But connecting a USB2 device to a USB3 hub will slow things down, but
they should not cause a USB3 hub to be identifed as USB2, just to work
at the lower speed. Am I wrong about this?
>
> With USB2, hubs are required to have a translation unit that speeds
> USB1
> packets up to USB2 speeds. Even with these translators you can incur
> delays
> waiting for slower USB1 devices to respond as they will take ~4x
> longer, and
> then the buffered data is sped up when it is put on the bus.
>
> With USB3 there is no such requirement. This would be fine as the
> USB2 is
> on separate wires but most USB3 silicon seems to be implemented in
> such a
> way that USB2 transactions slow down the USB3 transactions. In some
> cases
> this is visible with `lsusb -t`: putting a USB2 device on a USB3 bus
> will
> downgrade all devices to USB2 speeds (showing USB3 devices that were
> 5000M as 480M), and even if it is not visible, you may see transfers
> take ~10x
> as long.
>
> I found all of this out when benchmarking flash drives. My
> motherboard was
> wired such that every important USB3 port shared the keyboard and
> mouse
> ports. If you plug a USB1.1/USB2 keyboard and mouse in, everything
> else
> slows down.
Again, I'm not yet worried about speeds. I'm worried that every
external port show up connected to a USB2 hub. To me, that means that
xHCI is calling one USB3 hub USB2 or something is not being identified
correctly.
>
> USB3.1 I think explicitly addresses this issue saying that USB3
> should always
> run at USB3 speeds, but vendors still seem to be churning out broken
> motherboards.
>
> > lsusb shows
> > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> > lsusb -t shows
> > /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
> > /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
> > /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
> > /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
> >
What I didn't post is the bits from dmesg that show that bus1 and bus2
are from PCI 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD]
Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge, and bus3 and bus4
are from PCI 1d:00.3 USB controller: Advanced Micro Devices, Inc. [AMD]
Zeppelin USB 3.0 Host controller. Bus2 is clearly from the B350
chipset, and not actually available. Bus1 (10 ports even with the
external hub not connected) seems like the 2 rear USB2 ports plus the
two headers, plus four more ports apparently not actually available.
If bus3 and bus4 are from the CPU, I don't think there should be any
USB2. If they are from the Chipset, then were are the USB3 ports from
the CPU?
>
> I am pretty sure the pairs of ports are linked. This seems to be a new
> development, and I'm not really sure what it means yet.
Pairs of ports, or pairs of busses?
>
> > Bus 01 shows 10p because there is a 4 port external hub connected,
> so
> > that should be the 6 USB 2.0 ports - two rear ports, and two two
> port
> > headers (JUSB1 and JUSB2)
> > Bus 02 is (I assume) advertised by the B350 chipset, but I don't
> expect
> > it to show up on any physical ports or headers
> > Bus 03 is a mystery, as I have no idea where the extra USB 2.0 ports
> > are coming from
> > Bus 04 should be the USB 3.0 generated by the CPU, and I assume
> should
> > be what feeds the JUSB3 and JUSB4 USB3 headers
> >
> > The rear IO panel has 2 USB 2.0 ports, and if I plug anything into
> > them, they show up as ports 8 and 9 on bus 1.
> > The front of the case has two USB3 ports, which show up on the bus
> 1,
> > ports 1 and 2 if the connector is in JUSB4 on the mobo, or ports 3
> and
> > 4 if using JUSB3.
> > The three Type-A USB3 connectors on the back show up on bus 3,
> ports 1,
> > 2, and 4, with port 3 presumably being the Type-C connector. I
> don't
> > have anything to test in the Type-C port.
> >
> > I'd be really surprised if the back IO panel on the mobo is
> miswired,
> > but why are the supposed USB3 ports all showing up as USB2? I have
> one
> > webcam capable of USB3, but it's only connecting at 480M (per lsusb
> -v)
> > but it's plug shows the standard USB logo, not the superspeed
> version.
> >
> Your motherboard technically isn't miswired per the USB spec. But it
> is
> miswired in the sense de facto none of your ports may support USB3.
The specs for the motherboard explicitly say there should be four USB3
ports on the IO backplane. dmesg and lsusb show anything plugged in
there as connected to bus3. I've interpreted the 480M speed as being
USB2, but I suppose it could just be a slow USB3 bus also. I'll need
better info on interpreting the additional bits of info dmesg shows
when accessing that bus/device to be certain.
>
> You'd have to do more testing yourself to ensure your system is broken
> in the same way mine is, but it is definitely possible. If you get a
> response
> from the manufacturers please let me know what it was.
MSI says only that they don't support Linux. They basicall won't do
s**t for me unless I install Windows. I'm currently exploring whether
I can reasonably do that without messing up my entire system. I just
don't trust Windows, so I may end up removing my HDDs and installing a
spare HDD to install Windows just to see what it shows for USB, and to
possibly get some answers out of MSI. It doesn't make me happy.
>
> I have a cheap Intel embedded system with this same problem, and a
> B350 system from ASRock with suspicious USB3 behavior that I haven't
> been able to investigate well.
>
> Cheers.
>
> P.S.: Another funny one I have is a B350 motherboard having enough
> VFIO groups to do GPU passthrough, but arranged explicitly so you
> can't compartmentalize devices. Everything except the NVMe port is
> in one giant group.
I've got 19 iommu groups, and I think all have at least one device, so
that seems good, even if it currently seems irrelevant to me.
>
> Sounds like false advertising to me.
That's what I'm trying to figure out, but I can't imagine ALL users of
this motherboard would accept a total lack of usable USB3 ports.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] USB problem/questions (not Gentoo specific)
2020-09-24 19:35 ` Sid Spry
2020-09-26 18:09 ` Jack
@ 2020-10-01 0:17 ` Jack
1 sibling, 0 replies; 4+ messages in thread
From: Jack @ 2020-10-01 0:17 UTC (permalink / raw
To: gentoo-user
Top posting because this is just an interim update - no new real info
yet.
I think part of my problem is that i don't have any real USB3 device to
test with. It might end up being reasonable for a USB2 device plugged
into a USB3 port to show up connected to a USB2 hub - but that hub is
actually part of the USB3 host controller. I have a real USB3 thumb
drive arriving soon, so we'll see how that shows up when I connect it.
Separate but related is my new webcam, which shows up as a USB2 device,
although lsusb -v says it is capable of SuperSpeed, which would imply
USB3. I have other problems with that device, so I'm not really sure I
trust anything it says about itself. I may start a separate thread
about it, but not without more research first.
Jack
On 2020.09.24 15:35, Sid Spry wrote:
> On Tue, Sep 22, 2020, at 7:11 PM, Jack wrote:
> > I've got a Ryzen 5 2600 in an MSI B350 Tomahawk motherboard. The
> specs
> > imply that the CPU produces four USB 3.0 ports and the chipset
> produces
> > 6 USB 2.0 and four USB 3.1 (although the last four are not available
> > with this motherboard.
> >
>
> Even high end motherboards tend to only bring out 1 or 2 root hubs.
> That the
> chip supports 4 root hubs does not mean all of them were used.
> Typically there
> are two groups of USB3 and one or two groups of USB2.
>
> Sometimes it's just one USB3 root hub and they attach all of the USB2
> ports to
> it, making everything run at USB2 speeds.
>
> With USB2, hubs are required to have a translation unit that speeds
> USB1
> packets up to USB2 speeds. Even with these translators you can incur
> delays
> waiting for slower USB1 devices to respond as they will take ~4x
> longer, and
> then the buffered data is sped up when it is put on the bus.
>
> With USB3 there is no such requirement. This would be fine as the
> USB2 is
> on separate wires but most USB3 silicon seems to be implemented in
> such a
> way that USB2 transactions slow down the USB3 transactions. In some
> cases
> this is visible with `lsusb -t`: putting a USB2 device on a USB3 bus
> will
> downgrade all devices to USB2 speeds (showing USB3 devices that were
> 5000M as 480M), and even if it is not visible, you may see transfers
> take ~10x
> as long.
>
> I found all of this out when benchmarking flash drives. My
> motherboard was
> wired such that every important USB3 port shared the keyboard and
> mouse
> ports. If you plug a USB1.1/USB2 keyboard and mouse in, everything
> else
> slows down.
>
> USB3.1 I think explicitly addresses this issue saying that USB3
> should always
> run at USB3 speeds, but vendors still seem to be churning out broken
> motherboards.
>
> > lsusb shows
> > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> > lsusb -t shows
> > /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
> > /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
> > /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
> > /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
> >
>
> I am pretty sure the pairs of ports are linked. This seems to be a new
> development, and I'm not really sure what it means yet.
>
> > Bus 01 shows 10p because there is a 4 port external hub connected,
> so
> > that should be the 6 USB 2.0 ports - two rear ports, and two two
> port
> > headers (JUSB1 and JUSB2)
> > Bus 02 is (I assume) advertised by the B350 chipset, but I don't
> expect
> > it to show up on any physical ports or headers
> > Bus 03 is a mystery, as I have no idea where the extra USB 2.0 ports
> > are coming from
> > Bus 04 should be the USB 3.0 generated by the CPU, and I assume
> should
> > be what feeds the JUSB3 and JUSB4 USB3 headers
> >
> > The rear IO panel has 2 USB 2.0 ports, and if I plug anything into
> > them, they show up as ports 8 and 9 on bus 1.
> > The front of the case has two USB3 ports, which show up on the bus
> 1,
> > ports 1 and 2 if the connector is in JUSB4 on the mobo, or ports 3
> and
> > 4 if using JUSB3.
> > The three Type-A USB3 connectors on the back show up on bus 3,
> ports 1,
> > 2, and 4, with port 3 presumably being the Type-C connector. I
> don't
> > have anything to test in the Type-C port.
> >
> > I'd be really surprised if the back IO panel on the mobo is
> miswired,
> > but why are the supposed USB3 ports all showing up as USB2? I have
> one
> > webcam capable of USB3, but it's only connecting at 480M (per lsusb
> -v)
> > but it's plug shows the standard USB logo, not the superspeed
> version.
> >
>
> Your motherboard technically isn't miswired per the USB spec. But it
> is
> miswired in the sense de facto none of your ports may support USB3.
>
> You'd have to do more testing yourself to ensure your system is broken
> in the same way mine is, but it is definitely possible. If you get a
> response
> from the manufacturers please let me know what it was.
>
> I have a cheap Intel embedded system with this same problem, and a
> B350 system from ASRock with suspicious USB3 behavior that I haven't
> been able to investigate well.
>
> Cheers.
>
> P.S.: Another funny one I have is a B350 motherboard having enough
> VFIO groups to do GPU passthrough, but arranged explicitly so you
> can't compartmentalize devices. Everything except the NVMe port is
> in one giant group.
>
> Sounds like false advertising to me.
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread