Linux – How to understand and debug USB issues with Linux

driverskernellinuxusb

I’m having an odd problem with a cheap "reverse USB hub" —not sure what the technical name might be— named a Tek Republic TUS-200 USB Sharing Switch. it has one USB port for devices, and two host ports that i can connect two computers and then a switch that conects the device to one computer or another. I use it as a KVM with one usb keyboard and two computers)

It works fine on Windows but that may just be because the laptop I’m using has one USB bus per port… more on that later.

On Linux, Debian 7 3.2.0-4-amd64, it works fine, until there is a considerable data transfer on another device on the same usb bus. For example, copying a large file to a pen drive.

I’m almost sure it has to do with grounding on the reverse-usb, because that does not happen when it is connected to only one computer.

But the question here is not so much to debug said device, but to make sense of the Linux kernel USB system log messages, as I never had to deal with them, and now I could not find absolutely nothing explaining it in layman terms.

Here it is: As soon as I start to transfer to a pen drive on the same USB bus that the reverse-hub is, I get this on dmesg:

Feb  8 16:36:51 dotmatrix kernel: [10807.868649] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -75
Feb  8 16:36:51 dotmatrix kernel: [10807.872669] usb 1-1.6: clear tt 1 (00a0) error -71
Feb  8 16:36:51 dotmatrix kernel: [10807.873710] generic-usb 0003:04D9:A09F.0001: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb  8 16:36:51 dotmatrix kernel: [10807.876699] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb  8 16:36:51 dotmatrix kernel: [10807.877658] usb 1-1.6: clear tt 1 (0080) error -71
Feb  8 16:36:51 dotmatrix kernel: [10807.881663] generic-usb 0003:04D9:A09F.0002: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb  8 16:36:51 dotmatrix kernel: [10807.881766] usb 1-1.6: clear tt 1 (00a0) error -71
Feb  8 16:36:51 dotmatrix kernel: [10807.883641] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -71
Feb  8 16:36:51 dotmatrix kernel: [10807.885815] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -71
Feb  8 16:36:51 dotmatrix kernel: [10807.885880] usb 1-1.6: clear tt 1 (0080) error -71

after a while the message become:

Feb  8 16:36:52 dotmatrix kernel: [10808.890502] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.890752] generic-usb 0003:04D9:A09F.0001: can't reset device, 0000:00:1a.0-1.6.1/input0, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.892162] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.893202] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.894235] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.895038] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.898724] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.900590] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.901409] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:52 dotmatrix kernel: [10808.901668] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -32

and then a single

Feb  8 16:36:57 dotmatrix kernel: [10814.370566] usb 1-1.6.1: device not accepting address 8, error -32

then back to the status -32 as above. Sometimes it will 'reset':

Feb  8 16:36:58 dotmatrix kernel: [10815.142955] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.144945] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.288169] usb 1-1.6.1: reset full-speed USB device number 8 using ehci_hcd
Feb  8 16:36:58 dotmatrix kernel: [10815.438083] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.452998] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.467998] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.481784] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.508875] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.521838] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.533804] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.545770] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.557731] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.569698] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:58 dotmatrix kernel: [10815.603594] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:59 dotmatrix kernel: [10815.635501] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:59 dotmatrix kernel: [10815.656441] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:59 dotmatrix kernel: [10815.666411] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb  8 16:36:59 dotmatrix kernel: [10815.666655] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb  8 16:36:59 dotmatrix kernel: [10815.694672] usb 1-1.6.1: device not accepting address 8, error -32
Feb  8 16:36:59 dotmatrix kernel: [10815.696707] usb 1-1.6.1: USB disconnect, device number 8
Feb  8 16:36:59 dotmatrix kernel: [10815.954352] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb  8 16:36:59 dotmatrix kernel: [10816.213579] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:36:59 dotmatrix kernel: [10816.576510] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:00 dotmatrix kernel: [10816.683747] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -16
Feb  8 16:37:00 dotmatrix kernel: [10816.939302] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb  8 16:37:00 dotmatrix kernel: [10817.198547] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:01 dotmatrix kernel: [10818.375220] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:05 dotmatrix kernel: [10821.729353] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb  8 16:37:05 dotmatrix kernel: [10822.135753] usb 1-1.6.3: device not accepting address 9, error -32
Feb  8 16:37:06 dotmatrix kernel: [10823.392464] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb  8 16:37:07 dotmatrix kernel: [10823.798897] usb 1-1.6.3: device not accepting address 9, error -32
Feb  8 16:37:07 dotmatrix kernel: [10823.871064] usb 1-1.6.4: reset full-speed USB device number 10 using ehci_hcd
Feb  8 16:37:08 dotmatrix kernel: [10825.031645] usb 1-1.6.1: new full-speed USB device number 19 using ehci_hcd
Feb  8 16:37:08 dotmatrix kernel: [10825.509849] usb 1-1.6.1: device not accepting address 19, error -32
Feb  8 16:37:09 dotmatrix kernel: [10826.427537] usb 1-1.6.1: new full-speed USB device number 20 using ehci_hcd
Feb  8 16:37:09 dotmatrix kernel: [10826.524335] usb 1-1.6.1: unable to read config index 0 descriptor/all
Feb  8 16:37:09 dotmatrix kernel: [10826.524340] usb 1-1.6.1: can't read configurations, error -32
Feb  8 16:37:10 dotmatrix kernel: [10826.595014] usb 1-1.6.1: new full-speed USB device number 21 using ehci_hcd
Feb  8 16:37:10 dotmatrix kernel: [10826.832449] usb 1-1.6.1: New USB device found, idVendor=04d9, idProduct=a09f
Feb  8 16:37:10 dotmatrix kernel: [10826.832454] usb 1-1.6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb  8 16:37:10 dotmatrix kernel: [10826.832457] usb 1-1.6.1: Product: USB Gaming Mouse
Feb  8 16:37:10 dotmatrix kernel: [10826.832459] usb 1-1.6.1: Manufacturer: E-Signal
Feb  8 16:37:10 dotmatrix kernel: [10826.835328] input: E-Signal USB Gaming Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6.1/1-1.6.1:1.0/input/input11
Feb  8 16:37:10 dotmatrix kernel: [10826.835552] generic-usb 0003:04D9:A09F.0009: input,hidraw0: USB HID v1.10 Mouse [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input0
Feb  8 16:37:10 dotmatrix kernel: [10826.840323] input: E-Signal USB Gaming Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6.1/1-1.6.1:1.1/input/input12
Feb  8 16:37:10 dotmatrix kernel: [10826.840663] generic-usb 0003:04D9:A09F.000A: input,hiddev0,hidraw1: USB HID v1.10 Keyboard [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input1
Feb  8 16:37:10 dotmatrix kernel: [10826.843392] generic-usb 0003:04D9:A09F.000B: hiddev0,hidraw2: USB HID v1.10 Device [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input2
Feb  8 16:37:10 dotmatrix kernel: [10826.844372] usb 1-1.6.3: USB disconnect, device number 9
Feb  8 16:37:10 dotmatrix kernel: [10827.057683] usb 1-1.6.3: new low-speed USB device number 22 using ehci_hcd
Feb  8 16:37:10 dotmatrix kernel: [10827.129474] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:10 dotmatrix kernel: [10827.304942] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:10 dotmatrix kernel: [10827.480417] usb 1-1.6.3: new low-speed USB device number 23 using ehci_hcd
Feb  8 16:37:10 dotmatrix kernel: [10827.552202] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:11 dotmatrix kernel: [10827.727689] usb 1-1.6.3: device descriptor read/64, error -32
Feb  8 16:37:11 dotmatrix kernel: [10827.903169] usb 1-1.6.3: new low-speed USB device number 24 using ehci_hcd
Feb  8 16:37:11 dotmatrix kernel: [10828.029940] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:37:11 dotmatrix kernel: [10828.038042] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:37:11 dotmatrix kernel: [10828.309656] usb 1-1.6.3: device not accepting address 24, error -32
Feb  8 16:37:11 dotmatrix kernel: [10828.381760] usb 1-1.6.3: new low-speed USB device number 25 using ehci_hcd
Feb  8 16:37:12 dotmatrix kernel: [10828.788252] usb 1-1.6.3: device not accepting address 25, error -32
Feb  8 16:37:12 dotmatrix kernel: [10828.788575] hub 1-1.6:1.0: unable to enumerate USB device on port 3
Feb  8 16:37:35 dotmatrix kernel: [10851.552743] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:37:48 dotmatrix kernel: [10864.780978] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -32
Feb  8 16:37:48 dotmatrix kernel: [10864.781857] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:37:50 dotmatrix kernel: [10867.368090] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:37:57 dotmatrix kernel: [10874.126293] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb  8 16:38:05 dotmatrix kernel: [10882.314361] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -75
Feb  8 16:38:05 dotmatrix kernel: [10882.318341] usb 1-1.6: clear tt 1 (0150) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.319290] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.322411] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.323327] usb 1-1.6: clear tt 1 (00a0) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.327443] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.327450] usb 1-1.6: clear tt 1 (0150) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.331515] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.331548] usb 1-1.6: clear tt 1 (00a0) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.335628] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.335666] usb 1-1.6: clear tt 1 (0150) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.339740] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.339777] usb 1-1.6: clear tt 1 (00a0) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.343846] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.343890] usb 1-1.6: clear tt 1 (0150) error -71
Feb  8 16:38:05 dotmatrix kernel: [10882.347950] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb  8 16:38:05 dotmatrix kernel: [10882.348006] usb 1-1.6: clear tt 1 (00a0) error -71

I have found others with the same message, but it always is about a USB TV dongle. Which happens to have the same vendor:device ID as this reverse-hub. Also, some 8 port hubs (this only have one port) also have the same vendor:device ID. So i suspect this is the ID of a generic USB interface chip. lsusb shows me.

05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB

Question really is where can i get more information about what is happening? how can I make sure it is not a device fault (e.g. if the motherboard is undersupplying current to the devices, would i be able to see it somewhere on the system)?

Why does it list things like this generic-usb 0003:0C45:7401.0004? From what I can tell it means <driver name> <usb bus>:<vendor id>:<device id>:<usb device in bus>… is correct?

Why does it say can’t reset device 0000.00 what those zeros mean?

Where can I find what status -32, -71, -75, etc means?

…any guide I should be reading? I’m feeling extremely lost on this.

Best Answer

USB status codes and possible reasons for them are to be found in your kernel source, in file Documentation/usb/error-codes.txt. In Debian Stretch, that is contained in package linux-doc, which installs it in /usr/share/doc/linux-doc-4.9/Documentation/usb/error-codes.txt.gz.

Note that errors in that file are given by their name (like -71 being EPROTO); to find out number/name match you need to:

grep -w 71 /usr/include/asm-generic/errno*.h

or for other way around:

grep -w EPROTO /usr/include/asm-generic/errno*.h

make sure that development include files are present on the system (in Debian, by doing apt-get install linux-libc-dev, or you'll get no matches...

Related Question