You are not logged in.
My Android phone (Pixel 3a XL running CalyxOS) doesn't regularly charge over USB when in Arch Linux. Charging works fine when not in Arch, e.g. in the Grub menu selection or off of a live USB distro, on the same computer. File transfer etc still works. Measuring with Ampere (Android app) shows a normal discharge rate of about -400 mA when plugged in, though accessing the filesystem brings it up to -10 mA, and *sometimes*, eventually up to +100 mA or more where it seems to (usually?) stay until unplugged and thus will charge slooooowly.
Fairly certain this is a new problem but it's also a relatively new phone for me. Using LTS kernel doesn't fix the problem.
My old iPhone 6 charges fine.
Other things I've tried: using a different cable, using a different USB port, unplugging all other USB devices. Phone also charges without problems from a charger directly plugged into the wall. Battery charge doesn't seem to have an effect, I noticed the problem because my battery went down to ~20%.
lsusb.py, serial number x'd out
usb1 1d6b:0002 09 1IF [USB 2.00, 480 Mbps, 0mA] (ehci_hcd 0000:00:1a.0) hub
1-1 8087:0024 09 1IF [USB 2.00, 480 Mbps, 0mA] (Intel Corp. Integrated Rate Matching Hub) hub
1-1.2 046d:0a9c 00 4IFs [USB 2.00, 12 Mbps, 100mA] (Logitech G432 Gaming Headset 000000000000)
1-1.6 04f2:b2ea ef 2IFs [USB 2.00, 480 Mbps, 200mA] (Chicony Electronics Co., Ltd. Integrated Camera)
usb2 1d6b:0002 09 1IF [USB 2.00, 480 Mbps, 0mA] (ehci_hcd 0000:00:1d.0) hub
2-1 8087:0024 09 1IF [USB 2.00, 480 Mbps, 0mA] (Intel Corp. Integrated Rate Matching Hub) hub
usb3 1d6b:0002 09 1IF [USB 2.00, 480 Mbps, 0mA] (xhci-hcd 0000:00:14.0) hub
3-1 2109:2813 09 1IF [USB 2.10, 480 Mbps, 0mA] (VIA Labs, Inc. USB2.0 Hub) hub
3-1.2 046d:c52b 00 3IFs [USB 2.00, 12 Mbps, 98mA] (Logitech USB Receiver)
3-1.3 046d:c21d ff 1IF [USB 2.00, 12 Mbps, 500mA] (Logitech Gamepad F310 E4F0BE79)
3-1.4 047d:1020 00 1IF [USB 1.10, 1.5 Mbps, 100mA] (Kensington Kensington Expert Mouse)
3-2 18d1:4ee1 00 1IF [USB 2.00, 480 Mbps, 500mA] (Google Pixel 3a XL xxxxxxxxxx)
usb4 1d6b:0003 09 1IF [USB 3.00, 5000 Mbps, 0mA] (xhci-hcd 0000:00:14.0) hub
4-1 2109:0813 09 1IF [USB 3.00, 5000 Mbps, 0mA] (VIA Labs, Inc. USB3.0 Hub) hub
dmesg output is nothing special, except that if I plug it in when the screen is off, it reconnects when I turn the phone on. No messages when the charging rate changes after filesystem access.
[ 2251.072316] usb 3-2: new high-speed USB device number 9 using xhci_hcd
[ 2251.217021] usb 3-2: New USB device found, idVendor=18d1, idProduct=4ee1, bcdDevice= 4.40
[ 2251.217034] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2251.217038] usb 3-2: Product: Pixel 3a XL
[ 2251.217041] usb 3-2: Manufacturer: Google
[ 2251.217044] usb 3-2: SerialNumber: xxxxxxxxxx
[ 2299.845382] usb 3-2: USB disconnect, device number 9
[ 2300.705183] usb 3-2: new high-speed USB device number 10 using xhci_hcd
[ 2300.847772] usb 3-2: New USB device found, idVendor=18d1, idProduct=4ee1, bcdDevice= 4.40
[ 2300.847785] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2300.847790] usb 3-2: Product: Pixel 3a XL
[ 2300.847793] usb 3-2: Manufacturer: Google
[ 2300.847796] usb 3-2: SerialNumber: xxxxxxxxxx
Last edited by kitchen_ace (2021-08-10 23:32:08)
Offline
Potentially USB autosuspend kicking in: https://wiki.archlinux.org/title/Power_ … utosuspend ?
Last edited by V1del (2021-08-10 11:59:56)
Offline
You mention that this is a new thing, and that the iThing works fine. Does the phone connect to the computer to allow data transfer?
I have a Pixel 4a that, until last week, had no issues connecting to my Honda Civic's Android Auto. After what I believe was an OS update (June 1 build, July 5 Security Update), Now it comes up in a strange mode where it claims it is charging a connected device, and places itself in host mode. I get a notification of this (also something new). To get out of this mode, I have to switch the USB mode, then it figures out that it is connected as a client and will communicate -- and charge.
tl;dr; You might try changing the USB mode on the Pixel and see if that helps.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You might try changing the USB mode on the Pixel and see if that helps.
So changing the USB mode makes the charging indicator on the phone *briefly* go on, and then back off. Playing with some more settings on the phone and computer, I've discovered that the phone will charge if the adb daemon is running on the computer. So I'm marking this solved, because I think it's an Android problem rather than an Arch Linux problem.
Thanks for the replies.
Offline
I had the same issue, with a One Plus 6T on a Zephyrus M16 (2021).
When plugging in the phone it started charging for about 2 seconds, then suddenly stopped. Battery settings screen told me something like "Connected but cannot charge".
Turned out laptop-mode-tools (which is **not** preinstalled on arch linux) had enabled usb-autosuspend on it, so I reconfigured lmt with my phone on the blacklist and voila, the phone is now charging. The charging rate is still pretty slow though at about 330mah when the screen is on (so I guess about 500 when off?). The phone claims a full recharge in 4 hours.
Trying to edit the udev rules as mentioned in the arch wiki **did not solve the problem for me**. Probably because lmt was overriding it on runtime anyway.
Last edited by markusressel (2021-12-10 00:47:45)
Offline