DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: Controlling photoanalysisd

Collapse
gjbianco profile image
Guy Bianco IV Author

If you look again, I actually do disable it as part of the cron. The problem is that something in the OS re-enables that service every so often. Running it once is not actually permanent.

Removing the plist should also work, but I didn't want to (re)move anything tied into the system.

Collapse
gordonaspin profile image
Gordon Aspin

I missed that, you do disable it but only in the gui context which is created every time the user logs in and why it keeps be β€œre-enabled”. Your disable is only for the current GUI login. The OS is behaving as designed.

If you disable it in the user context, it will never be started again. Once and done :)

launchctl disable user/$(id -u)/com.apple.photoanalysisd

Thread Thread
gjbianco profile image
Guy Bianco IV Author

That's quite a bit nicer! Testing it out currently and will update the article once I'm satisfied it worked (not that I doubt you, just want to make sure).

Thread Thread
santafearttweet profile image
incidental intention

Hi Guy,
all this code stuff is unknown to me. I was using a command in Terminal to stop photoanalysisd that I found somewhere. It only works temporary and photoanalyssid take up over 90% of my CPU per activity monitor. Could you please give me instructions where I enter: launchctl disable user/$(id -u)/com.apple.photoanalysisd
I am not fmailiar with any of these procedurea and do not understand code at all. Is there a way to guide me through this in a simple way?
Thanks, Walter

Thread Thread
gjbianco profile image
Guy Bianco IV Author

I've updated the article to reflect the advice from Gordon. You should be able to run the commands provided in Terminal like you've been doing. You should only have to run them once, however! Hope this helps :)

Thread Thread
santafearttweet profile image
incidental intention

Thank you very much.
I'll try this.
Sorry, I had a lot of typos in my previous post!
Thanks