8

My iPhone keeps disconnecting from my MacBook Pro; in fact any iPhone I try to connect (and with different cables) can never connect to it.

I am very familiar with command line and Linux so please if anyone has any pointers on what could be going on here feel free to post commands or locations where I can try find the source of this issue.

MacBook Specs: Sierra 10.13.3 MacBook Mid 2015 2.2 GHz Intel Core i7

iPhone 6s Plus / although I have tried with iPhone 5 and iPhone 6 as well as 3 different cables.

tail -f /var/system.log output is as follows

        Jan 25 12:21:05 MyMac PrintUITool[488]: notify name "com.apple.system.powersources.source" has been registered 320 times - this may be a leak
        Jan 25 12:21:08 MyMac fud[1256]: objc[1256]: Class MobileAssetUpdater is implemented in both /System/Library/PrivateFrameworks/MobileAccessoryUpdater.framework/Support/fud (0x10878de10) and /System/Library/AccessoryUpdaterBundles/ApplePowerAccessoryUpdater.bundle/Contents/MacOS/ApplePowerAccessoryUpdater (0x1087df8f8). One of the two will be used. Which one is undefined.
        Jan 25 12:21:22 MyMac PrintUITool[488]: notify name "com.apple.system.powersources.source" has been registered 340 times - this may be a leak

When I plug in iTunes it still keeps doing the same thing but the error reports are as follows:

        Jan 25 12:30:22 MyMac PrintUITool[488]: notify name "com.apple.system.powersources.source" has been registered 840 times - this may be a leak
        Jan 25 12:30:44 MyMac PrintUITool[488]: notify name "com.apple.system.powersources.source" has been registered 860 times - this may be a leak
        Jan 25 12:30:56 MyMac com.apple.BKAgentService[1584]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?
        Jan 25 12:30:56 MyMac iTunes[1582]: info> Scale factor of main display = 2.0
        Jan 25 12:30:57 MyMac iTunes[1582]: Entered:_AMMuxedVersion2DeviceConnected, mux-device:8
        Jan 25 12:30:57 MyMac iTunes[1582]: tid:4e07 - unable to query device capabilities
        Jan 25 12:30:58 MyMac iTunes[1582]: Entered:_AMMuxedDeviceDisconnected, mux-device:8
        Jan 25 12:30:58 MyMac iTunes[1582]: tid:1fc0f - Failed to extract ChipID from booted device
        Jan 25 12:30:58 MyMac iTunes[1582]: Failed to connect to device for lockdown query
        Jan 25 12:30:58 MyMac iTunes[1582]: tid:1fc0f - Failed to extract ECID from booted device
        Jan 25 12:30:58 MyMac iTunes[1582]: tid:1fc0f - Proxy returned empty ECID
        Jan 25 12:30:58 MyMac iTunes[1582]: tid:1fc0f - Can't generate fake tracking identifier for device that's not of type recovery or DFU
        Jan 25 12:30:58 MyMac iTunes[1582]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:8
        Jan 25 12:30:58 MyMac iTunes[1582]: tid:1fc0f - Can't handle device disconnection since this device is not tracked
        Jan 25 12:30:59 MyMac iTunes[1582]: Entered:_AMMuxedDeviceDisconnected, mux-device:9
        Jan 25 12:30:59 MyMac iTunes[1582]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:9
        Jan 25 12:30:59 MyMac iTunes[1582]: tid:1fc0f - Mux ID not found in mapping dictionary
        Jan 25 12:30:59 MyMac iTunes[1582]: tid:1fc0f - Can't handle disconnect with invalid ecid
        Jan 25 12:31:01 MyMac iTunes[1582]: Entered:_AMMuxedVersion2DeviceConnected, mux-device:10
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:1fc0f - unable to query device capabilities
        Jan 25 12:31:01 MyMac iTunes[1582]: Entered:_AMMuxedDeviceDisconnected, mux-device:10
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Failed to extract BoardID from booted device
        Jan 25 12:31:01 MyMac iTunes[1582]: Failed to connect to device for lockdown query
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Failed to extract ChipID from booted device
        Jan 25 12:31:01 MyMac iTunes[1582]: Failed to connect to device for lockdown query
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Failed to extract ECID from booted device
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Proxy returned empty ECID
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Can't generate fake tracking identifier for device that's not of type recovery or DFU
        Jan 25 12:31:01 MyMac iTunes[1582]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:10
        Jan 25 12:31:01 MyMac iTunes[1582]: tid:4e07 - Can't handle device disconnection since this device is not tracked
        Jan 25 12:31:01 MyMac iTunes[1582]: failed to connect to USB device 0x60c0001b7f40, UDID ddda699531d5203e0a1fd580430d0f60df6a3353 (0xE8000084)
        Jan 25 12:31:01 MyMac PrintUITool[488]: notify name "com.apple.system.powersources.source" has been registered 880 times - this may be a leak
        Jan 25 12:31:03 MyMac iTunes[1582]: Entered:_AMMuxedVersion2DeviceConnected, mux-device:11

dmesg outputs these lines multiple times:

    NCM Data: family specific matching fails
    AppleUSBInterface: family specific matching fails
    Apple USB Multiplexor: family specific matching fails
    NCM Control: family specific matching fails
    AppleUSBInterface: family specific matching fails

I'm trying to build an app at the moment so not being able to test on a real device is a pain, has anybody managed to fix this or come across it before?

Allan
  • 101,432
Kravitz
  • 181
  • 1
    If you use the Xcode Device Manager and connect the iPhone, does it get listed? - How long time is it in the list before it disconnects? - What kind of error message do you get in Xcode? – jksoegaard Jan 25 '18 at 14:20
  • No device gets listed, it just flashes for a few milliseconds then disappears.. i dont see an error in xcode anywhere – Kravitz Jan 25 '18 at 16:00
  • What do you mean by "flashes"? Where does it "flash"? (in the device list in the organizer in Xcode, or?) ... Did you try a different USB port on the Mac? – jksoegaard Jan 25 '18 at 16:17
  • it displays then disappears. yes ive tried multiple cables but no luck – Kravitz Jan 25 '18 at 18:08
  • I've had a very similar problem once that was solved simply by rebooting the Mac. I think it came after VMware crashed while having a USB device attached. Have you tried simply rebooting? – jksoegaard Jan 25 '18 at 19:09
  • Sure have, the issues been happening for about 6+ months.. many reboots – Kravitz Jan 26 '18 at 14:15
  • I'm having a similar issue with my iPhone 6 on MacBook Pro 15" Mid-2015, 10.12.6. When I connect my phone, the Photos app pops up and the device shows up and then it disappears for a second. After that it reappears, and this cycle keeps going on and on. I'm running VMware Fusion, so I had a look at USB settings and made sure for all VMs, it's set to "Connect to Mac". I too tried different cables, and the same iPhone and cable sync fine on another MacBook Pro (but that's on 10.10). Any further suggestions? Logs to look at? – Rob Mar 19 '18 at 03:29
  • I bet on a broken USB port. This litteraly screams for a hardware issue on the part of the Mac. – pallox Aug 29 '18 at 12:58
  • Same issue here. Some people had luck with resetting Privacy settings on the iphone - not me. – n1000 Oct 10 '18 at 11:51

1 Answers1

3

Try the following command in terminal: sudo killall -STOP -c usbd

Apple designs their hardware to request and signal for more current to iOS devices than the USB standard allows.

The usbd process manages this. If you kill the usbd process, it stops trying to send high current and will treat it like a non-iOS device and send a normal 500mA of current, and your device should stay connected.

reference: iPhone-Mac connection issue and what does the usbd process do?

  • " Apple designs their hardware to request and signal for more current to iOS devices than the USB standard allows. " Apple iDevices do not sink more current than the USB standard allows, and Apple computers will not source more current than the USB spec allows. Apple iDevices sink 2.4 A max @ 5 V through USB-A or USB-C. Some iDevices will sink more current at higher voltages but this is by negotiating for more power by USB-PD from a USB-C power supply. Apple computers will source 3 A @ 5 V from their USB-C ports. Sourcing 12 W from USB-A and 15 W from USB-C is unusual but not out of spec. – MacGuffin Jan 29 '21 at 00:59
  • @MacGuffin actually iOS devices can get some extra power in excess of the USB-A specifications but only when plugged into a Mac running macOS (i.e. not Windows through Bootcamp). This is through some Apple trickery. You can notice this difference by running system_profiler SPUSBDataType in terminal, before and after you kill the usbd process. The usbd process provides iOS devices an additional 1600mA of current, in addition to the USB-A maximum specification of 500mA (so 2100mA in total). Killing usbd process brings the current down to 500mA, as in non-mac operating systems – AVelj Jan 29 '21 at 05:22
  • @MacGuffin However, I think it's because of this Apple-trickery that makes charging/connecting of iOS devices with Mac devices so unstable. This is particularly a problem with iOS device is on a low charge, requiring more energy, which triggers the instability. It is less likely to happen when the iOS device is at a 70%+ charge than when it is at 20%. Additionally, it seems to be largely affecting MacBooks than on Mac desktops, and is more prone to happen when connected to the left I/O ports, than the right ports. – AVelj Jan 29 '21 at 05:28
  • @AVelj " However, I think it's because of this Apple-trickery that makes charging/connecting of iOS devices with Mac devices so unstable. " What trickery are you referring to? Apple is going to test their iOS devices against their computers for charging and connection problems. If I see a connection problem then I'd first try to rule out software issues by installing any iOS and macOS updates. Apple will rectify software issues as they find them because displeased buyers tend to not be repeat buyers. Without specificity on the trickery this sounds like a conspiracy theory. – MacGuffin Jan 29 '21 at 08:23
  • @macguffin The “trickery” I’m referring to, is that they can achieve 2100mA of current for iOS devices connected to a Mac which is 1600mA over the max 500mA USB specification. Apple has mentioned this here: https://support.apple.com/en-au/HT204377 – AVelj Jan 29 '21 at 14:21
  • When I mentioned the 500mA, I was referring to a "High-power device" from the USB spec: https://en.wikipedia.org/wiki/USB_hardware#Power. 500mA is the highest current allowed to a 4-pin USB-A device while still allowing data. Sure you can pull more if it's USB 3.0 (4+5 pins), USB-C, or a dedicated charging port, but to do so on a standard USB-A cable is out of spec. – cmdr_keen Jan 29 '21 at 18:57
  • @AVelj Apple shows power available from their USB ports here: https://support.apple.com/en-au/HT201163 This is consistent with USB Power limits: https://en.wikipedia.org/wiki/USB#Power Apple must be using USB 3.x or USB-BC to negotiate up tp 15 watts. I've seen up to 12 watts with my iDevices plugged into a computer. There is no trickery to getting the power to iDevices. – MacGuffin Jan 30 '21 at 18:03
  • @MacGuffin, I know what the USB specifications are, but Apple is able to provide additional current to iOS devices plugged in as per the support article I linked earlier. If you don't believe me, run system_profiler SPUSBDataType in Terminal with an iOS device plugged in. You should see it provides 2100mA (1600mA extra operating current, and the standard 500mA current available). Now run sudo killall -STOP -c usbd in Terminal and then rerun the system_profiler command above. You will notice the extra operating current is reduced to zero and will only output 500mA as per USB specifications – AVelj Jan 31 '21 at 01:02
  • @MacGuffin See the Apple support article here https://support.apple.com/en-us/HT204377#extrapower where it mentions certain Apple devices can request extra current when plugged into a Mac whilst running on macOS (i.e. not Windows via Bootcamp). This extra operating current is above the USB specifications. – AVelj Jan 31 '21 at 01:11
  • @AVelj The epecified current does not exceed the max set by the USB spec as shown by Apple documentation.https://support.apple.com/en-us/HT201163 Also in spsc according to Wikipedia https://en.wikipedia.org/wiki/USB_hardware#USB_Battery_Charging – MacGuffin Jan 31 '21 at 07:17
  • @MacGuffin the Wikipedia link you provided is for dedicated charging ports (like power bricks), not data ports on a Mac. Since lightning cables are USB 2.0 cables, that row in the table from the Apple article will apply, which specifies "Up to 500 mA at 5V", even though the USB-A ports may be USB 3.1 ports. – cmdr_keen Feb 01 '21 at 20:36
  • @AVelj Assuming Apple is did dome "trickery" with their charging how does this affect their stability of data connections? Showing Apple violated the USB-BC spec, which you have not, is insufficient to show Apple device have connection problems from it. I first need to see evidence that Apple device are known to have connection issues. Issues not readily resolved without going into charging rates. – MacGuffin Feb 02 '21 at 01:07
  • @MacGuffin I don't know if Apple has officially acknowledged the issue, but from the various users I've seen complain here and other tech forums, it appears to be isolated to MacBooks (i.e. not Mac desktops), and tends to occur when the iPhone is on a lower charge than a higher charge (presumably as it is attempting to pull more current) causing this instability. The only fix is to stop the usbd process which is only used to configure USB connections with iOS devices (thus not affecting other peripherals). – AVelj Feb 02 '21 at 01:51
  • @MacGuffin Subsequently the unstable power output triggers frequent disconnections/reconnections that you may not see in the fraction of a second, but can be witnessed using Console or running the log stream --predicate '(eventMessage contains "your_iOS_device_UUID")||(process == "usbmuxd")||(process == "iTunesHelper")' command in terminal. – AVelj Feb 02 '21 at 02:01
  • @MacGuffin Note I had been dealing with Apple Engineers in 2019 to resolve this issue, but nothing seems to fix it other than replacing the (potentially faulty) iPhone USB-A to Lightning cable (which still works perfectly fine with chargers and other Mac Desktops). See my own related question here with my troubleshooting steps and work with Apple: https://apple.stackexchange.com/questions/382002/iphone-mac-connection-issue-and-what-does-the-usbd-process-do – AVelj Feb 02 '21 at 02:02