I want to connect my Huawei Mate 20x android phone to the pc for adb debugging, but I get some errors in dmesg and the device does not show up in any list (lsusb, adb devices).
The android device has "adb debugging via usb", "allow debugging while loading only" and related options enabled. I might be missing some more obscure security settings here, but I followed the tutorials I could find.
I own two other (way older) android devices, which are connecting without problems, so the kernel settings on my pc should be fine. I tried kernel versions 5.11.10 and 6.4.3 (gentoo sources).
These are the messages from dmesg
Code: Select all
[161543.764460] usb 1-1: new full-speed USB device number 25 using xhci_hcd
[161543.878385] usb 1-1: device descriptor read/64, error -71
[161544.100390] usb 1-1: device descriptor read/64, error -71
[161544.316443] usb 1-1: new full-speed USB device number 26 using xhci_hcd
[161544.430451] usb 1-1: device descriptor read/64, error -71
[161544.652452] usb 1-1: device descriptor read/64, error -71
[161544.754445] usb usb1-port1: attempt power cycle
[161545.382440] usb 1-1: new full-speed USB device number 27 using xhci_hcd
[161545.382677] usb 1-1: Device not responding to setup address.
[161545.586679] usb 1-1: Device not responding to setup address.
[161545.794395] usb 1-1: device not accepting address 27, error -71
[161545.909360] usb 1-1: new full-speed USB device number 28 using xhci_hcd
[161545.909520] usb 1-1: Device not responding to setup address.
[161546.114543] usb 1-1: Device not responding to setup address.
[161546.322300] usb 1-1: device not accepting address 28, error -71
[161546.322367] usb usb1-port1: unable to enumerate USB device
[161595.410376] usb 1-1: new full-speed USB device number 29 using xhci_hcd
[161595.524456] usb 1-1: device descriptor read/64, error -71
[161595.740452] usb 1-1: device descriptor read/64, error -71
[161595.956439] usb 1-1: new full-speed USB device number 30 using xhci_hcd
[161596.070451] usb 1-1: device descriptor read/64, error -71
So I just solved this using a solution from a thread in ubuntu forums from 2011.
I'll include the solution instead of deleting this post, just in case someone else stumbles into the same problem:
It seems to be a problem with usb autosuspend activating as the phone switches into power loading mode once it gets connected to usb (even if deactivated in the phone's settings).
It seems to be necessary to disable autosuspend for usb on the pc.
As root enter
Code: Select all
echo -1 >/sys/module/usbcore/parameters/autosuspend
