iPhone-Mac connection issue and what does the usbd process do?
I know there's a few questions on USB connection issues between iPhones-Macs and know a temporary solution to fix it. But I would like to know what exactly does the usbd process do and why is it causing connection issues between some iPhones-Macs?
The issue
Some Macs & iPhones don't have a stable connection when connected using Apple's Lighting cable. The iPhone attempts to reconnect very quickly, sometimes 2-3 times per second and continues to do this until you wiggle the cable, insert in another USB port or pause the particular process usbd in Terminal.
For me, the issue is more prevalent with the left USB port on my MacBook Pro (but does happen with the right USB port occasionally). Additionally, it is more likely to happen when the iPhone is on a low charge (0-30%) but does happen with higher charges occasionally.
Strangely, this doesn't affect every iPhone connecting using my Lighting cable or with my iPhone to other Macs using the same cable.
Temporary solution and my investigations into usbd
A temporary solution is to run a sudo command to stop the usbd process from running on your Mac. The command 'sudo killall -STOP -c usbd', pauses the process until you either reboot or enter the command 'sudo killall -CONT -c usbd' to restart the usbd process.
Reading the man page description for the usbd process, I've found the usbd process is used to specifically configure iOS devices connected to the Mac.
The man page describes the usbd process as:
usbd allows the system to configure USB iOS devices to charge and to present notifications related to USB devices.
This command is not intended to be invoked directly
The only other thing I know about the usbd process is that it allows Macs to provide an additional 1600mA of power to iOS devices, when the maximum USB specification allows only 500mA of power. Pausing the usbd process, reduces the power output of the USB port to the standard 500mA, so it causes the iPhone to charge considerably slower, but gives a stable connection.
You can observe the difference in the power output running the command 'system_profiler SPUSBDataType' in terminal.
When usbd is running, I get the following power output:
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 1600
Sleep current (mA): 2100
Disabling usbd, I get the following power output:
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Troubleshooting steps so far
Other than pausing usbd, I've been working with AppleCare and their engineers for several months to find out if this is a software issue and why is it happening with my iPhone XS and my MacBook Pro (model: 11,3, late-2013 Retina 15" running macOS Mojave 10.14.6) using Apple's official Lighting Cable.
We have performed so many troubleshooting steps and most of these steps don't seem to fix it, except to pausing the usbd process. However, Apple engineers refuse to believe the usbd process is causing the issue.
See notes below for the troubleshooting steps undertaken so far:
After the Genius Bar replaced the (perfectly fine) logic board and I/O board, they still exhibited the same connection issue with multiple iPhones at their store using their own Lighting Cables. I'm not sure which iPhone models they tested, but they tried it with the iPhone XS and XS Max and possibly with iPhone 8 as well?
Interestingly, the only time the issue did not produce was when they took a completely new Lighting Cable from the shop floor. Consequently, they suggested it might be a Lighting Cable issue, but it doesn't explain why this only happens with some iPhones and some Mac models but doesn't affect other devices using the same (potentially faulty) cable?
Also, despite never having a frayed cable and store my cables appropriately, new cables exhibit the issue within a month of using them, but again not with all Macs and/or with all iPhones?
Question
After doing so many troubleshooting steps with Apple, they suggest it's a Lighting cable issue, but this doesn't explain why the same cable works with other iPhones and Macs.
The only real (but temporary) solution is to pause usbd, but as established, that reduces the power output from my Mac to the iPhone, meaning charging will take longer.
So to my question, would anyone be able to provide additional information as to what exactly does the usbd process do, and would anyone comment if this is a software bug or a physical Lighting cable issue?
I'd appreciate if anyone has any ideas as to what is the root cause of the problem, and hopefully we can find a fix for the many others affected by the same issue. Note, I've also asked this in on the Apple Stackexchange site here: https://apple.stackexchange.com/questions/382002/iphone-mac-connection-issue-and-what-does-the-usbd-process-do
Thank you very much for your time.
MacBook Pro 15", 10.14