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.