High cfprefsd CPU usage when using MacID

Update 5: Apple have replied to my bug report informing me that it’s a duplicate of another bug (#24570370). When that bug gets marked as fixed I will be able to see it and update you accordingly, but until it does we’ve done all we can do at this point.

Update 4: Thank you to everyone who’s provided a Bluetooth diagnostic report, I’ve now forwarded them on to Apple with bug report #26194733. 

Update 3: Clearing the OS X Bluetooth cache should help, even if not permanently. To clear the cache, click the MacID menu > More > Reset Bluetooth. It shouldn’t affect any paired keyboards or mice but will clear the cache.

Update 2: Other apps that use Bluetooth APIs on OS X are experiencing the same issue. Hopefully Apple will have a fix for this in the near future. Other people have been filing bugs with Apple too.

Update 1: A user has been kind enough to email to let me know that after reinstalling El Capitan, it has fixed the issue for them. Not an ideal solution by any means, but does help prove the theory Apple can fix it.

There are a few people reporting that while using MacID, the system is reporting high CPU usage for the `cfprefsd` process. I’ve never been able to reproduce this issue so it’s been hard for me to diagnose, but thanks to some helpful people I’ve been told it seems to happen when MacID is searching for your device to connect to.

Unfortunately this means that this is an issue internally where the system is accessing the Bluetooth plist file, and there’s not much I can do about that. If I stop MacID from scanning, then of course MacID would never connect to your device and it would be useless.

Thankfully this doesn’t happen to everyone, but if you are affected the more information you can provide about when it happens will help me narrow the issue down and file a decent bug report with Apple. What would be even more helpful is if you can send me a Bluetooth diagnostics report, along with your model of Mac and the version of OS X you’re using.

Here’s how to start a Bluetooth diagnostics report:

  • When the issue has happened, hold alt/option and click the Bluetooth icon in the menu bar
  • From the menu that appears choose “Create Diagnostics Report on the Desktop…”
  • After a moment a zip file will appear on your desktop, forward that file to the feedback email address and I’ll add it to the bug report with Apple

Any help you can provide will go a long way to getting this issue fixed. I can’t file a bug report with Apple until I can either reproduce the issue or forward on a report from someone who has. Thanks!

Make Apple Watch interactive notifications more reliable by waiting a moment before tapping a button

One of the best things about having an Apple Watch is the convenience of being able to action notifications directly from your wrist without having to get your phone out.

Many apps take full advantage of this convenience, like Tweetbot and Spark, and MacID is no exception. With Tweetbot you can “like” a mention, and with Spark you can mark an email as read. With MacID, you can unlock your Mac and snooze Proximity Wake requests (with more snooze options showing on the Watch than on iOS).

There’s one major difference between the other apps and MacID’s notifications on watchOS, which is that it’s really noticeable when MacID’s notifications don’t work. When you like a mention, you just tap it and assume it’s been liked. When you mark a mail as read, you do it and forget about it. But when you tap “unlock” for MacID, if it doesn’t unlock, it’s immediately apparent it hasn’t worked.

In actual fact, all watchOS notifications suffer from this. This has been a long-running issue since watchOS 2.0, and one that is yet to be fixed by Apple. As developers, there’s not a great deal we can do. The problem is that when you tap on a notification button on your Watch, sometimes the iOS app doesn’t get informed by watchOS; which means that the app doesn’t do anything.

There does seem to be one thing you can do, as the title of this post says, and that’s to wait just a moment longer after the notification appears on-screen on your Watch. Although this is frustrating, it does seem to work much more reliably. Give it a go, and let me know how you get on by tweeting @MacIDHelp.

MacID for OS X Extension – Set Slack Away

Here’s a small AppleScript extension which will set you as away on Slack when your Mac sleeps (if Slack is running):

on slackIsRunning()
  set isRunning to false
  tell application "System Events"
    set isRunning to (name of processes) contains "Slack"
  end tell
  return isRunning
end slackIsRunning

on setAsAway()
  activate application "Slack"
  tell application "System Events"
    tell process "Slack"
      keystroke "/away "
      keystroke {return}
    end tell
  end tell
end setAsAway

if slackIsRunning() then
  setAsAway()
end if

It works best if you drop it into MacID’s “onSleep” directory rather than “onLock”. It’s also worth noting that typing /away  in Slack while you’re away will set you as active, so if you’re already set as away this script will do the opposite!

For more information about extending MacID with AppleScript check this post out.