You are not logged in.

#1 2024-03-28 20:40:29

FlitPix
Member
Registered: 2023-08-16
Posts: 12
Website

[OUT OF SCOPE] Can't connect Android device to Arch Linux via USB

My Galaxy A71 5G will not maintain a stable connection with my computer. My end goal is to be able to connect with ADB so I can screen cast with scrcpy.

When I connect my phone with a known working cable and a known working port (I've been able to connect my Nintendo Switch in PTP, and a game controller), it seems to enter a loop of power cycling and failing to connect with kio6. Sometimes I can see the device in lsusb, so I was able to add a udev rule; this didn't change anything. It never appears in adb devices, and I never get the popup on my phone to allow my computer to connect. In the USB settings on my phone, "USB controlled by" is set to "This device" and I can't change it to "Connected device", it just fails with a nondescript error; could this potentially be the problem?

journald logs (it seems to loop the same errors in some random order):

3/28/24 4:26PM	kernel	usb 1-3: new high-speed USB device number 89 using xhci_hcd
3/28/24 4:26PM	kernel	usb 1-3: device descriptor read/64, error -71
3/28/24 4:26PM	kernel	usb 1-3: unable to get BOS descriptor or descriptor too short
3/28/24 4:26PM	kernel	usb 1-3: unable to read config index 0 descriptor/start: -71
3/28/24 4:26PM	kernel	usb 1-3: can't read configurations, error -71
3/28/24 4:26PM	kernel	usb 1-3: new high-speed USB device number 90 using xhci_hcd
3/28/24 4:26PM	kernel	usb 1-3: Device not responding to setup address.
3/28/24 4:26PM	kernel	usb 1-3: Device not responding to setup address.
3/28/24 4:26PM	kernel	usb 1-3: device not accepting address 90, error -71
3/28/24 4:26PM	kernel	usb usb1-port3: attempt power cycle
3/28/24 4:26PM	kernel	usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
3/28/24 4:26PM	kernel	usb 1-3: new high-speed USB device number 92 using xhci_hcd
3/28/24 4:26PM	kernel	usb 1-3: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 4.00
3/28/24 4:26PM	kernel	usb 1-3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
3/28/24 4:26PM	kernel	usb 1-3: Product: SAMSUNG_Android
3/28/24 4:26PM	kernel	usb 1-3: Manufacturer: SAMSUNG
3/28/24 4:26PM	kernel	usb 1-3: SerialNumber: XXXXXXXXXXX
3/28/24 4:26PM	kernel	cdc_acm 1-3:1.1: ttyACM0: USB ACM device
3/28/24 4:26PM	kernel	usb 1-3: USB disconnect, device number 92
3/28/24 4:26PM	kiod6	PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
3/28/24 4:26PM	kiod6	LIBMTP libusb: Attempt to reset device
3/28/24 4:26PM	kiod6	inep: usb_get_endpoint_status(): No such device
3/28/24 4:26PM	kiod6	outep: usb_get_endpoint_status(): No such device
3/28/24 4:26PM	kiod6	libusb_open() failed!: No such file or directory
3/28/24 4:26PM	kiod6	LIBMTP PANIC: Could not init USB on second attempt
3/28/24 4:26PM	kiod6	kf.kiod.kmtpd.: LIBMTP_Open_Raw_Device_Uncached: Could not open MTP device
3/28/24 4:26PM	plasmashell	kf5idletime_wayland: This plugin does not support polling idle time
3/28/24 4:26PM	plasmashell	kf5idletime_wayland: This plugin does not support polling idle time
3/28/24 4:26PM	kernel	usb usb1-port3: Cannot enable. Maybe the USB cable is bad?

EDIT: I'm able to connect a different (albeit much older) Android device with ADB, so it seems the issue is with my phone somehow. I'll look into this further on my own. Not really sure how to mark the thread since it's not really solved yet, so I marked it as out of scope since it's not an issue with my computer.

Last edited by FlitPix (2024-03-29 16:53:22)

Offline

#2 2024-04-03 10:14:11

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [OUT OF SCOPE] Can't connect Android device to Arch Linux via USB

FlitPix wrote:

3/28/24 4:26PM    kernel    usb usb1-port3: Cannot enable. Maybe the USB cable is bad?

The error message seems clear.
This is a device with USB 3.0 ? your previous phone and other device is maybe USB 2.0 ?
I propose to spend some further time for investigation here and maybe get a new, certified USB 3.0 cable, no additional adapter or USB hub between.

Another idea is, to disable usb power saving on the computer.

Offline

#3 2024-04-18 17:35:06

FlitPix
Member
Registered: 2023-08-16
Posts: 12
Website

Re: [OUT OF SCOPE] Can't connect Android device to Arch Linux via USB

ua4000 wrote:

The error message seems clear.

...No, it really isn't, since the cable is known to work for other devices.

ua4000 wrote:

This is a device with USB 3.0 ? your previous phone and other device is maybe USB 2.0 ?
I propose to spend some further time for investigation here and maybe get a new, certified USB 3.0 cable, no additional adapter or USB hub between.

Maybe... It's the cable that came with the 8bitdo Pro 2, which I have no clue if it's certified or not. Might need to get a new cable.

Though, I'm having a very similar problem connecting my second gen iPod Touch now, which is certainly not a USB 3.0 device. Granted, it's with a different cable, since it doesn't use USB-C to begin with, but other than that, I'm not exactly sure what's going on.

ua4000 wrote:

Another idea is, to disable usb power saving on the computer.

I wasn't using USB power saving to begin with.

Last edited by FlitPix (2024-04-18 17:40:56)

Offline

#4 2024-04-18 18:13:23

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [OUT OF SCOPE] Can't connect Android device to Arch Linux via USB

FlitPix wrote:

I wasn't using USB power saving to begin with.

What do you mean here: did you explicitly disabled it ?
I'm referring to https://wiki.archlinux.org/title/Power_ … utosuspend

Offline

#5 2024-04-18 18:17:27

FlitPix
Member
Registered: 2023-08-16
Posts: 12
Website

Re: [OUT OF SCOPE] Can't connect Android device to Arch Linux via USB

I didn't have any udev rules for USB power saving. This is actually the first time I had to set any udev rules at all.

I did actually find that article on my own and attempted to blacklist the device. When I did that, though, it began to affect my mouse and keyboard, as I did not blacklist them. That's how I came to that conclusion - evidently I didn't have any USB power saving rules enabled to begin with, otherwise I would have run into issues with my keyboard/mouse much sooner.

Offline

Board footer

Powered by FluxBB