Loading...
X

How to determine the type and speed of a USB port

How to determine the version and speed of the USB port?

It would seem that to say which version and speed of the USB connector on a computer is a trivial task. As it was before? The black connector is USB2 and the blue connector is USB3. Right? This information has long been outdated, in modern motherboards and laptops, blue has been abandoned as a sign of a fast USB socket.

What USB versions are there

You may already know notation such as

  • USB 4
  • USB 3.0 and USB 3.1 Gen 1
  • USB 3.1 and USB 3.1 Gen 2
  • USB 3.2 and Gen 2×2

All this became so complicated and incomprehensible that it was all considered obsolete and SuperSpeed USB with numbers was invented.

What does the labeling of USB ports mean

Surely there should be a hint about the version and speed of the USB ports next to the connectors.

Let's take a look at the following photo of the ports on my laptop:

First, all three of these ports are USB ports, even the small one! The small one is USB-C / USB Type C.

Second, what do these letters “SS” and the number mean?

The port without the letters “SS” is old USB 2.0. The small port with “SS” and number 10 is SuperSpeed USB 10 Gbps, formerly called USB 3.1 Gen 2.

Okay, we've figured out two out of three ports, what about the third port? It is clear that this is some version of SuperSpeed, but which one?

How to determine in Linux which port my computer has: USB3, USB3.0, USB3.1, USB3.2, or USB4

To check the USB version run the following command:

sudo lsusb -v | grep -i bcdusb

The conclusion is not very informative, we can only say with confidence that the system has USB ports 3.1 and 2.0 and that two devices are connected to USB 3.1, and the rest are connected to USB 2.0. Don't be surprised at the number of devices – some of them are internal devices (like a webcam) and are connected to a USB hub inside the case.

To figure out which devices use USB 3.* and what their speed is, you need to delve into the properties of the system hardware.

Let's start with the command

lsusb

As you can see in the screenshot, this computer has root hubs 3.0 and 2.0:

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

USB host controllers are PCI devices, so you can see them with lspci:

lspci | grep USB

Find “xHCI” which is USB3.

The following command will also show the available xhci controllers or hubs. The operating speed is shown at the end of each line. USB3 speed starts from 5000M.

Let's compare the output of the two commands:

lsusb -t | grep xhci
lsusb | grep hub

As you can see, the 2.0 root hub has a speed of 480M, and the 3.0 root hub has a speed of 10000M.

To determine which USB port the flash drive is connected to and its speed, connect the device you are interested in and run

lsusb -t

Find the phrase “Mass Storage” – these are disks and flash drives. The parent of this node corresponds to the USB port where you connected your flash drive. The last figure is speed.

How USB Versions and Speed Compare

In the screenshot above, we could see the speed of 10000M, but which version of USB is it exactly?

Look at the following data:

  • 12M = 12MBit/s = USB1
  • 480M = 480MBit/s = USB2
  • 5000M = 5000MBit/s = USB3.0, also known as USB3.1 gen. 1
  • 10000M = 10000MBit/s = USB 3.1, also known as USB 3.1 Gen 2
  • 20000M = 20000MBit/s = USB 3.2, also known as USB 3.2 Gen 2×2; or it could be USB4 Gen 2×2 or USB4 Gen 3×1
  • 40000M = 40000MBit/s = USB4 Gen 3×2

In fact, the names like USB 3.* are considered obsolete since only the connection speed really matters. Currently, the following designations are considered “relevant”:

  • SuperSpeed USB 5 Gbps
  • SuperSpeed USB 10 Gbps
  • SuperSpeed USB 20 Gbps

lsusb.py script to display USB devices in an understandable way

The lsusb.py script conveniently displays information about USB hubs and devices connected to them.

To display information, just run on the command line:

lsusb.py

You may get an error that the lsusb.py command was not found. The lsusb.py script comes with the usbutils package, which contains another lsusb program we already use. For some reason, in some distributions the usbutils package is distributed without the lsusb.py script. To install it run the following commands:

curl https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/plain/lsusb.py.in > lsusb.py
chmod +x lsusb.py
sudo mv lsusb.py /usr/bin/lsusb.py

Lines starting with usb1, usb2, etc. are USB hubs.

Lines that start with 1-1, 1-3, 2-2, and so on are USB devices.

In addition to the manufacturer and device identifiers, each line in square brackets contains information about version, speed, and maximum power consumption, for example

  • USB 3.10
  • 5000 Mbps
  • 304mA

Device names are shown in parentheses.

UsbView – viewing a tree of USB devices in a graphical interface

You can find out the speed of USB connectors and devices with a program such as UsbView, which provides very detailed technical information.

USBView is a small GTK application that shows what a USB bus device tree looks like. It shows a graphical representation of the devices that are currently connected, showing the topology of the USB bus. It also displays information about each individual device on the bus.

Installing UsbView on Debian, Kali Linux, Linux Mint, Ubuntu and their derivatives:

sudo apt install usbview

Installing UsbView on Arch Linux, Manjaro, BlackArch and their derivatives:

sudo pacman -S usbview

During installation, the program will inform you that for it to work, you need to run the command

mount -t debugfs none /sys/kernel/debug

or add the line to the /etc/fstab file

none /sys/kernel/debug debugfs defaults 0 0

Instead, you can get by by running the program with superuser rights:

sudo usbview

The screenshot shows that the computer has 2 xHCI host controllers, one of them is version 3.10:

There are two devices connected to the controller version 3.10, one of the devices version 3.00 (note the line “USB Version: 3.00”).

And the other device is version 3.10:


Leave Your Observation

Your email address will not be published.