我的电脑是基于华硕 Z170i 构建的。它有两个 USB 3.1 Gen2 / 10 Gbit/s 端口。该端口显示为 USB 3.0 端口,该端口的速度为 5000 M。如何在 Linux 中使该端口显示/运行在 USB 3.1 Gen2 / 10 Gbit/s 模式下?
‘lsusb’的输出。显示速度为5000M,即USB 3.0速度。
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
|__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 8: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 8: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 9: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 9: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 13: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 13: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
总线 04 是 USB 3.1 端口。
这里来自dmseg
.上面写着超高速。
[ 1.554071] xhci_hcd 0000:06:00.0: xHCI Host Controller
[ 1.554073] xhci_hcd 0000:06:00.0: new USB bus registered, assigned bus number 4
[ 1.554074] xhci_hcd 0000:06:00.0: Host supports USB 3.0 SuperSpeed
[ 1.554093] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.554104] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[ 1.554104] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.554105] usb usb4: Product: xHCI Host Controller
[ 1.554106] usb usb4: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[ 1.554106] usb usb4: SerialNumber: 0000:06:00.0
[ 1.554258] hub 4-0:1.0: USB hub found
[ 1.554263] hub 4-0:1.0: 2 ports detected
这是来自lspci -v
06:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. ASM1142 USB 3.1 Host Controller
Flags: bus master, fast devsel, latency 0, IRQ 18
Memory at f7400000 (64-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
最后是输出lsusb -vv -s 4:1
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 5.02
iManufacturer 3 Linux 5.2.9-arch1-1-ARCH xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:06:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0
Hub Descriptor:
bLength 12
bDescriptorType 42
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
bHubDecLat 0.0 micro seconds
wHubDelay 0 nano seconds
DeviceRemovable 0x00
Hub Port Status:
Port 1: 0000.02a0 5Gbps power Rx.Detect
Port 2: 0000.02a0 5Gbps power Rx.Detect
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x002b
bNumDeviceCaps 2
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x02
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x0008
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 3
Lowest fully-functional device speed is SuperSpeed (5Gbps)
bU1DevExitLat 0 micro seconds
bU2DevExitLat 0 micro seconds
SuperSpeedPlus USB Device Capability:
bLength 28
bDescriptorType 16
bDevCapabilityType 10
bmAttributes 0x00000023
Sublink Speed Attribute count 3
Sublink Speed ID count 1
wFunctionalitySupport 0x0001
bmSublinkSpeedAttr[0] 0x00050034
Speed Attribute ID: 4 5Gb/s Symmetric RX SuperSpeed
bmSublinkSpeedAttr[1] 0x000500b4
Speed Attribute ID: 4 5Gb/s Symmetric TX SuperSpeed
bmSublinkSpeedAttr[2] 0x000a4035
Speed Attribute ID: 5 10Gb/s Symmetric RX SuperSpeedPlus
bmSublinkSpeedAttr[3] 0x000a40b5
Speed Attribute ID: 5 10Gb/s Symmetric TX SuperSpeedPlus
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
我的问题是如何使该端口工作在 10 Gb/s 模式下?或者将此端口显示为 SuperSpeed+。
答案1
我有四个想法:
- 商业USB3名称非常混乱;现在,更加感谢 USB3.2[1]!由于这个原因,内核只是错误的名称控制器。
- 另一个令人困惑的问题:由于使用双倍通道,10Gbit 的速率加倍[2]。内核显示
5000M
,但它只是每个通道。 - BIOS/EFI 可以禁用它,也许是为了向后兼容。
- Linux 内核不能很好地支持您的 USB 芯片组。
长话短说,请进行基准测试/测试进行检查真实的连接速度!
[1] https://www.theverge.com/ Circuitbreaker/2019/2/27/18243425/usb-3-2-standard-names-connectivity-cables-innovators-forum
[2] https://en.wikipedia.org/wiki/USB_3.0#3.2