You are not logged in.

#1 2020-04-01 17:27:23

Maryushi3
Member
Registered: 2020-04-01
Posts: 4

Newly connected USB devices stop being recognized some time after boot

Hi! This is one of those issues that make me lose my mind. I'm pretty sure it's this way since installing Arch but I just have not noticed before.

All USB devices that get connected after some impossible to determine period of time stop "being recognized". In dmesg output I can see that the error is as follows

device descriptor read/8, error -110

and it comes up a bunch of times for every device connected (seems like the kernel module tries very hard to reconnect the device). What is more annoying is that sometimes when this happens the mouse gets "reconnected", and... stops working, mouse pointer is frozen!

From what I have seen error -110 means that the device tries to draw too much power from the USB port but I am pretty confident that it is not it since even the most simple USB flash drives get rejected and a backlit keyboard gets powered just fine albeit after a while (but keypresses are not recognized by the OS). Oh, and this never happened on Windows before and still does not.
I have also seen somewhere (on this board iirc) that the upower service may be responsible for shutting down power to USB ports. Stopping it seemed to help at first but disabling (or rather masking) it, even though prevented the service from starting on boot did not help at all.
Also somewhere on this board appeared a suggestion that this is a fault of having iommu enabled. So I disabled it by booting with "amd_iommu=off" parameter. This did not help at all.

Howerer...
reloading xhci_pci and xhci_hcd modules (by running

sudo rmmod xhci_pci; sudo rmmod xhci_hcd; sudo modprobe xhci_pci xhci_hcd

) brings USB ports back to life! And of course, so does rebooting. But this is only a temporary solution.

I am running 5.5.13-arch2-1 on Ryzen R5 1600 and ASrock AB350 pro4. If there is any information I can provide to help narrow the issue or if there is another way to do so, then please, tell me.

For completeness sake, the dmesg output. USB flash drive connected and working:

[14871.523300] usb 2-3: USB disconnect, device number 3
[15374.190134] usb 1-6: new high-speed USB device number 5 using xhci_hcd
[15374.236296] usb 1-6: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[15374.236300] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15374.236303] usb 1-6: Product: DataTraveler 3.0
[15374.236305] usb 1-6: Manufacturer: Kingston
[15374.236307] usb 1-6: SerialNumber: 4CEDFB7795BAE351593100C4
[15374.243265] usb-storage 1-6:1.0: USB Mass Storage device detected
[15374.243512] scsi host11: usb-storage 1-6:1.0
[15375.256873] scsi 11:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[15375.257297] sd 11:0:0:0: [sde] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB)
[15375.257507] sd 11:0:0:0: [sde] Write Protect is off
[15375.257510] sd 11:0:0:0: [sde] Mode Sense: 45 00 00 00
[15375.257731] sd 11:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[15375.416427]  sde: sde1
[15375.418252] sd 11:0:0:0: [sde] Attached SCSI removable disk

USB  flash drive disconnected:

[15377.502381] usb 1-6: USB disconnect, device number 5

USB flash drive connected and not working (this is all from just connecting one single USB drive and keeping it connected)

[15541.281918] usb 2-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[15546.501278] usb 2-3: device descriptor read/8, error -110
[15546.607734] usb 2-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[15551.837826] usb 2-3: device descriptor read/8, error -110
[15552.165105] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[15557.381154] usb 2-3: device descriptor read/8, error -110
[15557.487597] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[15562.717685] usb 2-3: device descriptor read/8, error -110
[15562.850897] usb usb2-port3: attempt power cycle
[15563.288266] usb 2-3: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
[15568.474289] usb 2-3: device descriptor read/8, error -110
[15568.584125] usb 2-3: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
[15573.807510] usb 2-3: device descriptor read/8, error -110
[15574.134808] usb 2-3: new SuperSpeed Gen 1 USB device number 7 using xhci_hcd
[15579.354300] usb 2-3: device descriptor read/8, error -110
[15579.463967] usb 2-3: new SuperSpeed Gen 1 USB device number 7 using xhci_hcd
[15584.687401] usb 2-3: device descriptor read/8, error -110
[15584.820647] usb usb2-port3: unable to enumerate USB device

Offline

#2 2020-04-01 21:09:22

seth
Member
Registered: 2012-09-03
Posts: 51,071

Re: Newly connected USB devices stop being recognized some time after boot

https://wiki.archlinux.org/index.php/Po … utosuspend ?
Try "usbcore.autosuspend=-1" to deactivate it, ensure that the value doesn't get changed by some userspace power management daemon (upower et al)

Online

#3 2020-04-01 23:02:53

Maryushi3
Member
Registered: 2020-04-01
Posts: 4

Re: Newly connected USB devices stop being recognized some time after boot

After rebooting

cat /sys/module/usbcore/parameters/autosuspend

returns -1. Yet, in less than 30 minutes since boot, mouse pointer stopped moving and connecting any USB device gave the same result as I described before. So unfortunately it is not caused by autosuspend.

Offline

#4 2020-04-02 07:01:02

seth
Member
Registered: 2012-09-03
Posts: 51,071

Re: Newly connected USB devices stop being recognized some time after boot

Dou you get the same behavior w/ the lts kernel?

Online

#5 2020-04-02 11:52:46

Maryushi3
Member
Registered: 2020-04-01
Posts: 4

Re: Newly connected USB devices stop being recognized some time after boot

Exactly the same happens on 5.4.28-2-lts.

Offline

#6 2020-04-09 11:36:54

Maryushi3
Member
Registered: 2020-04-01
Posts: 4

Re: Newly connected USB devices stop being recognized some time after boot

I though I will let you know, that the issue disappeared eventually. I suspect it was caused by two USB Oculus cameras that were defaulted to be handled by uvcvideo, but uvcvideo could not handle them as they are not just standard cameras.  They appeared in Firefox as webcams and eventually led to Firefox crashing and not being able to use microphone/webcam... until a reboot. Since I keep them plugged in (to the back of the PC) I disabled the ports they were plugged into. This helped with weird behavior in Firefox and since then USB ports work properly too. Oh, and I went back to mainline kernel.

Offline

Board footer

Powered by FluxBB