Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

why is photoanalysisd not scanning my library in Big Sur?

I installed Big Sur when it became available - firstly, big improvements on Catalina!


I've some big photo libraries, and initially there was a big acceleration in scanning of the one set as System Photo Library. Then dead stop - nothing now for a week. Still plenty to scan... I've tried setting other libraries as the System Photo Library, both big and small libraries in terms of photo count, again, nothing. And photoanalysisd shows no work on the Activity Monitor.


I'm leaving it overnight with no other apps running. The libraries are on an external hard drive - this hasn't previously been a problem in their being scanned. And wasn't after the initial installation of Big Sur.


I realise most people want to stop photoanalysisd and related - I get it. I want to get the job done by a useful tool, then I might seek to block it. But I do at the moment want it running - and it isn't.


Any advice appreciated!


J

iMac 27″, macOS 11.0

Posted on Nov 28, 2020 12:42 AM

Reply
Question marked as Best reply

Posted on Jan 28, 2021 7:41 AM

@jmernin — Thanks for your hint! I suffered the same problem! (Although) my photos were at the internal SSD at the default location: ~/Pictures/Photos Library.photoslibrary


TL;DR:

  1. Remove Login Items -> I did it.
  2. Malware Scan -> I did not do it.
  3. Configuration Reset -> I didn't nest them at all, but did some grooming. See details below. In particular deleted some orphaned .plist files from Daemons/Agents which were already uninstalled/manually-deleted but their plist file remained.
  4. Maybe it was neither #1 or #3 but simply the time factor. Because alltogether the computer was on 4-5 days entirely, mostly idle, photoanalysis alltogether only needed about 1h of accumulated CPU time over those 5days mostly being idle. Had plenty of "missed opportunities". Crappy algorithm.


Feedback to Apple: Going through this on each macOS update is a UX nightmare! Either make that automatic magic behind the scenes work properly (=swiftly, not waiting 4-5 days mostly idle!) or offer an explicit menu command or button "Run curation & face-detection now" with a pause/resume button, should you need your computer resources.




Long Story:


Note that in earlier times my Photos.app Library was an Aperture Library, which was converted when I upgraded from macOS 10.12 Sierra to 10.15 Catalina.


Already when updating to Catalina I suffered from photoanalysisd 's poor implementation. Nothing ever happened. Only when I configured power management to run infinite, once after an overnight session it had kicked in, and still on the morning it was running, and I left it. But then at least it was done.


But this time when upgrading from macOS 10.15 Catalina to macOS 11.1 Big Sur the conversion progress sucked even more!


The start was ok: Upon first launch, the app's view was blocked with an explicit message "Converting…". But after some time it was done. Transparent to the user, obvious progress, no voodoo. Ok, I thought.


After that I imported my last 3 months of photos/videos from two iPhones via USB-cable into Photos.app


Then a subsequent TimeMachine backup. Which was more or less exactly the size of my photo library. So all old master-files and new master-files plus caches/database-files were changed (on a filesystem level), so TimeMachine deemed them backup-worthy.


But then came the long frustrating wait.

Curating showed as "in progress" and face-detection as well.

Left it on for two entire days (48h) and nothing happened, photoanalysisd accumulated no CPU time, the progress indicator in Photos.app UI remained where it was forever.


Had tried to leave my MacBook Pro Retina 15in (Mid 2014) running with screen on, and with screen off.

With Photos.app in foreground or hidden in background or totally off.

With other apps on. With nothing but Finder.

All kind of permutations. To no avail!


The UI sent ambiguous mixed messages:

  • Sidebar > Photos > Library: "Leave device connected to power".
    • Quite clear. Whether Photos.app in foreground or hidden in background or totally off not mentioned. So seems to not matter.
  • Sidebar > Photos > People: "… Photos will continue scanning your remaining X photos when you're not using the app and your Mac is connected to power."
    • "when you're not using the app" is very ambiguous
      • in foreground but not performing any interaction?
      • in foreground but at another less dynamic screen (not "People", i.e. a static album) "not using" anything such as "editing" or "tagging"?
      • Photos.app was quit, but ran once in the login session, hence "triggered/pushed photoanalysisd to do its work"?
      • freshly restarted Mac, and Photos.app never manually started? photoanalysisd will kick off itself?
    • If the typical Apple magic w/o further ado would work, I would not care for the wording.
    • But as it was not working, no matter what interpretation/permutation I tried, this message drove me wild.


Eventually after adding another 2-3 days after the first days with no noteworthy progress it finally worked.


I opened sidebar > Library > People: And confirmed some faces and additional faces.


Then interestingly you get yet another third kind of instruction: "Updating People… People will finish updating when Photos is in the background."


So yet a third type of instruction! Cannot be more inconsistent and frustrating. Please Apple, ideally get this done in your great beloved "it just works" way (swiftly in the background!) or make it an explicit / blocking action in the UI.



Grooming details (should it help someone)

  • I removed cruft files at /Library and ~/Library as instructed by @jmernin after my upgrade to macOS 11.1
  • Indented lines are files that I deleted. With a comment on them after the pound symbol.
  • See details in this attachment:



55 replies
Question marked as Best reply

Jan 28, 2021 7:41 AM in response to jmernin

@jmernin — Thanks for your hint! I suffered the same problem! (Although) my photos were at the internal SSD at the default location: ~/Pictures/Photos Library.photoslibrary


TL;DR:

  1. Remove Login Items -> I did it.
  2. Malware Scan -> I did not do it.
  3. Configuration Reset -> I didn't nest them at all, but did some grooming. See details below. In particular deleted some orphaned .plist files from Daemons/Agents which were already uninstalled/manually-deleted but their plist file remained.
  4. Maybe it was neither #1 or #3 but simply the time factor. Because alltogether the computer was on 4-5 days entirely, mostly idle, photoanalysis alltogether only needed about 1h of accumulated CPU time over those 5days mostly being idle. Had plenty of "missed opportunities". Crappy algorithm.


Feedback to Apple: Going through this on each macOS update is a UX nightmare! Either make that automatic magic behind the scenes work properly (=swiftly, not waiting 4-5 days mostly idle!) or offer an explicit menu command or button "Run curation & face-detection now" with a pause/resume button, should you need your computer resources.




Long Story:


Note that in earlier times my Photos.app Library was an Aperture Library, which was converted when I upgraded from macOS 10.12 Sierra to 10.15 Catalina.


Already when updating to Catalina I suffered from photoanalysisd 's poor implementation. Nothing ever happened. Only when I configured power management to run infinite, once after an overnight session it had kicked in, and still on the morning it was running, and I left it. But then at least it was done.


But this time when upgrading from macOS 10.15 Catalina to macOS 11.1 Big Sur the conversion progress sucked even more!


The start was ok: Upon first launch, the app's view was blocked with an explicit message "Converting…". But after some time it was done. Transparent to the user, obvious progress, no voodoo. Ok, I thought.


After that I imported my last 3 months of photos/videos from two iPhones via USB-cable into Photos.app


Then a subsequent TimeMachine backup. Which was more or less exactly the size of my photo library. So all old master-files and new master-files plus caches/database-files were changed (on a filesystem level), so TimeMachine deemed them backup-worthy.


But then came the long frustrating wait.

Curating showed as "in progress" and face-detection as well.

Left it on for two entire days (48h) and nothing happened, photoanalysisd accumulated no CPU time, the progress indicator in Photos.app UI remained where it was forever.


Had tried to leave my MacBook Pro Retina 15in (Mid 2014) running with screen on, and with screen off.

With Photos.app in foreground or hidden in background or totally off.

With other apps on. With nothing but Finder.

All kind of permutations. To no avail!


The UI sent ambiguous mixed messages:

  • Sidebar > Photos > Library: "Leave device connected to power".
    • Quite clear. Whether Photos.app in foreground or hidden in background or totally off not mentioned. So seems to not matter.
  • Sidebar > Photos > People: "… Photos will continue scanning your remaining X photos when you're not using the app and your Mac is connected to power."
    • "when you're not using the app" is very ambiguous
      • in foreground but not performing any interaction?
      • in foreground but at another less dynamic screen (not "People", i.e. a static album) "not using" anything such as "editing" or "tagging"?
      • Photos.app was quit, but ran once in the login session, hence "triggered/pushed photoanalysisd to do its work"?
      • freshly restarted Mac, and Photos.app never manually started? photoanalysisd will kick off itself?
    • If the typical Apple magic w/o further ado would work, I would not care for the wording.
    • But as it was not working, no matter what interpretation/permutation I tried, this message drove me wild.


Eventually after adding another 2-3 days after the first days with no noteworthy progress it finally worked.


I opened sidebar > Library > People: And confirmed some faces and additional faces.


Then interestingly you get yet another third kind of instruction: "Updating People… People will finish updating when Photos is in the background."


So yet a third type of instruction! Cannot be more inconsistent and frustrating. Please Apple, ideally get this done in your great beloved "it just works" way (swiftly in the background!) or make it an explicit / blocking action in the UI.



Grooming details (should it help someone)

  • I removed cruft files at /Library and ~/Library as instructed by @jmernin after my upgrade to macOS 11.1
  • Indented lines are files that I deleted. With a comment on them after the pound symbol.
  • See details in this attachment:



Jan 28, 2021 12:08 PM in response to putzfetzenORG

Alternatively to steps 1-3 by @jmernin (which are quite some effort) you could try to Boot into Safe Mode and let your Mac run in this mode without running Photos.app, see whether photoanalysisd makes progress and check visually in Photos.app here and then. And when done, boot normal again. Then all your startup items, daemons and agents are re-enabled. No need for manually doing this.


I did not test this, but came up with the idea afterwards.


For a HowTo which is proven to have worked, check:


Dec 1, 2020 12:44 AM in response to JR-Jones

Well.........same exact problem, when I updated to Big Sur. I have always used an external. I have 100k total of pics/movies and a 6 TB external Now granted when a new Photo version comes out, in this case version 6, you sometimes have to do a repair/restore with that version within the external and that happens automatically But.........it made no difference, I did a total of three repair/restore, with the same results .......0% of the library scanned. My photos are all there but 0% scanned for People. I can add/import pictures/movies from my IPhone to the external library, but 0% scanned. Having the Photos app running or not running did not make a difference. I decided to first chat with Apple and then spoke on the phone with Apple media tech. He said”you have done everything I would do and added he is seeing complaints like this coming in” His recommendation “ wait for an update patch, that will come in as a software update” . That was a week a week ago the third week of November 2020. So I will be patient and hope it will be forthcoming. I will post an update to this ultimately .


Now for those of you thinking “Maybe my Big Sur app was corrupted when I updated”. Ponder this, I did the Big Sur update on a Mac Mini, attached my external, repaired/restored the external library when it failed, after repeated 0% scan in people, and thought “Yeah maybe it was a corrupted app in Big Sur”.

So, I updated to Big Sur in my 2017 iMac (has a 1 TB SSD.......not a fusion drive ...and 32 GB RAM)......,,,, and same result of 0% scanning. Did a repair/restore twice of the photo library. No change.


So rather than beating this to death and overworking the external , I am going to wait


BTW........I know this is a lengthy response but perhaps seeing what I did may help someone not to repeat it all


Best Regards and waiting

Don

Jan 22, 2021 1:32 PM in response to jmernin

Here are the changes I made on my system to fix this issue:


1) Remove Login Items

Click System Preferences, Users & Groups and select the Login Items tab for the Current User. Take a screen shot and then remove each item listed. I've since reinstated all of my settings here, rebooted, and re-imported some more photos and the faces were still detected, so I'm not sure this step is entirely necessary.


2) Malware Scan

I downloaded the free edition of Malwarebytes for Mac (https://www.malwarebytes.com/mac) and ran a scan on my system, fixing any issues it detected. The scan took under 5 mins to complete.


3) Configuration Reset


3a) For each of the directories listed below, do the following (if there are files therein)

Select all files/directories in the folder (Cmd-a) and select File, "New Folder with Section (x items)" from the Finder menu. This will move the selected files into a new sub-folder (called "New Folder With Items"), which is a process called "nesting".


3b) The directories I dis this for were:


User Settings

~/Library
~/Library/Caches
~/Library/Input Methods
~/Library/LaunchAgents
~/Library/Saved Application State


System Settings

/Library/Caches
/Library/Input Methods
/Library/LaunchAgents
/Library/LaunchDaemons
/Library/StartupItems


Once all of the above was done, reboot your Mac. Then, making an assumption that the Photos library updates that Big Sur had wanted to do in the first place never actually got going, leave the Photos app stopped for a few days.


My library is around 35GB in size and I think it took around 36 hours for the process to complete, so I wonder if 1 hour per GB (in library size) might work as a rough gauge here?


Best of luck!

Nov 29, 2020 6:14 AM in response to JR-Jones

And the volume is plugged into a USB or Thunderbolt port and not accessed over the network? And always plugged in to the Mac, before you sign into the user account?


Where are you seeing, that there is still plenty to scan? At the bottom of the People album?

If the face detection is hanging, you may want to check the videos and image files in your library for incompatible media items. In my library the face detection stopped because of some old videos, that were in a format that needed converting to a more compatible format. You may want to check this list of formats for legacy media, that should be avoided on Big Sur:

About incompatible media in iMovie for macOS - Apple Support


As a rule of thumb - any item that is giving an error message, when you try to import it into a Photos Library, should be removed from your Photos Library and replaced by converted items. I have checked all videos and older image files, by exporting the originals and trying to import them into a test library.




Feb 2, 2021 5:25 PM in response to onlyhuman2

Update on my previous post:

1) The number of pictures remaining to be scanned is stuck at 281, and photoanalysisd only registers additional CPU time in Activity Monitor when the Photos app is open. As soon as I close Photos, photoanalysisd has no activity.


2) I've tried importing photos from my iPhone (via USB cable connection). With Mojave, I remember seeing faces on newly imported photos relatively quickly. With photos in Big Sur, NOTHING.


3) No changes or improvements noted after upgrading to Big Sur 11.2 either.

Mar 15, 2021 2:50 PM in response to jmernin

@onlyhuman2 wrote:

photoanalysisd has only run for 13 minutes total over the last 24 hours

That's a similarly crappy under-utilization as the one I experienced.


@matthunsberger:

1) Wow, will try out your method of sweeping old DB and cache files within the Photo Library Bundle. But only when having a proper backup.

2) Instead of the hacky way to show/hide hidden Files in Finder, please use a shortcut which as of macOS 11 Big Sur finally is integrated into Finder. Press CMD-SHIFT-DOT in Finder to toggle the visibility of hidden files. 👍


@all

Apple does not expose that wonderful shortcut in the menu bar nor mentions it in their official documentation at Mac keyboard shortcuts (HT201236) 🤓😮 I only learned about it at an unofficial source.

Go to the end of the linked article to the section "Helpful?", click "No!" and then give a comment that you would like that very useful shortcut to show up there. I did so in my words. You do it in your words. And hopefully soon they will add it 😉


Jan 28, 2021 8:57 AM in response to putzfetzenORG

Thanks for taking the time to compose such a comprehensive update, putzfetzenORG. My two takeaways from your comments are:


  1. I totally agree that some level of insight into, or control over, the facial scanning features would be hugely helpful. Even access to a log file somewhere that provides updates on what's actually going on (i.e. that helps explain the messages you see in the UI) would be enormously helpful, and may even reduce the number of support queries to Apple Support.
  2. Not sure if you saw it, but the recommendation from Apple Support is that, in order for the faces/people scanning to progress, the definition of "in the background" actually means quitting/stopping the Photos app altogether.


Thanks again!

Jan 31, 2021 11:09 AM in response to jmernin

Hello jmernin,

I think it is a good idea to share the folders that actually got nested to potentially help others narrow down things and change less of their system. I'd like to point out that I really do think that Step #3 of your list is what did it for me.


My system is brand new, a Mac Mini M1 with OS installed from factory. I don't have anything installed (it is not my main system) and Photos was the first thing I was trying to get to work. My photo library is the only thing that I am using from the old system, and this is through an external hard disk (it always has been there) that I moved to the new system. Because of the fact that I was having the same issue with a 'minimal' system, I think this is the best example of what really needs to be done to fix the problem. And, unlike some other comments, I don't think with my case it was a 'coincidence' that it worked. I had spent several weeks doing different scenarios to make Photos to start scanning without trying to 'fix' anything. This was the first time I tried a 'fix' and the library started scanning immediately after that. The scanning of all my ~90k photos as finished by the way. :)


So, I went through and checked the folders that still had the 'New Folder With Items' that I created during Step 3# of your instructions. I'll list them below. But first, I'd like to point out that after more digging, it seems that I was mistaken once again as to the 'Libraries' available in MacOS. It turns out there seems to be (at least) 3x locations... There's "~/Library", "/Library" and "/System/Library", and all have different contents (at first I thought some were mapping to the other but that doesn't really seem to be the case. I did not make any changes to "~/Library" because that wasn't visible through Finder (although you have since mentioned how to get there through key combinations). Also, several of the folders were empty (again, new system) or I wasn't able to nest any of the items in them (I'm guessing permission issues).


The only folders that I apparently nested are the following:

  • /Library/Caches
  • /System/Library/Caches


I was going to itemize the files within those folders that were nested, but being 'Caches' I figure it doesn't really matter, you should be able to just nest all without concern as long as all Apps are closed.


So, considering that I don't think you actually did any nesting in '/System/Library', I would say that if someone is interested in trying to find a 'minimal' approach, I would suggest starting by trying to nest '/Library/Caches' first... Then if that doesn't work trying other folders from your list. Also to remember, as was mentioned here before, the Photos app has to be left closed. I just restarted the system and didn't open anything and let if fall asleep for the night.


Hope this helps others! If someone tries this approach of only nesting '/Library/Caches', please let us know the outcome...


Good luck!

Feb 12, 2021 4:14 AM in response to onlyhuman2

*Another Possible Solution*


After troubleshooting this for a looong time I discovered that the issue was with my specific library, not an issue with the system. Something to do with old caches, leftovers, and general garbage from having a large, old library. Here’s what worked for me:


PLEASE EITHER MAKE A DUPLICATE OF YOUR LIBRARY OR A BACKUP BEFORE DOING ANY OF THIS. I DID SCREW IT UP ONCE AND LOST ALL MY ALBUMS AND TAGS.


You want to first un-hide invisible files, go to the Terminal and type:

defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder


Quit Photos.


In the Finder, select your library, right click and go to Show Package Contents.


You’ll see several folders, we’re going to focus on database, private, and resources.


In the database folder:

  • Delete any hidden folders
  • Open the search folder, delete any files inside
  • Back in the main database folder, delete anything with a .db, .plist, or no extension
  • IMPORTANT: leave anything with a .sqlite extension alone


In the private folder:

  • You’ll see several folders called com.apple.something, delete the contents of these folders


In the resources folder:

  • Delete the contents of the caches folder
  • Delete the contents of the journals folder


Restart, open the library, quit Photos, and you should start to see some activity. My computer scanned ~20k photos in one day.

Nov 29, 2020 9:21 AM in response to léonie

Hi there,


what I'm seeing to tell me there's a lot to scan is a message in People '0 Photos Scanned

Photos will continue scanning your remaining 11,242 photos when you're not using the app and your Mac is connected to power.


I've tried 'not using the app' as both reduced and as quitted.


The drive is wired into the back of the Mac (Thunderbolt port), permanently so, so it's read when the Mac is booted.


All the files in the library are JPEG - this shouldn't present a problem. I have very few video files in any libraries, those that are there are .mov containers and invariably from a current or previous iPhone.


Regarding errors, yes, I agree, I usually try to convert, or just bin them.


Thanks for your help,


J



Dec 28, 2020 8:11 AM in response to doncarlosdon

I *think* I'm having the same issue but would appreciate a consensus view from others here. Here's what I'm seeing:


*Setup*

A library of around 13,000 photos, stored on the inbuilt disk on my Mac Book Pro, with years of investment in facial/people scanning, geo-tagging etc. but library in good shape overall (on Catalina) before the upgrade to Bug Sur.


*Problem*

Since the upgrade to Big Sur, new photos imported to my library do not detect any faces in them (been waiting more than 3 weeks) but all faces in previous photos are still there.


Photos app is not suggesting there are any other faces/photos to be scanned and seeing occasional CPU usage by photoanalysisd in Activity Monitor. Have also tried quitting Photos app, minimizing it and leave it run behind other windows, all to no avail.

why is photoanalysisd not scanning my library in Big Sur?

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