I know there's 2-3 questions in this community relating to connection issues between iPhones and Macs via a USB connection, and I 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 and some Macs?
Update 12 June 2023:
Please see @Wolf82's detailed answer that they have posted here: iPhone keeps disconnecting and reconnecting to MacBook via USB
TL;DR summary from Wolf82:
The issue of reconnecting iPhones on Macbook/Pro seams to be repeatably caused by the USB sockets in the MacBook and/or the USB connectors on the used lightning cable. Contact resistance of the connector prongs makes the iPhone disconnect and reconnect in high power charging mode.
A solution might be to clean or bend the connectors contacts within the USB socket. For me cleaning solved the issue on one port repeatably! A deeper cleaning or reworking the sockets might fix it permanently.
Thank you @Wolf82.
Here is the original issue below.
The issue
The issue is that some Macs and iPhones don't have a stable connection when connected via the Apple USB Lighting cable. The iPhone often attempts to reconnect very quickly, sometimes reconnecting 2-3 times per a second and continues to do this in an endless loop. Sometimes it will stop if you wiggle the USB Lighting cable, insert it into another USB port or pause the particular Mac process usbd
in Terminal.
For me, the issue appears to be more prevalent with the left USB port on my MacBook Pro (but does happen with the right USB port occasionally). Additionally, it is much more likely to happen when the iPhone is on a low charge (i.e. 0-30%), but is known to happen on higher charges occasionally like 70-80%.
Strangely, this doesn't affect every iPhone connecting with my Apple USB Lighting cable or with my iPhone connecting to other Macs (on different OS versions) using the same cable. So I'm quite puzzled why this is happening?
Temporary solution
A temporary solution answered in previous questions is to run a sudo command in Terminal to stop the usbd
process from running on your Mac. The command is sudo killall -STOP -c usbd
, which pauses the process until you either reboot your Mac or enter the command sudo killall -CONT -c usbd
to restart the process. Based on comments to this temporary solution, it appears to fix the connection issue for most people.
Troubleshooting steps so far
Other than pausing the usbd
process, 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 the official Apple USB to Lighting Cable.
We have performed so many troubleshooting steps and most of these steps don't seem to fix it, except pausing the usbd
process. However, Apple engineers refuse to believe the usbd
process is causing the issue. The troubleshooting steps we have undertaken so far:
- Reset NVRAM and SMC controller
- Booted in SAFE Mode
- Created a new user on my MacBook Pro
- Installed a fresh partition and install of macOS Catalina 10.15
- Reinstalled mobile device firmware package on my MacBook
- Reset all iPhone settings (but not wiped it and reset to factory settings)
- Deleted non-Apple launchdaemons on my Mac
- Disabled anti-virus software (Intego's VirusBarrier) and VPNs on my Mac
- Deleted the Mac's plist in the lockdown folder associated with my iPhone. This plist is used to check that the Mac and my iPhone have trusted each other previously
- Reset privacy settings on my iPhone. Resetting privacy settings, similarly deletes the trust file on the iPhone which is used to check you have trusted the Mac, similar to the lockdown plist on the Mac
- Triaged and booted my MacBook Pro into macOS High Sierra 10.13 at the Apple Genius Bar
- Replaced the MacBook Pro's logic board and I/O board
- Tried multiple iPhone XS at the Apple Genius Bar, and all exhibiting the same issue with their own Apple USB to Lighting Cables
After the Apple 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 Apple USB Lighting Cables. I'm not sure which iPhone models they tested, but they tried it with the iPhone XS and XS Max at the very least.
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, the new cables exhibit the issue within a month of using them, but again not with all Macs or with all iPhones?
My own investigations
Although I'm not 100% fluent with how the software works, I've tinkered around in terminal with some commands, deleted the lockdown plist file through rootless, read console log event messages relating to my iPhone connection; and tried searching online for possible solutions explaining what the usbd
process does. But no solution so far fixes the issue.
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. I don't believe it is used for any other USB connections, as it works fine with my external hard drives/flash drives.
The man page describes the usbd
process as follows:
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 you a stable connection. You can observe the difference in the power output running the command system_profiler SPUSBDataType
in terminal.
When the usbd
process 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
process and entering the above command results in the following power output:
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Furthermore, other than pausing the usbd
process, the only other times the connection works is if my Mac is running Linux or Windows on a partition, but I don't think these provides the same power output as if it was running on macOS.
Conclusion and question
After doing so many troubleshooting steps with Apple, they suggest it's a USB Lighting cable issue, but this doesn't explain why the same cable works with other Macs or other devices.
The only real (but temporary) solution is to pause the usbd
process, but as I've established that reduces the power output of the USB connection to the iPhone, meaning charging will take longer, albeit with a stable continual connection.
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. Thank you very much for your time.
Please note, this is my first question on this stackexchange, so apologies if there's any issues with my post.
sudo killall -STOP -c usbd
command will stop the process from running indefinitely until you restart your Mac or until you entersudo killall -CONT -c usbd
. Whereas quitting it from activity monitor will not stop it from restarting on its own..