Saturday, February 05, 2022

Relentless beeping when plug iPhone into MacBook USB port -- it's maybe iTunes?

When I plug my iPhone 8 into my MacBook Air's USB port I get relentless beeping and the iPhone power icon flashes. Sometimes iTunes throws up a "received an unexpected response" error. I'm on Mojave iTunes.

I figured this was a bad USB cable or bad port or bad connection, but it's both ports and all cables and the phone connection is good. More importantly, I rebooted with no peripherals connected and switched to my admin account. Then every beep was associated with a new iTunes dialog asking me (yet again, and again, this is such a pain) to authenticate. When the dialogs ended the beeping stopped.

Stack Exchange has an article on this, but that's definitely connection issue related. This Apple tech article seems closest; but they also focus on cable issues.

I'm not entirely sure it's not something hardware related on my Air, but I think there's an iTunes component too.

The console shows:

I see: usbmuxsd errors, HandleUSMMuxConnect, iTunes Helper, MobileDeviceUpdater, "no such device". So iTunes is causing the beeps (though the underlying issue could be hardware).

From those clues I found these posts:

  • https://discussions.apple.com/thread/251691536: kill usbmuxsd related processes
  • https://discussions.apple.com/thread/6611777?answerId=27079314022#27079314022 - a bug in usbmuxsd that Apple may have fixed in later releases
  • https://discussions.apple.com/thread/6728641?answerId=6728641021#6728641021 has a discussion:
It's an iTunes 12 bug... Not sure who's responsible for usbmuxd at Apple, but they should be fired! This was extensively discussed and worked out here: itunes 12 will not recognize iphone

All credit to oskapt, who's post detailed the entire issue. The short version is a recent version of usbmuxd has a programming error that leads it to never close any connection. At the same time, it's constantly making new connections too. The end result is this background process actually hits the built-in UNIX limit on open connections by a single process (to prevent bugs like this from ultimately crashing an entire computer), and is blocked by design from functioning after that point. Once usbmuxd fails, iTunes can't see your iOS devices.

The fix is to quit usbmuxd, either via Activity Monitor or Terminal. It will automatically relaunch, and work again until it hits the limit. That thread has several suggestions for automated scripts to run every 24-48 hours to prevent this.

Update 2/20/22: I never solved this problem, but I did get a new phone and the beeping is gone. So either a connection problem with the old iPhone or a bug with the "trust relationship" between iPhone and MacBook.

Update 3/5/2022: In the process of cleaning out old iPhones I tried various iPhones and I tried iPhones that beeped on my Mojave iTunes machine on a different machine. I think it's a bug with establishing a Trust relationship. Probably fixed in later versions of iTunes.

No comments: