What is causing launchd to burn my CPU?

Solution 1:

There is an app called LaunchControl which provides a very nice interface for creating/checking/modifying/disabling launch daemons and agents. It's much easier than looking in 5 different folders for startup items. (I'm not affiliated with them in any way.)

I would go through and disable each one at a time until your problem disappears.

http://www.soma-zone.com/LaunchControl/

Solution 2:

Go to /var/log/system.log and see if there are any errors. Fixing those errors will solve the problem.

Reference: https://discussions.apple.com/thread/6616343?tstart=0

In my case, it was spotlight which was causing the issue. I disabled it and then launchd started taking more CPU. Enabling it back fixed the issue for me.

Solution 3:

Worth trying:

mkdir ~/Desktop/MyLaunchAgents ~/Desktop/LaunchAgents/ ~/Desktop/LaunchDaemons/

mv -vn ~/Library/LaunchAgents/* ~/Desktop/MyLaunchAgents/

sudo mv -vn /Library/LaunchAgents/* ~/Desktop/LaunchAgents/

sudo mv -vn /Library/LaunchDaemons/* ~/Desktop/LaunchDaemons/

Then reboot your computer, and see if it is still happening.

Note that moving the various files from those directories may cause some 3rd party apps to not work as expected after the reboot. If it doesn't help, you can put them back by reversing the mv commands

mv -vn ~/Desktop/MyLaunchAgents/* ~/Library/LaunchAgents/

sudo mv -vn ~/Desktop/LaunchAgents/* /Library/LaunchAgents/

sudo mv -vn ~/Desktop/LaunchDaemons/* /Library/LaunchDaemons/

and reboot again.

If it does help, then you'll need to restore the various files carefully, preferably one at a time, to see which one of them is causing the problem.