Home > Wiki Tips

Fix Photolibraryd High CPU/Draining Battery/Quit Unexpectedly

Updated on Tuesday, December 3, 2024

Written by

Jenny Zeng

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: Is photolibraryd consuming high CPU usage on your Mac? Learn what photolibraryd is and how to stop it from using up your Mac's CPU, draining battery, or quitting unexpectedly with the solutions in this article from iBoysoft.

A process called photolibraryd is running at 95 to 98 % of CPU and gobbling up 4.9 GB of memory in Activity Monitor, causing my MacBook Air to run very hot and nonstop.  This has been going on for 3 weeks. Do you know how to stop photolibraryd from running?

Like this poster, you likely have also noticed the photolibraryd process on Mac. You may be encountering other issues, such as receiving the "photolibraryd quit unexpectedly" message or finding photolibraryd draining battery. Keep reading to find out the solutions.

What is photolibraryd on Mac?

The photolibraryd process on Mac is a photo library agent that handles all photo library requests. It usually hides in the background but you can check its resource consumption in Activity Monitor. It's usually accompanied by another photo library analysis agent - photoanalysisd.

How to fix photolibraryd high CPU usage/draining battery?

When you notice photolibraryd taking a lot of CPU in Activity Monitor, you might also find your Mac's battery draining faster than usual or the fan making a loud noise. Use the following solutions to fix photolibraryd high CPU usage and the photolibraryd draining battery issue.

Wait for photolibraryd to finish

Photolibraryd usually won't take much CPU resources if the Photos app isn't actively running. However, if you have just upgraded macOS, imported a large number of photos, or been syncing photos to iCloud, photolibraryd will be busy processing your photos and consuming a lot of CPU. This may happen even though the Photos app isn't open.

You can open Photos, and select a random album like the People Album to see if there's a message indicating it's scanning photos or syncing with iCloud, such as "Photos will continue scanning your remains 10,290 photos when you're not using the app and your Mac is connected to power."

If this is the case, it's recommended to let photolibraryd do its job. It may take days and months if you have a large number of photos that need to be processed. To accelerate the process, you can keep your Mac plugged into power, minimize the Photos app and leave your Mac on overnight.

Repair the Photos library

Another way to haste the photolibraryd process is to repair the Photos library.

  1. Ensure the Photos app is closed.
  2. Press Option-Command and double-click the Photos icon in the Applications folder.
  3. Click Repair to rebuild your photo library.
  4. Then give the process some time to run.

Remove the offending files

If the photolibraryd process is having trouble processing certain files, it will stuck while trying over and over again. You can check if there're offending items and remove them to speed up the process. Follow the steps below:

  1. Open Finder, and launch Activity Monitor from the Applications/Utilities. 
  2. Select the photolibraryd process and click the info icon. 
  3. Click "Open Files and Ports."
  4. Scroll down to check items that may be having conflicts. 
  5. Remove the offending item. You may add it back to Photos at a later time.

Boot into Safe Mode

If you've waited for a reasonably long time but photolibraryd is still using a lot of CPU, try booting into Safe Mode and then restart your Mac. Safe Mode can isolate third-party apps and extensions that may cause photolibraryd to act up, clear system caches, and run a quick check on your internal hard drive.

Turn off iCloud syncing

If you have enabled iCloud Photos, it may be syncing your photos to the cloud, rendering the photolibraryd process drawing battery, and using high CPU resources. You can turn it off to stop photolibraryd from using excessive CPU.

  1. Launch the Photos app.
  2. Click Photos > Preference/Settings in the menu bar.
  3. Select the iCloud tab.
  4. Uncheck the box next to "iCloud Photos."
  5. Uncheck the box next to "My Photo Stream" and "Shared Album" as well.

You may also need to stop syncing your Mac with photos:

  1. Open the Apple menu and select System Preferences or System Settings from the top-left corner.
  2. Select the Apple ID > iCloud.
  3. Disable Photos.
  4. Restart your Mac.

Disable Memories

Some users with the photolibraryd high CPU issue suggest disabling the Memories album. You can also give it a try.

  1. Open the Photos app.
  2. Select Photos > Preferences/Settings from the top-left menu bar.
  3. Look at the Memories section and uncheck the box next to "Show Featured Content."

Quit photolibraryd in Activity Monitor

It may also be helpful to quit the photolibraryd process in Activity Monitor. This doesn't disable the process but temporarily closes it. It will restart again but hopefully without the abnormal CPU load.

  1. Open Activity Monitor. 
  2. Select photolibraryd and click the X button.
  3. Click Quit or Force Quit.

Permanently disable photolibraryd

It's not recommended to permanently disable photolibraryd, as it may affect the operation of the Photos app. Nevertheless, if you don't use the app or would rather it's closed for good, you can stop photolibraryd from running with the following Terminal commands.

How to stop photolibraryd from running on Mac:

  1. Open Terminal from the Applications/Utilities folder.
  2. Type the following command and hit Enter to disable photolibraryd on Mac.launchctl disable user/$UID/com.apple.photoanalysisd
  3. Run another command to kill the current running photolibraryd process.launchctl kill SIGTERM gui/$UID/com.apple.photoanalysisd

If the command doesn't work, try this command to unload photolibraryd:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.photolibraryd.plist

Note that this command requires the administrator password and the password won't echo to the screen. Just type in your password and hit Enter when prompted.

If you want to reenable it, execute the following command in order. 

launchctl enable user/$UID/com.apple.photoanalysisd launchctl kickstart gui/$UID/com.apple.photoanalysisd

If you have fixed the problem, please share this post!

 

How to fix photolibraryd quit unexpectedly?

Sometimes photolibraryd may cause the Photos app or your Mac to crash. When it happens, you'll likely receive a report saying "photolibraryd quit unexpectedly." You can click the Open button to view the detail logs and look for patterns or useful information. If you don't have the report, you can find it in the Console app.

To fix the "photolibraryd quit unexpectedly" issue, follow the solutions explained in this tutorial: How to Fix Apps Quit Unexpectedly or Keep Crashing on Mac?

Share this article if you find it helpful!