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:
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.
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!
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! 🙂
❌ 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).
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.