5

Apple Photos is stuck forever in face recognition and photo curation.

How can I get it working again?

I) Photo Library Charateristics

I mentioned that I had one main system photo library (being mostly local only, iCloud only for few shared albums) and a private library. And described there characteristics in great detail, to find possible causes. Did all not matter!

II) Main fix strategies found online 2020-2021:

As links here, in detail as individual answers below:

  1. Fully enable SIP and uninstall unsigned 3rd party Kernel extension(s)
  • Working solution eventually! 🙂
  1. Give it some time
  2. Repair the library
  3. Find corrupted or unsupported files and remove them
  4. Deactivate login items, do some cleanup in cache folders, etc
  5. iCloud on/off/re-syncing based approaches
9
  • As explained I am currently reworking this. Please remove the lock. It will be in a proper shape in 30min or so. Thanks for your understandning. I have observed this all over 2020-2021: So far their is no public answer to this issue yet! I invested days (!) in this. And don't want to get this knowhow go to waste.
    – porg
    Commented Oct 22, 2021 at 14:53
  • If you know the problem is your hardware or so you won’t waste time trying to use a broken system to organize 30 years of photos. With that many photos go get PowerPhotos now so you can merge and split libraries with assistance of a sharp fine chef knife
    – bmike
    Commented Oct 22, 2021 at 16:50
  • 1) Apple user since 1992, now for the first time actually contacted support, will be forwarded to engineers. Awaiting answer. 2) Bitrot/overwrite in binaries of macOS + base apps unlikely due to SIP. But ofc userland config could be faulty. Since Mac OS X 10.1 (ca. 2001) only upgraded, migrated through 5 machines and 3 architectures (PPC > i386 > x64): Gladly and a bit proudly never set up freshly! Some cruft removal here/then. Full reset + fresh config could easily mean 1-3 weeks of work at my customization level. 3) PowerPhotos hint thx! 4) Last resort: Fresh bootdisk, try out lib there.
    – porg
    Commented Oct 23, 2021 at 15:23
  • @bmike This was a sweet victory! Looked for the reasons so long and finally found it. Hopefully helps others too!
    – porg
    Commented Dec 10, 2021 at 21:21
  • @bmike UX design challenge for your platform: What to do if you as the OP provided multiple answers? I marked the final-fix answer as solved. But still it is not yet listed on top. Don't want it to be overlooked! I cannot upvote my own answer either. How can I make sure the correct answer to appear on top while the useless one still appearing there. These also have information value. Only solution I see for this my scenario: Ask a friend to upvote the question which is marked as solved.
    – porg
    Commented Dec 10, 2021 at 21:24

9 Answers 9

1

Give it some time.

  • Let it run overnight with energy saving off.
  • Give it (= the background process photoanalysisd) more time (days, weeks).
  • Variations: Photos.app running, in background, or off at all.

❌ Worked never or only once. Never permanently.

Technically it can be observed that photoanalysisd can run with or without Photos.app running. But some noticed it is important that Photos.app is running but in background and the system needs to be overall idle for a certain time, before photoanalysisd kicking in.

Those who continue suffering observe that photoanalysisd runs periodically, but always only shortly w/o accumulating much CPU time and Apple Photos showing no progress at all. Suspicion is that photoanalysisd chokes on some bad input. But due to lack of a log file or calling it manually with verbose output we can only speculate.

1

Uninstall MacPorts? Suspicion only. No conclusion yet.

  • Ca. 2021-10-25: Properly uninstalled very old leftover installation of MacPorts.org which had: Own group, own user, own launch daemon(s) and stuff in .bashrc and .zshprofile.
  • Ca. 2021-10-25: The mini private library (800MB) which I copied into a fresh user meanwhile completed curation and face-detection.
    • Maybe MacPorts (leftovers) and Apple Photos conflicted? Not sure whether causal or correlation only.
  • 2021-10-27: photoanalysisd of my main system library now continuously works and accumulates CPU time! I leave Apple Photos.app in foreground on "Library" in "Day View". Whenever I observe photoanalysisd to go to 0% CPU, switching to Apple Photos, makes photoanalysisd reliably kick in again and not only accumulate an extra of 1-2secs of CPU time but some few more minutes of CPU time! "People" still at "0 Photos Scanned" but my hope is this is simply due to curation being performed before face detection. Really hope that the proper uninstallation of MacPorts was the cause and now it's only a matter of "enough idle time to process". The next hours/days will show. Will update you about progress!
1

Re-enable System Integrity Protection (SIP) and/or uninstall 3rd party Kernel extension(s)

  • ℹ️ I had used SsdPmEnabler which as an unsigned kernel extension needs SIP turned off partially (csrutil enable --without kext)
  • ✅ After uninstalling the kernel extension AND reenabling SIP fully again, Apple Photos face detection and curation works again!
  • ❓ I'm not sure whether the stuck photoanalysisd was caused by the particular kernel extension or the absence of SIP. But it was certainly one of the both. Because I have intensively tested and observed over the last months.
  • Isolating the exact cause (SIP or kernel extension) would again take me 3-4 hours as this requires rebooting and a lot of observation. If someone wants to do this, feel free to do so, and share here please!
  • What I can tell you: Uninstalling SsdPmEnabler and re-enabling SIP definitely fixes it!

So glad that I can share this with you after having tried so much over many months! Hope this helps some folks! 🙂

0

Find corrupted or unsupported files

Remove them. Then it should work again.

  • 👎 Problem is spotting those reliably! Would be a lot of work, almost impossible for some!
  • Approaches:
    • Apple Discussions @eRosso: Export entire library as unmodified originals to folder, analyze with Corrupt JPEG Checker, identify troublemakers, remove them by hand from Apple Photos Library.
    • AppleToolBox.com: Delete corrupt images with the help of Smart Albums
  • ❌ Cannot be the causal reason for my situation: Library with only JPEGs suffers the same symptom!
    • See point 3)c-e) from the question.
0

Deactivate login items, some cleanup in cache folders, …

Apple support fixed it for @jmernin by this procedure

  • Did it for some people. Also for me but only once!
    • Most likely was only correlated but not causal at all.
    • At most a "one stop wonder".
    • ❌ As soon as you import newer photos, Photos is stuck again.
0

Repair the library

Then it's fixed. Then if needed again give photoanalysisd some time to kick in. Sources:

❌ Didn't work. ❌ Extra con: Despite your masters being the same after the repair, TimeMachine on it's next run will pick up all your master files as being changed!

  • Which can be huge, for libraries with hundreds of GBs.
  • Requiring backup thinning and loosing your elder backup history often and mostly.

All this despite the masters being exactly the same in content (identical MD5 checksum), filename, location, creation date, modification date.

  • As I deduced from a rsync --dry-run from my System Photo Library to the 2 months old backup of it on an external disk.
  • They have the same md5 checksum.
  • mdls for them gives the exact same metadata.
  • ❗️ I have absolutely no clue how they differ by all the tools of digital forensics I know of.
  • ❓ Maybe it's some undocumented APFS/Apple proprietary metadata which differs.
1
  • This worked for me. Days I’ve left the computer alone and photos was stuck. After repairing, photoanalysisd appears to be using some CPU at last.
    – otmezger
    Commented Aug 10, 2022 at 9:06
0

PowerPhotos

  • https://fatcatsoftware.com/powerphotos/ not as a solution but part of an exit/migration strategy.
  • Can split and merge Apple Photos libraries, convert library formats between iPhoto, Aperture, Apple Photos, and much more.

But of it's copying limitations two limitations are unacceptable to me:

Not supported: faces

Days of work gone that I put into assisted face recognition — "Is this X? Yes/No?" or "This is: … -> Y" .

Original and edited versions of photos: When you edit a photo in Photos, it actually keeps around two copies of the photo: the unedited original, and a new JPG version that contains your edits. This allows you to later discard your edits and revert to the original version of the photo if you wish. PowerPhotos can copy both the original and edited versions of each photo, keeping reversible edits intact in the destination library, as well as RAW+JPG pairs. If you wish, you can choose to copy only the original or the edited version of each photo in the preferences window, rather than keeping both. The original versions of video files will always be copied regardless of the setting you have chosen.

❌ Copies original + rendered-edit but not the edit-instructions which create that rendered-edit.

  • Interestingly from your iPhone you could once get IMG_0123.JPG + a sidecar file like IMG_0123.EDIT and that actually contained exactly those edit-instructions/settings (I think in XML/).

  • Hence you loose comfort and quality when in need to further edit the image.

    • Either you start with your edit: Then all the tweaking knobs are effectively false. Because technically all knobs are on their default position. So all the scales will be distorted.

    • Or you revert to the original and try to re-create the editing effect from scratch. Also not so comfortable. Sad that Apple does not allow you exporting original + edit-instruction-sidecar-file which upon import to a new library would be auto-applied (and copied to the corresponding database entry for the master file).

0

I finally solved this problem.

following step

  1. copy photo library to external disk.

  2. delete original library.

  3. Running photo.app so create new photo library.

  4. Read pictures from copied library.

  5. Then DONE.

ex.

My original photo library was 384G(call "lib O") at MBP. However, when I made a new library(call "lib N") and load photos lib O to this lib N library, it became 74G in lib N's size. It was hard to imagine that I had 300G of data in a cache, so I came up with this method.

But Finally lib N size 425.01GB today.

Apple Genius say that loading from the library is a new function from Mac OS Monterey.

-1

iCloud on/off/re-syncing based approaches

  • ❗️ I rule iCloud out as a factor as I suffer the same issue on the local-only extra library even if transplanted into a freshly created user account.
    • See 3a) of the question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .