20

Since about a month, my MBPr sometimes starts up it’s fans and is getting really hot. The activity monitor tells me, that this is because of the UserEventAgent, which runs with 100% CPU usage.

This spike can last for about 10 to 30 minutes and then everything goes back to normal. There seems to be no reason behind it. There is no pattern, when it starts and nothing I can do, to stop it. The same pattern still applies when I don’t do anything and just wait. It still takes a serious amount of time, until UserEventAgent goes back to normal.

I also checked the log to find out, if there are any messages, that could give me a hint, but the messages differ every time. There is no message that always causes the UserEventAgent to start up the fans and there is none to stop it.

The only thing I noticed is a huge number of errors, logged in the UserEventAgent statistics:

enter image description here enter image description here

Is there any way to find out, what causes the UserEventAgent to go haywire? Maybe a terminal command, or something like that?

As a note: Testing it will take some time, because I will have to wait for the next spike to test solutions.


Update January 2nd, 2015

I just got a new spike.

02.01.16 12:18:14,403 UserEventAgent[47]: Failed to send message because the port couldn't be created.
02.01.16 12:18:14,404 UserEventAgent[347]: com.apple.TMHelperAgent.SetupOffer enabled
02.01.16 12:18:17,234 UserEventAgent[47]: Failed to send message because the port couldn't be created.
02.01.16 12:18:17,235 UserEventAgent[347]: com.apple.TMHelperAgent.SetupOffer enabled
02.01.16 12:19:26,417 UserEventAgent[47]: Captive: [UserAgentDied:143] User Agent @port=101939 Died
02.01.16 12:19:26,422 com.apple.xpc.launchd[1]: (com.apple.UserEventAgent-Aqua[347]) Service exited due to signal: Killed: 9
02.01.16 12:19:26,681 UserEventAgent[16347]: Failed to copy info dictionary for bundle /System/Library/UserEventPlugins/alfUIplugin.plugin
02.01.16 12:20:27,224 UserEventAgent[45]: Failed to copy info dictionary for bundle /System/Library/UserEventPlugins/alfUIplugin.plugin
02.01.16 12:20:27,227 UserEventAgent[45]: Captive: CNPluginHandler en0: Inactive
02.01.16 12:20:27,794 UserEventAgent[45]: Received XPC_ERROR_CONNECTION_INVALID for connection com.apple.backupd.xpc
02.01.16 12:20:27,799 UserEventAgent[45]: Failed to send message because the port couldn't be created.
02.01.16 12:20:28,000 UserEventAgent[45]: nsurlsessiond_events plugin: adding token 1 for client softwareupdate_download_service
02.01.16 12:20:30,795 UserEventAgent[45]: Captive: [CNInfoNetworkActive:1748] en0: SSID 'Boop' making interface primary (protected network)
02.01.16 12:20:30,795 UserEventAgent[45]: Captive: CNPluginHandler en0: Evaluating
02.01.16 12:20:30,797 UserEventAgent[45]: Captive: en0: Probing 'Boop'
02.01.16 12:20:30,897 UserEventAgent[45]: Captive: CNPluginHandler en0: Authenticated
02.01.16 12:20:30,921 com.apple.xpc.launchd[1]: (com.apple.UserEventAgent-LoginWindow) This service is defined to be constantly running and is inherently inefficient.
02.01.16 12:20:31,047 UserEventAgent[217]: Failed to copy info dictionary for bundle /System/Library/UserEventPlugins/alfUIplugin.plugin
02.01.16 12:20:31,072 UserEventAgent[217]: user agent networkd: built Nov  3 2015 13:38:22
02.01.16 12:20:34,359 UserEventAgent[45]: assertion failed: 15C50: com.apple.fsevents.matching + 4704 [80662126-A833-3279-8A32-49393FD4E964]: 0x0
02.01.16 12:20:44,822 com.apple.xpc.launchd[1]: (com.apple.UserEventAgent-Aqua) This service is defined to be constantly running and is inherently inefficient.
02.01.16 12:20:45,031 UserEventAgent[269]: Failed to copy info dictionary for bundle /System/Library/UserEventPlugins/alfUIplugin.plugin
02.01.16 12:20:45,064 UserEventAgent[269]: com.apple.TMHelperAgent.SetupOffer enabled
02.01.16 12:20:45,167 UserEventAgent[269]: user agent networkd: built Nov  3 2015 13:38:22
02.01.16 12:20:45,453 UserEventAgent[269]: received an unknown event from daemon
02.01.16 12:22:12,000 kernel[0]: process UserEventAgent[45] thread 1395 caught burning CPU! It used more than 50% CPU (Actual recent usage: 86%) over 180 seconds. thread lifetime cpu usage 90.014261 seconds, (88.775576 user, 1.238685 system) ledger info: balance: 90002688195 credit: 90002688195 debit: 0 limit: 90000000000 (50%) period: 180000000000 time since last refill (ns): 104457330065 
02.01.16 12:22:20,007 spindump[442]: Saved cpu_resource.diag report for UserEventAgent version ??? (???) to /Library/Logs/DiagnosticReports/UserEventAgent_2016-01-02-122220_Hennings-MacBook-Pro.cpu_resource.diag

If you want to take a look at the report, you can find it here: https://gist.github.com/hpohlmeyer/da3a91c66061c8572ebe

There is no additional message when the process returns to its normal CPU load, but anyone of you knows what to look for in the logs?!


Update January 23rd, 2015

Lately the process won’t go back to normal after some time. I have to restart my mac in order to bring back a normal cpu usage of the UserEventAgent. I tried to close all running apps, but that does not seem to have any effect at all.

My guess is, that it might be a driver related problem, but I have no clue how to track it down. Is there any way to do that?

Ok, currently even a restart does not help. Battery is dead in an instant and fans are constantly running at full speed. I am so annoyed!

2
  • Please search the system log for UserEventAgent and add a typical spike related event found their to your question.
    – klanomath
    Commented Dec 27, 2015 at 11:09
  • Thanks, I’ve added a log entry, but I don’t know if that matches the lag spike I had today. I will update this post again, if there is a new spike …
    – Afterlame
    Commented Dec 27, 2015 at 11:19

3 Answers 3

10

Ive just solved this by disconnecting and reconnecting the power cable from Mac. The light was green, battery indicator on the screen was saying that the battery is charged but maybe there was power cable tip misalignment or something that caused this issue.

5
  • 4
    WHOA. Crazy. Same was happening to me, which is how/why I found this thread, and I just tried your power cable trick, and it WORKED! Both UserEventAgent and launchd had been each burning about 50% of my CPU, now both nothing. Thanks!!! Commented Dec 7, 2017 at 1:15
  • Cool, how did you find out this?
    – Bernhard
    Commented Jan 15, 2018 at 13:24
  • The problem occurs every other day. Disconnecting the power cable stops high cpu load. But I am a bit nervous as it happens pretty often.
    – Bernhard
    Commented Jan 23, 2018 at 21:10
  • 1
    This worked for me too. Maybe what's happening is that it stops doing whatever it tried to do because of switching to Battery mode? (Sometimes I'm cautious about unplugging because in some occasions it makes the bluetooth keyboard disconnecting forever until a reboot)
    – DNax
    Commented Jan 10, 2019 at 20:29
  • This is another "me too" comment. How strange! My fan was going crazy as was UserEventAgent, I found this post, briefly removed and then reconnected my MagSafe and it all just went away!
    – uhoh
    Commented Mar 30, 2020 at 3:40
7

Same issue. I completely reinstalled 10.11.3 on an erased drive and the problem persists. This is an OS X bug so send Apple a bug report.

My temporary solution is to disable the launch daemon:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.UserEventAgent-System.plist

But you must remember to load it prior to the next boot or in safe mode, or else many things will fail at the next boot.

Unfortunately, we must wait for Apple to get their act together on this one.

3
  • has this been fixed yet? I'm just now having the exact same problem (October 2016)
    – gabeio
    Commented Oct 6, 2016 at 21:45
  • strike that downloaded malwarebytes and preformed a scan to find I apparently had adware which seems to have been the cause.
    – gabeio
    Commented Oct 7, 2016 at 3:09
  • @gabeio Nope, have the same issue today on High Sierra, fresh install.
    – Mint
    Commented May 6, 2018 at 22:10
7

In my case it seemed to be the Wacom tablet driver.
Wacom has updated its driver to 6.3.15-2 RC. The changelog says:

  • UserEventAgent hangs at or near 100% CPU usage at startup

I just updated to this driver, and it seems to work fine.


If the driver update does not help, deleting those files also fixed this problem for me:

/Library/LaunchAgents/com.wacom.wacomtablet.plist
/Library/LaunchDemons/com.wacom.displayhelper.plist

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .