Fix for Iphone not charging on USB

This has been asked before with no "clean" solution (last on Apple iphone will not charge (workaround required)).

The fix is to create a simple udev rule by creating a file: /etc/udev/rules.d/99-iphone.rules with this in it:
SUBSYSTEMS=="usb", KERNELS=="1-1", RUN+="/usr/bin/usbmuxd -X -u -U usbmux"
SUBSYSTEMS=="usb", KERNELS=="2-1", RUN+="/usr/bin/usbmuxd -X -u -U usbmux"
SUBSYSTEMS=="usb", KERNELS=="3-1", RUN+="/usr/bin/usbmuxd -X -u -U usbmux"
SUBSYSTEMS=="usb", KERNELS=="4-1", RUN+="/usr/bin/usbmuxd -X -u -U usbmux"

The above should take care of resetting the usb ports for iphone charging on all usb buses (I have 4 on my machine) -- if you have more than 4 usb buses you may have to add more lines changing the KERNELS parameter to 5-1 etc.. you can check how many buses you have by listing them with this command: lsusb | awk '{print $2}' | sort | uniq

PS: On the original threads someone asked "why do you still buy iphones?" <-- while I can sympathize with that reasoning I can't choose what phone my WIFE, RELATIVES, FRIENDS will buy. You can just imagine their puzzled look when I had to say my linux machine can't charge their iphone (they probably think: "if linux is so great why can't it do something so simple as charge a phone... duh"). If we want more people to use linux (so we all benefit from their contributions/ideals/knowledge) then we should be more inclusive and not just push aside anything that doesn't conform to what WE think is best. Anyway, I just wanted to make it clear I'm not "defending" iphone users -- I'm just trying to be helpful instead of criticizing (the same way they probably criticize us when we say our computer can't charge their phone).

EDIT (Dec 11 2018) : I added the -X parameter above because after updating manjaro I noticed the systemd udev process kept triggering and using some 25% CPU due to the rule -- after adding -X the CPU stays idle with the main issue still resolved.

3 Likes

Thank you so much! I will apply your patch immediately. Do you know how to get an iPhone to mount in KDE so that your iPhone will also appear as “documents on iPhone X”

(moving to tutorials)

Thanks to IT guy. Read this after you read his post.
SUBSYSTEMS=="usb", KERNELS=="1-1", RUN+="/usr/bin/usbmuxd -u -U usbmux" SUBSYSTEMS=="usb", KERNELS=="2-1", RUN+="/usr/bin/usbmuxd -u -U usbmux" SUBSYSTEMS=="usb", KERNELS=="3-1", RUN+="/usr/bin/usbmuxd -u -U usbmux" SUBSYSTEMS=="usb", KERNELS=="4-1", RUN+="/usr/bin/usbmuxd -u -U usbmux"
Copy this and paste this text your rule fails to work. To test the rule, run
sudo udevadm test /devices/pci0000:00/0000:00:06.0/usb2/2-1 and look for syntax issues. You can ignore the "failed to open device." If there are none, run sudo udevadm control --reload-rules && udevadm trigger This will enable your rule.

Thank you for posting this. I'm sure it will be a great help to iPhone users.

I simply have one comment to make in this regard. To my way of thinking Apple goes out of their way to make their hardware incompatible with Linux.

It is not that Linux is not Apple friendly. It is quite the opposite. Apple just doesn't want their hardware to work with Linux. Think of all the money they would lose if Apple hardware that isn't up to running newer Apple OS's could easily have Linux installed and be good for many more years. Apple would lose billions in sales if their hardware was easily converted to run Linux.

Making Apple products not work with Linux ensures a new Apple product will be bought every couple of years when the older hardware becomes too sluggish. It's called programmed obsolescence.

OSS community vs Apple. I think we usually win..

Forum kindly sponsored by