UPower "device changed" when iPhone is connected

Guy Rutenberg guyrutenberg at gmail.com
Mon Mar 9 12:51:04 UTC 2020


Hi,

I went over udev rules events and it turns out I missed rules added by
usbmuxd to /lib/udev/rules.d/ (instead of the custom rules dir
/etc/udev/rules.d). Disabling those rules also stops the weird behavior.

The offending rules are:
```
# systemd should receive all events relating to device
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", TAG+="systemd"

# Initialize iOS devices into "deactivated" USB configuration state and
activate usbmuxd
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="add",
ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux",
ENV{SYSTEMD_WANTS}="usbmuxd.service"

# Make sure properties don't get lost when bind action is called
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="bind",
ENV{USBMUX_SUPPORTED}="1", OWNER="usbmux",
ENV{SYSTEMD_WANTS}="usbmuxd.service"
```
Disabling each one of them stops the weird behavior, so probably the error
is in the usbmuxd.service.

Thanks,
Guy

On Mon, 9 Mar 2020 at 10:11, Guy Rutenberg <guyrutenberg at gmail.com> wrote:

> Hi,
>
> I'm experiencing a weird behavior whenever I have an iPhone connected via
> USB to my laptop: It looks like the power source is getting toggled on and
> off / battery is resets/refreshs. This behavior repeats itself every 6
> seconds (exactly) as long as the iPhone is connected. Some things I noticed:
> 1. No data is sent between the phone and the computer (sniffed USB bus
> using Beagle).
> 2. No events in dmesg
> 3. No events in udev
> 4. Same behavior doesn't occur with other Phones (Androids)
> 5. It happens with all iPhones I've tested with (iPhone 7, 8, X, XR and
> XS), with different iOS versions installed and also in Recovery Mode.
> 6. It happens regardless of whether the computer is connected to AC and
> whether the phone is connected directly to the computer or through a
> powered-hub.
> 7. I've ruled out issues related to the iPhone's power consumption by
> comparing the actual mA output on the port when the phone is connected
> compared to other devices.
>
> upower --monintor displays repeating lines containing:
> [09:22:41.312] device changed:
> /org/freedesktop/UPower/devices/line_power_AC
> [09:22:41.313] device changed:
> /org/freedesktop/UPower/devices/battery_BAT0
> [09:22:41.316] device changed:
> /org/freedesktop/UPower/devices/battery_BAT1
> [09:22:42.402] daemon changed:
>
> (full logs (including --monitor-detail) are available in
> https://gist.github.com/guyru/d9d06a623d599fdeaf7ef8d58d3b9623)
>
> (each of these lines repeats multiple times). If I disable UPower
> completely:
> $ sudo mv /lib/systemd/system/upower.service{,.disabled} && sudo systemctl
> daemon-reload
> the weird behavior disappears, which makes me think (given all the other
> ruled out options) that the issue is with UPower. However, disabling UPower
> on a laptop seems like not a good long term solution to this issue.
>
> My system: 4.19.0-6-amd64, Lenovo ThinkPad T470, Debian 10, upower
> 0.99.10-1
>
>
> I'll really appreciate any suggestions to what the issue may be, or
> further tips to investigate as this issue is very annoying to me.
>
> Thanks,
> Guy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/devkit-devel/attachments/20200309/266e14a4/attachment.htm>


More information about the devkit-devel mailing list