You are not logged in.

#1 2014-09-01 14:53:24

nem75
Member
Registered: 2014-09-01
Posts: 11

[SOLVED] iphone 4 won't charge

I recently (a week ago) switched to Arch completely, after an extended period of testing in VMs and on external hard drives. So far it's great!

Now I noticed my iphone 4 won't charge anymore when pluggin it into any USB port of my Lenovo x220. This was never a problem before (with various Ubuntu flavors).

journalctl won't tell me much either:

Sep 01 16:37:14 jbr-x220 kernel: usb 2-1: new high-speed USB device number 4 using xhci_hcd
Sep 01 16:37:14 jbr-x220 kernel: usb 2-1: ep 0x2 - rounding interval to 8 microframes, ep desc says 10 microframes
Sep 01 16:37:14 jbr-x220 kernel: usb 2-1: ep 0x81 - rounding interval to 8 microframes, ep desc says 10 microframes
Sep 01 16:37:15 jbr-x220 colord[840]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
Sep 01 16:37:15 jbr-x220 colord[840]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
Sep 01 16:37:17 jbr-x220 kernel: usb 2-1: USB disconnect, device number 4

(The last line comes from me unplugging the device again.)

In the phone's status bar the 'charging' symbol briefly shows, then disappears, and the power continues to drain.

Except for the above lines in the log the whole OS does not react to the device at all (AFAIKT).

Neither does the phone (no "trust this computer?" dialogs or anything - not that they should matter just for charging the battery).

I'm stumped. Any ideas?

Edit: the phone charges when plugged into any non-Arch computer.

Last edited by nem75 (2014-09-03 17:44:13)

Offline

#2 2014-09-01 16:20:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,671

Re: [SOLVED] iphone 4 won't charge

Could you attach the phone and run sudo lsusb -v   ?
Please either post it to a service like bpaste or pastebin (the wgetpaste tool is handy for this) and provide us the link or paste the output here.  The output will be large, so if you do paste it here, be certain to use BBCode code tags.


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

#3 2014-09-01 18:37:28

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

Sure can do.

Here's the output concerning the phone: http://pastebin.com/p46vw8sT

If for some reason you need the complete `lsusb` output, that's here: http://pastebin.com/upYSrske

Offline

#4 2014-09-01 20:14:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,671

Re: [SOLVED] iphone 4 won't charge

Okay.  Unfortunately, it appears that the phone has successfully negotiated for 500mA from the port.  That is the maximum amount that a USB 2.0 port can deliver (by the specification).  According to publicly available information,  Apple claims it will charge, but only when the screen is off.  If you can see the charging indication, then the screen must be on.  Presumably in this state, the iPhone is (at least) getting most or all of its operating power from the USB port.   Turn off the screen and see if it charges.

As to it working for non-Arch computers.  I don't know.  Look at the USB identifiers on those computers and see if they negotiated for more power.  If they have USB 3.0 ports, then the maximum current is higher (but I don't recall the actual value and I don't have the USB 3.0 specification at hand).  They other possibility is that the phone does try to charge, but detects a voltage drop and gives up.  If you want to test that theory, try moving it to a port on a different hub.  That hub has a wireless device on it that is probably drawing some pretty significant current.

Anyway, the bittersweet news is that Arch is doing exactly what it should be doing with that port.


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

#5 2014-09-01 20:29:57

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

Well it always charged on Ubuntu without having to switch off anything. So either the ports on the x220 can indeed deliver more than 500 mA (and Ubuntu managed to negotiate that) or there is something else wrong.

I suspect the latter, I just have no idea what to look for.

I will check `lsusb -v` on another computer, but I don't expect to see any suprise. And if Arch cannot charge an old iPhone then that's indeed "bitter sweet". Mainly for Arch though, I'm afraid. wink

BTW, if I read the posting you linked correctly, the "screen off" thing only applies to iPads (which correlates with my personal experience re charging iPads on a standard USB port).

Thanks for the effort though!

Last edited by nem75 (2014-09-01 20:30:12)

Offline

#6 2014-09-01 21:00:05

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 102
Website

Re: [SOLVED] iphone 4 won't charge

I have seen this behaviour (iPhone charging symbol shortly appears and then disappears) a few times. Please make sure you have the following packages installed:

  • usbmuxd

  • ifuse

  • libimobiledevice

AFAIR I rebooted after installation but nothing else was needed.


EDIT: Not sure about ifuse and libimobiledevice but usbmuxd is definitly needed for charging my iPhone 4 with Arch Linux.

Last edited by demaio (2014-09-01 21:05:04)

Offline

#7 2014-09-01 21:17:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,671

Re: [SOLVED] iphone 4 won't charge

I do suggest you find a machine where it does work and see what the max current number is on that machine.   I suppose it might be possible to tell the phone to draw more current than it negotiated according to the USB standard.  Perhaps one of the libraries linked by demaio does that through Apple's proprietary interface that is thoroughly protected by non-disclosure  agreements.  Unfortunately, I will be unable to make any further personal conjecture because of professional ethical and legal entanglement.


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

#8 2014-09-02 07:37:26

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

demaio wrote:

I have seen this behaviour (iPhone charging symbol shortly appears and then disappears) a few times. Please make sure you have the following packages installed:

  • usbmuxd

  • ifuse

  • libimobiledevice

AFAIR I rebooted after installation but nothing else was needed.

Thank you for the suggestion.  Unfortunately it still won't work. I had everything installed already, even rebooted - no go.

@ewaller: thank you, I will try that next.

Offline

#9 2014-09-02 12:18:16

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

Well, that didn't do much ...

I plugged the phone into a colleague's Ubuntu driven notebook. Phone started charging without any problems. Then I checked the `lsusb -v` output.

I could post it here or to pastebin. That would be rather futile though - `diff` shows that there is absolutely no difference between the Ubuntu and Arch `lsusb` output (apart from the first line with "Bus" and "Device" ids).

Anyone any other idea what I could check? Once again I'm at a complete loss.

Offline

#10 2014-09-02 13:35:57

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] iphone 4 won't charge

 Check /sys/class for differences on both machines with both states, charging/plugged in and not charging/not plugged in. That should refer you to /sys/devices, which you could search for differences directly, which might hold some power supply/consumption related information.
 I think this is not a usb power supply issue, but something in the intercommunication between apples piece of hardware and your laptop, ergo software. Compare loaded modules between the machines that are related to usb, similar to above /sys/class. There might be some module options that need adjustment.
 Last but not least attach a powered hub in between your laptop and apples piece of hardware.

Offline

#11 2014-09-02 13:42:06

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

Thank you for the pointers, I will do that.

Is there an easy way to compare the /sys/class trees, short of recursive ls?

Already tried the powered hub, no difference there.

Offline

#12 2014-09-02 13:44:08

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] iphone 4 won't charge

'tree', 'diff' with appropriate switches should also do it and of course 'find'.

Edit:

find /sys/class > /tmp/machine-a-unplugged
find /sys/class > /tmp/machine-a-plugged
diff /tmp/machine-a-{un,}plugged
find /sys/class > /tmp/machine-b-unplugged
find /sys/class > /tmp/machine-b-plugged
diff /tmp/machine-b-{un,}plugged

#same with lsmod

Last edited by emeres (2014-09-02 13:46:44)

Offline

#13 2014-09-03 17:43:05

nem75
Member
Registered: 2014-09-01
Posts: 11

Re: [SOLVED] iphone 4 won't charge

tl;dr
Installing usbmuxd might help after all; installing https://aur.archlinux.org/packages/ipad-charge-git/ definitely does.

<edit>It even charges the ipad, which I could never do with Ubuntu, so I'll probably stick with ipag_charge.</edit>

We-ell...

Instead of going to the trouble of trying emeres' totally reasonable suggestions, I decided to be lazy and just try out a package I found in the AUR, ipad-charge-git. And lo and behold, after I installed the package and ran ipad_charge once the phone started to charge without fail and continues to do so whenever I plug it in now.

I checked the actual Github repository behind that AUR package and, more importantly, the small source code file it consists of. Seems it does nothing more than tell the phone via libusb to just start effin charging.

So far so good, but I don't believe this is really necessary, as I cannot imagine Ubuntu having installed this kind of utility (I sure never consciously used it).

So I checked the list of installed packages on a default Ubuntu 14.04 and found one package that was installed, related to iphone/ipad operations, and which was missing on my Arch installation: usbmuxd. I know, I wrote above that I have it installed - guess I was wrong. hmm

Problem right now is, I cannot test if installing usbmuxd will do the trick, because the phone is charging now thanks to ipad-charge-git and I can't get it to not charge any more. big_smile

But n/m - after the next reboot I'll try again. Either installing usbmuxd will help, or I'll continue to use ipad_charge. Either way this is solved. Thanks everyone for the input, even though it's just about an Apple device! wink

Last edited by nem75 (2014-09-04 11:51:40)

Offline

Board footer

Powered by FluxBB