"photoanalysisd" consuming 99% CPU, How do I stop it on my iMac running macOS Sonoma.

Photoanalysisd has been running on my iMac for a combined total of over 140 hours. I set my Mac to not sleep at night hoping this process will finally complete.

It is consuming 98 to 99% of CPU time. It is raising my CPU temperatures to a range of 175 to 207°.

This thing should be classified as a virus.

Does anybody know how to stop it??


[Re-Titled By Moderator]

iMac 27″, macOS 14.6

Posted on Aug 29, 2024 3:53 PM

Reply
8 replies

Sep 14, 2024 6:25 AM in response to BaubR300

launchctl disable gui/$UID/com.apple.photoanalysisd

launchctl kill -TERM gui/$UID/com.apple.photoanalysisd


I tried both commands, and I had to sudo su before the second one. However, photoanalysisd remained running.


Force quit it manually (within activity monitor), along with photolibraryd. Then I did some cleaning up in my login items, retstarted my iMac, but photoanalysisd restarted, at the same 100% CPU usage as before.


Any other suggestions ? I am getting dangerously close to ditching Photos.app in favor of something else (I miss Aperture so much!). Adobe Photoshop Elements Organizer perhaps.


Amongst the other steps I tried to solve my issue (some with Apple Support, some on my down) :


  • Boot in Safe mode (only to see photoanalysisd running like it does constantly)
  • Emptied /Users/Me/Library/Caches content completely (followed by a reboot)
  • Repaired Photos.app library
  • Deleted every photo that was a referenced photo (for which I lost the originals or they were unimportant)
  • Ran MalwareBytes free version (no infection or nasty files found)
  • Let photoanalysisd ran for days. And days. And weeks. It must be at 200 hours as of this morning. And still running (it would beat the Energizer Bunny in any competition.. lol)
  • I have no unidentified faces or pets in People and Pets, but it says it's still saying Finding People.


My library had close to 85K pictures up to two weeks ago. I cleaned it up by removing duplicates, screen captures and insignificant photos. It's down to 56K.

Aug 29, 2024 4:00 PM in response to BaubR300

BaubR300 wrote:

Photoanalysisd has been running on my iMac for a combined total of over 140 hours. I set my Mac to not sleep at night hoping this process will finally complete.
It is consuming 98 to 99% of CPU time. It is raising my CPU temperatures to a range of 175 to 207°.
This thing should be classified as a virus.
Does anybody know how to stop it??


ref post by léonie—

kill photoanalysisd - Apple Community


Aug 29, 2024 5:24 PM in response to leroydouglas

Thank you for the reply. I’ve been to that link already and rebuilt the photo database.

Have tried to run the launch command; however the $UID variable is not defined with no explanation of how to define it. That command does not run under Sonoma. I get a variable undefined error and it lists UID variable as the issue.

Any other suggestions would be appreciated.

Aug 29, 2024 8:58 PM in response to Barney-15E

Thank you for the response. I didn't type the command. It was a copy/paste from another chat in the Apple Community from years ago. It looks like the $UID is an undefined variable in the command string.


Here's the text copied from Terminal

-----------------

Last login: Thu Aug 29 20:36:02 on ttys000

[Bob-Roths-Computer:~] bobroth% launchctl disable gui/$UID/com.apple.photoanalysisd

UID: Undefined variable.

--------------------


BTW, once the above command executes, then the next command to actually kill photoanalysisd is:

-----------------

launchctl kill -TERM gui/$UID/com.apple.photoanalysisd
--------------

It has the same variable which results in the same error message as above.

Thanks for the help!!








Aug 29, 2024 9:04 PM in response to Barney-15E

Thank you for the response. I didn't type the command. It was a copy/paste from another chat in the Apple Community from years ago. It looks like the $UID is an undefined variable in the command string.


Here's the text copied from Terminal

-----------------

Last login: Thu Aug 29 20:36:02 on ttys000

[Bob-Roths-Computer:~] bobroth% launchctl disable gui/$UID/com.apple.photoanalysisd

UID: Undefined variable.

--------------------


BTW, once the above command executes, then the next command to actually kill photoanalysisd is:


-----------------

launchctl kill -TERM gui/$UID/com.apple.photoanalysisd
--------------

It has the same variable which results in the same error message as above.

Thanks for the help!!


Aug 29, 2024 9:18 PM in response to BaubR300

UID should be defined. It is the user ID of the logged in user. If not defined for you, that could be a reason you have other issues. If you are the first user created on that Mac, you can substitute 501 for $UID.

id -u 

will show your user id.

It could be a difference in bash vs zsh. That was written when bash was the default shell. Now, it is zsh. Variable handling may be different.

Aug 29, 2024 10:14 PM in response to Barney-15E

Thank you for the info. Yes, I was the first user created so, using the id-u command, I verified my UID is 501. That info is much appreciated. I no longer get the error message.


However, the commands still did not stop the photoanalysisd process. I suspect something else is set or implemented to it keep running. Any other suggestions are appreciated and I'll continue to search the web, too.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"photoanalysisd" consuming 99% CPU, How do I stop it on my iMac running macOS Sonoma.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.