1

Trying to figure out why a USB drive isn't working, I plug it in and run dmesg to get:

[101100.860034] usb 6-2: new full-speed USB device number 18 using uhci_hcd
[101100.980060] usb 6-2: device descriptor read/64, error -71
[101101.204071] usb 6-2: device descriptor read/64, error -71
[101101.420051] usb 6-2: new full-speed USB device number 19 using uhci_hcd
[101101.540057] usb 6-2: device descriptor read/64, error -71
[101101.764092] usb 6-2: device descriptor read/64, error -71
[101101.980066] usb 6-2: new full-speed USB device number 20 using uhci_hcd
[101102.388035] usb 6-2: device not accepting address 20, error -71
[101102.500092] usb 6-2: new full-speed USB device number 21 using uhci_hcd
[101102.912066] usb 6-2: device not accepting address 21, error -71
[101102.912093] usb usb6-port2: unable to enumerate USB device

Where can I find documentation on what exactly this information means? For example, what "error -71" means. All I can find online are pages that just describe what the various options for dmesg do.

Jack M
  • 1,310
  • 2
  • 16
  • 32
  • 3
    dmesg does not generate these messages, it just displays what the kernel or other programs wrote to a specific message log. I don't think you will find a general one-for-all documentation, you'll probably rather have to try and identify the source of the actual message you are interested in (by guessing maybe?) and then research on that... Just my thoughts though, not 100% sure I'm correct here. – Byte Commander Jul 08 '17 at 21:08
  • type info dmesg or more precisely info systemd in your console – Egon Stetmann. Jul 08 '17 at 21:09
  • 1
    dmesg can format the messages better: dmesg --kernel --ctime --userspace --decode – waltinator Jul 09 '17 at 00:04

1 Answers1

3

dmesg does not generate the messages. All it does is keep a standard log of what other things tell it.

Usually, things that write to dmesg will include some sort of identifier to show what they are. In this case, your identifier is usb. We can then use our friend Google to find the specific source of the message. In your case, error 71 refers to this:

#define EPROTO      71  /* Protocol error */

If you want to find sources for other messages in dmesg, you need to look at what wrote the message there, and then consult that system's documentation.

For example, if you have something like this, you should look at the documentation for the EXTFS modules:

[37734.973627] EXT4-fs (nvme0n1p2): re-mounted. Opts: block_validity,barrier,user_xattr,acl

The docs will then provide the required information to trace the error. dmesg only aggregates all of these messages.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172