I would like to use my Linux system to charge up my iOS devices, but I
don't want to "Trust this Computer" so maybe we can drill down further
on this bug.
As soon as I connect a locked iDevice (tested iOS 9 and iOS 10):
$ top
top - 12:22:28 up 24 days, 21:05, 2 users, load average: 0.50, 0.56, 0.84
Tasks: 222 total, 2 running, 220 sleeping, 0 stopped, 0 zombie
%Cpu(s): 37.7 us, 2.8 sy, 0.0 ni, 59.1 id, 0.5 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3917996 total, 228612 free, 2176052 used, 1513332 buff/cache
KiB Swap: 4063228 total, 3597580 free, 465648 used. 1188276 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2184 root 20 0 348112 5596 4800 R 70.4 0.1 3886:07 upowerd
upowerd itself doesn't tell me much:
$ upower --monitor
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[15:26:55.169] device added:
/org/freedesktop/UPower/devices/media_player_1_1
$ upower --monitor-detail
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[15:28:23.805] device added:
/org/freedesktop/UPower/devices/media_player_1_1
native-path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1
vendor: Apple_Inc.
model: iPod
serial: 8b1d0ada9c849c62fd52263c3797034216608bf0
power supply: no
updated: Wed 31 Dec 1969 07:00:00 PM EST (1477682903 seconds ago)
has history: yes
has statistics: no
media-player
warning-level: none
percentage: 0%
icon-name: 'battery-missing-symbolic'
perf top: it shows the top four items to be libgmp.so.10.3.0 in:
__gmpn_redc_1
__gmpn_sqr_basecase
__gmpn_mul_basecase
__gmpz_probab_prime_p
`perf top --sort=comm,dso` shows that the top item is upowerd, in
libgmp.so.10.3.0
This is a math library. I can only guess, but it may be doing math
operations to compute the UDID of the iOS device every time it tries to
communicate with it? Some SHA1 operations maybe.
To use strace on the upowerd process (PID 2184):
$ sudo strace -p 2184 -c
strace: Process 2184 attached
strace: [ Process PID=2184 runs in x32 mode. ]
strace: [ Process PID=2184 runs in 64 bit mode. ]
^Cstrace: Process 2184 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
58.05 0.000101 1 96 sendto
41.95 0.000073 0 14494 getrusage
0.00 0.000000 0 24 close
0.00 0.000000 0 30 6 stat
0.00 0.000000 0 6 poll
0.00 0.000000 0 96 select
0.00 0.000000 0 24 socket
0.00 0.000000 0 24 connect
0.00 0.000000 0 96 recvfrom
------ ----------- ----------- --------- --------- ----------------
100.00 0.000174 14890 6 total
$ sudo strace -p 2184 -e sendto -i
This shows that it is sending XML messages over and over again. For fuller
output you can add `-s 999` ... these are XML formatted messages being sent to
the iPod as part of some kind of iOS proprietary communications protocol.
You can verify using a USB capture via usbmon, that the host Linux
system is in an infinite loop asking the iPod for something. Wireshark
doesn't have a dissector for iOS vendor-specific interfaces and commands
but you can see the same XML messages traveling the USB bus that were
observed in strace.
Is this actually a bug in libimobiledevice ? This seems like a failure
to obey an iOS protocol. Supposedly I am already on the latest version:
my package is 1.2.0+dfsg-3~ubuntu0.2
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to upower in Ubuntu.
https://bugs.launchpad.net/bugs/861642
Title:
upowerd uses 100% cpu till killed
Status in upower package in Ubuntu:
Confirmed
Bug description:
top - 12:57:54 up 2:56, 3 users, load average: 1.06, 1.12, 1.35
Tasks: 219 total, 2 running, 216 sleeping, 0 stopped, 1 zombie
Cpu0 : 70.2%us, 29.8%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 2.3%us, 1.3%sy, 0.0%ni, 96.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 1.0%us, 0.3%sy, 0.0%ni, 98.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 0.7%us, 1.6%sy, 0.0%ni, 97.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu4 : 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu5 : 0.0%us, 0.3%sy, 0.0%ni, 98.3%id, 1.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 5994176k total, 4198260k used, 1795916k free, 63308k buffers
Swap: 8193144k total, 355188k used, 7837956k free, 334316k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2268 root 20 0 148m 1572 680 R 100 0.0 111:08.37 upowerd
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: upower 0.9.9-4
ProcVersionSignature: Ubuntu 2.6.38-11.50-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Sep 28 12:53:23 2011
ExecutablePath: /usr/lib/upower/upowerd
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64
(20100816.1)
ProcEnviron:
SourcePackage: upower
UpgradeStatus: Upgraded to natty on 2011-04-06 (175 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/861642/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp