Contribute
Register

Idling for 10 minutes causes Sierra to lag/freeze for a couple of minutes

Status
Not open for further replies.
There is a simple fix to the lags/hangs after 5 minutes of idle. Simply disable the offending mediaanalysisd which is part of Apple's video processing framework. Photos will just work fine, you'll only miss some metadata on videos, but it's not a big deal.

I'm guessing this will likely break the analysis aspects of the Photos app, such as facial/object recognition?
 
I'm guessing this will likely break the analysis aspects of the Photos app, such as facial/object recognition?

I am not really sure, I didn't really use this feature much. I think photoanalysisd does the facial/object recognition stuff, mediaanalysisd seems to process videos.
 
This sounds promising but I'm getting caught up:

JaredsiMac:~ jaredminiman$ sudo rm /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist
override rw-r--r-- root/wheel restricted,compressed for /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist? y
rm: /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist: Operation not permitted

A little help here, please! I assume SIP is getting in my way?

You can disable mediaanalysisd by issuing a launchctl unload -w command on it. This will stop the process and disable it for the future. This way you don't have to delete the plist file, which may be prohibited by the SIP settings. This is a nicer way to deal with the problem anyway.
 
You can disable mediaanalysisd by issuing a launchctl unload -w command on it. This will stop the process and disable it for the future. This way you don't have to delete the plist file, which may be prohibited by the SIP settings. This is a nicer way to deal with the problem anyway.

I get this when i try to do that:
sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist
/System/Library/LaunchAgents/com.apple.mediaanalysisd.plist: Could not find specified service

What should I do?
 
I am not really sure, I didn't really use this feature much. I think photoanalysisd does the facial/object recognition stuff, mediaanalysisd seems to process videos.

Looks like you are correct. After disabling mediaanalysisd and re-enabling iCloud Photos, facial/image recognition appears to be functioning normally for me. Really can't thank you enough for this fix! This was my only issue on an otherwise flawless system.
 
Last edited:
I get this when i try to do that:
sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist
/System/Library/LaunchAgents/com.apple.mediaanalysisd.plist: Could not find specified service

What should I do?

Same issue here, cant for the life of me find that mediaanalysis deamon.

Edit: guest account seems to be fine, so it must be a software issue? I do use iCloud photo and have a quite large library but cant find that medianalysis deamon. Would anyone be able to point me in the right direction?
 
Last edited:
I get this when i try to do that:
sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist
/System/Library/LaunchAgents/com.apple.mediaanalysisd.plist: Could not find specified service

What should I do?

Found a fix, just locate that fine in the System Library folder and delete it (I backed it up first, and then deleted it just in case). But this has totally fixed my issues :) YAY!
 
There is a simple fix to the lags/hangs after 5 minutes of idle. Simply disable the offending mediaanalysisd which is part of Apple's video processing framework. Photos will just work fine, you'll only miss some metadata on videos, but it's not a big deal.

Enter the following command in Terminal:

sudo rm /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist

and then log out/in. Problem solved. :)

If you prefer more elegant solutions, you can use the launchctl unload command instead of the simple delete. For a comlete peace of mind, you can also disable photoanalysisd.

I can't thank you enough. I disabled SIP, backed up and removed this file, reenabled SIP, and now my system is hang-free. After months of wrestling with this, my Hackintosh is finally back to normal. You rock!
 
Status
Not open for further replies.
Back
Top