1

How to display usb device generation number?

I need to confirm usb storage device is usb 3.0. Is it possible to confirm on command line USB device generation? Not the port, port already confirmed as 3.0 via lsusb and lsusb -t, color, etc.

Tried to figure out if USB drive device is 3.0 or 2.0 using gnome disks benchmark

Sample Size: 10.0 MB

Average Read Rate: 13.5 MB/s (100 samples)

Average Access Time: 0.53 msec (1000 samples)

2 Answers 2

6

To determine a device’s USB generation, run lsusb -v and look for bcdUSB.

To determine the actual connection speed for a given device, run lsusb --tree; the connection speed will be given at the end of each entry (up to 12M for USB 1, 480M for USB 2, 5000M for USB 3.0).

3
  • flash drive Bus 002 Device 001: lsusb -v shows usb bcdUSB 3.10 but lsusb --tree shows 480M.... so @Marcus Müller may have a point to consider to solve the problem (bottleneck)
    – debdragon
    May 8, 2023 at 21:37
  • Yeah as said, even USB 2 is significantly faster than your storage. The USB generation hence is completely irrelevant. May 8, 2023 at 23:22
  • thank you - this answer will help someone needing to determine if device is usb2 or usb3
    – debdragon
    May 9, 2023 at 20:40
0

But the port will tell you which generation it is, because USB 3 has logically a separate hierarchy than USB 2; it's just that these two hierarchies get merged on the host side. In fact, lsusb --tree even shows the theoretical connection speed right next to the device, so that's what I'd ask.

It is connected to an xHCI if, and only if, it speaks USB 3.

Other than that being USB 3, this tells you exactly nothing. The fact that your bus is faster means nothing on the speed or quality of storage. You can have good USB2 thumb drives that saturate a USB 2.0 HiSpeed bus at 480 Mb/s (30 to 50 MB/s), and you can have shitty USB3 thumb drives that achieve transfer speeds below 2 MB/s.

Your benchmark shows rates that are far below even USB2 capabilities, so your whole question is moot. You have a very slow storage device, no matter the USB generation. USB is not the bottleneck here.

5
  • yep, I had the split hierarchy in mind in the original version of my answer, then went back and edited the answer: bus-logical, USB3 (SS) data simply flows in a separate bus tree, which is "parallel" to the USB2 tree (which still needs to be there even for SS devices, because negotiation of 3.0 happens through USB2) May 8, 2023 at 20:51
  • how/steps to diagnose the cause of the bottleneck ? my comment to @Stephen Kitt possibly highlights your point about usb 3.0 low quality vs usb 2.0 high quality. i will try an original sandisk flashdrive that normally is high quality and performs as 3.0 on other machines to diagnose if the problem is usb or os or laptop(??) . could the laptop specs create a bottleneck like i am encountering ? if so what hardware component so i can check.
    – debdragon
    May 8, 2023 at 21:41
  • Because your benchmark showed the drive doesn't even come close to saturation of USB 2 speeds, I really don't see what is left to investigate. That drive is slow. May 8, 2023 at 23:23
  • Weird, I only got shown your edit just now! My comment was based on your original answer. May 9, 2023 at 5:27
  • @MarcusMüller thank you - impressed you were able to spot on diagnose the problem from my question. used a better usb and like magic everything works as it should. Wish two answers could be marked as correct.
    – debdragon
    May 9, 2023 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .