Contribute
Register

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

Status
Not open for further replies.
Without injection I get a black screen.

The dummy kext seems to do the trick. Now trying to tackle artifacts in my H264 playback
 
If I use de dummy kext, some gpu task are working wrong, video playback, photo editing on photos app, etc, but the app not make my system freeze,
 
This worked for me. Thank you @ueer3fc!

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.
 
So this FINALLY got my system to stop randomly freezing however it still freezes during certain CPU intensive tasks like Lightroom photo import processing or doing a quick look on a Sony RAW file. I'm using a i7 7700 with my Deskmini 110. So I'm guessing that Gen_ is correct and that the iGPU in my 7700 is not defined 100% correctly.

"I had this problem on High Sierra and fixed it with this terminal command:

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

This is not a true solution. It's avoiding the problem. Mediaanalysisd is a machine learning system process that scans your photos and adds what it learns from Apple big data about said pics to your spotlight, Photos app, Siri etc etc. No plist, no sweet 'oh my spotlight gets me when I search for Sarah's dog'. Same for Siri too, which needs this process to understand images past the file size.

The process is mainly executed as GPGPU code on your graphics card, so if you're using non-Apple EFI (in your video card), and don't have a perfect DSDT it's possible to get the lag/console issues because the amount of GPU power you have at your disposal is miscalculated and the GPU still has to try to provide 60fps to the display. Hell even if you do if there isn't a direct equivalent card it could be likely.

Most commonly it seems to be happening to Nvidia GPUs because the soft switcher makes it quite easy to have a 650ti be pre-calculated to perform like a 660ti, especially with confusing names and DevIDs focused on 'getting it to work' and not 'getting it to imitate perfectly'.
 
I'm on Mojave with a RX Vega 64 and experienced the same freezes a few minutes after leaving my build inactive. Same frozen display with mouse moving and able to SSH into the system. Last system.log line:

com.apple.xpc.launchd[1] (com.apple.DumpGPURestart): Service only ran for 0 seconds. Pushing respawn out by 10 seconds

I have a LG 5120x2160 display. I activate this resolution using SwitchResX.

The freeze seems to happen when the launch agent com.apple.mediaanalysisd is triggered. Looking into /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist, I noticed this line:

RequireScreenSleep = :true;

My understanding is that when com.apple.mediaanalysisd is triggered, it attempts to put the display in sleep mode and this is causing the freeze.

I disabled the launch agent with:

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

(No need for sudo)

This seems to solve my problem. According to launchctl documentation, it should remain disabled after a reboot. It may need to be disabled again after a OSX update.
 
What surprises me about this is that it isn't happening to everyone. I wonder if it is restricted to Skylake/Kabylake CPUs.

Is anyone running into this issue when using non-Skylake (6th gen)/Kabylake (7th gen) processors?

EDIT: never mind, just went through the thread and looked at people's sigs and this seems like effects all processor generations.
 
Having the same issue. I just installed a sapphire RX580 Pulse in my rig. Worked great until I restore my photo library. After a few minutes the machine is unusable.

When I first installed the new card, everything ran great for a couple of days. Even photos. So I tried to upgrade to Catalina, due to an old EFI osx patio fix file in my clover, my screen was black during the upgrade to catalina. I recovered High Sierra with time machine, but found that Catalina had upgraded my photo library stored on a different volume. After recovering the correct one from time machine is when my trouble started. I have painstakingly reviewed all 50 pages and saw that only two things work for me, disabling photoanalysisd or using a new photo library.

So why did my machine work fine for a day, before this happened? What has changed?
1. Remove the Osx Aptio Fix driver from clover install
2. Installed latest Lilu and WhatEverGreen kexts
3. Restored photo library
3.1 After the restore I opened it and the photo library started to repair it.
3.2 Out of 49000 photos scanned 1690 were remaining
3.3 Stability out the window. System hangs after a few minutes now
4. after reboot Disabled mediaanalsysd and rebooted. Still hanged.
5. Removed the mediaanalysisd.plist - System doesn't hang, but system is very laggy

Big brain time. Currently in safe mode repairing the photo library. Will let run overnight and see what happens.

I really think that this is tied to a corrupt photo library, we will see. My gut says that breaking out of the repair and the photo analysis corrupts the library. Once it is fixed I suspect this problem will go away. However, what is really the core of this issue is the RX580. This never happened on my nvidia card. What is surprising is that the apple web site recommends deleting the media analysis.plist file and says it will be regenerated by the system. I did this, did not see it get regenerated, and saw the machine be just generally sluggish.

Solved
Solution was to remove the photo library and upgrade to Catalina. This took a little prep for me since I had to remove any old Kext and .EFI files that where old. Not a big deal, but wanted to get everything right in high sierra before I pull the trigger.

I then upgraded from the app store. Made me nervous since no progress was displayed after the machine rebooted. I assumed it was performing the upgrade and read that some people with the sapphire RX580 pulse saw the same thing. So, I went to run some errands and when I returned my machine was upgrade to Catalina! I then created a new library and when into preferences to link it to iCloud. My photos all downloaded in a few hours, and photo analysis is running in the background and not killing my machine.

I think my hypothesis that my old photo library was corrupted was true, and that if you are having this issue you should recover the same way I did. Good luck and Cheers!
 

Attachments

  • AB3A59DF-1EEB-4CF9-AADB-4DDFC109F231_4_5005_c.jpeg
    AB3A59DF-1EEB-4CF9-AADB-4DDFC109F231_4_5005_c.jpeg
    44.1 KB · Views: 175
Last edited:
So on and off for the last week I let my mac perform its photo analysis, while still being able to fully utilize my machine, and it just finished tonight! All good and I am really liking Catalina!
 
Status
Not open for further replies.
Back
Top