packerfan16

Q: launchd, UserEventAgent sucking my CPU dry after Yosemite upgrade

I've seen a couple other posts about this, but they haven't fixed the problem for me.

 

Background:

 

I have a 2012 rMBP, fully loaded.

Two user accounts, one for work, one for home.

After install of Yosemite (from work account), everything seemed fine.  This issue only occurs in my personal account.

 

I narrowed the issue down to a plist file from my company's MDM software (AirWatch) that is failing to launch.  The system log says this (x'd out my company user ID for obvious reasons):

 

"10/20/14 8:36:17.961 PM com.apple.xpc.launchd[1]: (com.airwatch.mac.agent[66517]) Could not find and/or execute program specified by service: 2: No such file or directory: /Users/xxxxxx/Applications/AirWatch Agent.app/Contents/MacOS/AirWatch Agent"

 

There are HUNDREDS of these messages and it seems to continually try to launch the stupid thing.  I think the problem is that it's trying to launch an application from another user account that it does not have access to (since the MDM software is only installed in my work account, as you can see above).  The thing that confuses me is that the plist file did not change between Mavericks and Yosemite, so why does it do this now?  Is there something in the plist that could impact how the Yosemite launchd tries to execute application-specific launch services?  I guess I'm asking if the issues lies in the AirWatch plist file or the Yosemite launch daemo

 

Any ideas on how to fix this??

MacBook Pro (Retina, Mid 2012), OS X Yosemite (10.10)

Posted on Oct 20, 2014 6:45 PM

Close

Q: launchd, UserEventAgent sucking my CPU dry after Yosemite upgrade

  • All replies
  • Helpful answers

  • by statreal,

    statreal statreal Oct 23, 2014 12:05 PM in response to packerfan16
    Level 1 (0 points)
    Oct 23, 2014 12:05 PM in response to packerfan16

    I had the same problem few days ago and I tried SMC and PRAM reset with no result.

    I solved this problem by repairing system disk permissions with Disk Utility.

    You may restart after the disk permissions repair or wait a while since the files with new refreshed permissions are reloaded by processes.

    Hope that it makes your system fixed.

     

    MacBook Pro (Retina, End 2012), OS X Yosemite (10.10)

  • by packerfan16,

    packerfan16 packerfan16 Oct 23, 2014 12:11 PM in response to statreal
    Level 1 (0 points)
    Oct 23, 2014 12:11 PM in response to statreal

    Thanks for the suggestion.

     

    I actually did try that as well.  After I repaired permissions the first time, luanchd went from ~75% CPU utilization down to about 50%.  A few reboots later, it's back up to the higher of the two, and re-repairing the permissions doesn't seem to have an impact. 

  • by C. Scott Gilbert,

    C. Scott Gilbert C. Scott Gilbert Jan 1, 2015 11:50 AM in response to packerfan16
    Level 1 (20 points)
    Jan 1, 2015 11:50 AM in response to packerfan16

    Had the exact same problem on a brand new MacBook Pro (Retina, 15-inch, Mid 2014):

     

    • My fans were running very loud at about 6,000 RPM.
    • Launchd and UserEventAgent were hogging the CPU (visible in the Activity Monitor app).

     

    For me — it was the com.google.keystone.agent.plist LaunchAgent.

     

    Hundreds of these log entries were being written to my system log (visible via Console app) every second:

     

    1/1/15 2:31:59.105 PM com.apple.xpc.launchd[1]: (com.google.keystone.user.agent[33096]) Could not find and/or execute program specified by service/GoogleSoftwareUpdateAgent

     

    I removed the com.google.keystone.agent.plist from my LaunchAgent folder (./Library/LaunchAgents) — rebooted — and the problem was resolved.

     

    Based on information I gathered with a few quick Google searches the core issue seems to be Google Chrome's auto-update software run amok.

  • by essandess,

    essandess essandess Dec 18, 2015 12:26 AM in response to packerfan16
    Level 1 (28 points)
    Applications
    Dec 18, 2015 12:26 AM in response to packerfan16

    Same issue after 10.11.2 plus Xcode upgrades.

     

    DIdnt see anything obvious in the logs, and a PRAM reset and deleting ~/Library/Preferences/com.apple.* failed to fix it as some reported.

     

    My fix, for each running user account:

    sudo launchctl list | grep UserEventAgent

    locate com.apple.UserEventAgent-System.plist

    sudo launchctl unload /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/System/Library/LaunchDaemons/com.apple.UserEventAgent-System.plist

    This appears to be an Xcode related issue; I filed a bug report.

  • by lenw,

    lenw lenw Feb 13, 2016 11:06 AM in response to essandess
    Level 1 (0 points)
    Feb 13, 2016 11:06 AM in response to essandess

    100% agree - in my case it was the watchsimultor SDK: /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platfo rm/Developer/SDKs/WatchSimulator.sdk/System/Library/LaunchDaemons/com.apple.User EventAgent-System.plist

  • by moetherat,

    moetherat moetherat Mar 12, 2016 4:05 AM in response to essandess
    Level 1 (0 points)
    Mar 12, 2016 4:05 AM in response to essandess

    The same with me: AppleTVSimulator SDK causing the same issue.
    While unloading the UserEventAgent-plist within the SDK fixes the issue, it reappears after a reboot.

    On the other hand, unloading AND disabling it (with the -w switch) is no option either, since it causes various other issues.

    Therefore: Has anyone found another permanent solution to this problem?

  • by Falux,

    Falux Falux Apr 4, 2016 12:16 AM in response to essandess
    Level 1 (4 points)
    Apr 4, 2016 12:16 AM in response to essandess

    Thanks a lot, this fixed it right away.

  • by essandess,

    essandess essandess Apr 4, 2016 4:14 AM in response to Falux
    Level 1 (28 points)
    Applications
    Apr 4, 2016 4:14 AM in response to Falux

    Thanks a lot, this fixed it right away.

     

    It turns out that wasn't great advice—this plist coincides with one in /System/Library, and unloading it will break stuff.

     

    I tracked the problem on my box to Spotlight.

     

    To fix:

     

    1. Reload the plist
    2. mdutil -a -i off
    3. mdutil -a -s
    4. mdutil -i on /

    Turn on Spotlight for every drive you want. An erase may be necessary: mdutil -E /

  • by Falux,

    Falux Falux Apr 4, 2016 6:25 PM in response to essandess
    Level 1 (4 points)
    Apr 4, 2016 6:25 PM in response to essandess

    Appreciate the follow-up. I've removed a bunch of entries from /Users/[me]/Library/LaunchAgents (google.keystone, org.virtualbox, com.onlineapp...) and reloaded com.apple.UserEventAgent-System.plist. Been running fine for the last 24 hours.

  • by essandess,

    essandess essandess Apr 5, 2016 3:34 AM in response to Falux
    Level 1 (28 points)
    Applications
    Apr 5, 2016 3:34 AM in response to Falux

    If it's the same problem I had, expect it to return after a few days. Then try mucking with mdutil.

     

    And make sure you haven't broken automated security updates with Chrome etc. if you removed plists.

  • by Jeff Palmucci,

    Jeff Palmucci Jeff Palmucci Aug 17, 2016 6:23 PM in response to essandess
    Level 1 (4 points)
    Aug 17, 2016 6:23 PM in response to essandess

    essandess, thanks! fixed it for me.

  • by batenhorst,

    batenhorst batenhorst Sep 8, 2016 1:51 PM in response to C. Scott Gilbert
    Level 1 (8 points)
    Sep 8, 2016 1:51 PM in response to C. Scott Gilbert

    A+ information! Pulling the com.google.keystone.agent.plists from /Library/LaunchAgents and /Library/LaunchDaemons was the win ticket. Keep up the great work Gilbert!