How to fix coreaudiod 100% CPU usage

Today, when I booted my Mac I noticed it was really unresponsive, and the fans immediately started going up like crazy. Through Activity monitor, I found the cause for this: coreaudiod was using 100% of my CPU. And force quit did not help.

core_audio_by_rob190975Core Audio is the framework that manages audio on OS X, and it’s awesome, except when it suddenly decides to go crazy and suck all my CPU.

After some googling, I found this post by Axel Jensen, and it literally saved my day.

Basically, for some unknown reason, my /Library/Preferences/Audio/ folder had disappeared, and that really angered coreaudiod. As Axel found, the solution is pretty simple: recreate the folder and set the correct permissions, with just two terminal commands.

sudo mkdir /Library/Preferences/Audio
sudo chown -R _coreaudiod:admin /Library/Preferences/Audio

I did some additional research and found out that it’s also safe to restore that folder from a Time Machine backup, or any other backup really, just make sure to set the proper permissions with the second command above. This way I was able to get my aggregated audio interfaces back, and I did not have to re-create them in Audio MIDI Setup.