Skip to content

Instantly share code, notes, and snippets.

@gopsmith
Forked from b0gdanw/DisableBigSur.sh
Last active October 8, 2024 04:01
Show Gist options
  • Save gopsmith/bf4d3a8203cd0792c9f8702cc76c8525 to your computer and use it in GitHub Desktop.
Save gopsmith/bf4d3a8203cd0792c9f8702cc76c8525 to your computer and use it in GitHub Desktop.
Disable Big Sur and Monterey services
#!/bin/zsh
# CREDITS: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Big Sur revision by b0gdanw https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea
# TEMPORARILY disabling (e.g. STOPPING via 'bootout') unwanted services on macOS 11 Big Sur and macOS 12 Monterey:
# This version is for a special boot that optimizes for real-time music performance and streaming video.
# Due to the read-only system volume introduced with macOS Catalina, this script can NOT be run in Recovery mode's Terminal.
# For my purposes I leave WiFi enabled, for streaming video to a local router with no internet connection.
# SIP must first be disabled, in Recovery mode's Terminal (`csrutil disable`), then run this script after rebooting.
# To return to normal boot, simply re-enable SIP in Recovery mode's Terminal (`csrutil enable`), and reboot.
# If you want to fully disable the services, uncomment the `launchctl disable` lines, but remember that they will
# automatically launch again after you re-enable SIP.
# Big Sur GUI Agents to bootout
TODISABLE=( \
'com.apple.accessibility.MotionTrackingAgent' \
'com.apple.AMPArtworkAgent' \
'com.apple.AMPDeviceDiscoveryAgent' \
'com.apple.AMPDevicesAgent' \
'com.apple.AMPLibraryAgent' \
'com.apple.AMPSystemPlayerAgent' \
'com.apple.amsaccountsd' \
'com.apple.amsengagementd' \
'com.apple.AOSHeartbeat' \
'com.apple.AOSPushRelay' \
'com.apple.ap.adprivacyd' \
'com.apple.ap.adservicesd' \
'com.apple.ap.promotedcontentd' \
'com.apple.appleseed.seedusaged' \
'com.apple.applespell' \
'com.apple.appsleep' \
'com.apple.appstoreagent' \
'com.apple.appstorecomponentsd' \
'com.apple.assessmentagent' \
'com.apple.assistant_service' \
'com.apple.assistantd' \
'com.apple.AssistiveControl' \
'com.apple.avatarsd' \
'com.apple.bird' \
'com.apple.cache_delete' \
'com.apple.CalendarAgent' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.CallHistorySyncHelper' \
'com.apple.cloudd' \
'com.apple.cloudpaird' \
'com.apple.cloudphotod' \
'com.apple.CommCenter' \
'com.apple.commerce' \
'com.apple.contacts.donation-agent' \
'com.apple.ContactsAgent' \
'com.apple.CoreLocationAgent' \
'com.apple.corespeechd' \
'com.apple.corespotlightd' \
'com.apple.corespotlightservice' \
'com.apple.DiagnosticReportCleanup.plist' \
'com.apple.DictationIM' \
'com.apple.email.maild' \
'com.apple.exchange.exchangesyncd' \
'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \
'com.apple.findmymacmessenger' \
'com.apple.followupd' \
'com.apple.FollowUpUI' \
'com.apple.GameController.gamecontrolleragentd' \
'com.apple.gamed' \
'com.apple.homed' \
'com.apple.icdd' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \
'com.apple.iCloudHelper' \
'com.apple.iCloudNotificationAgent' \
'com.apple.iCloudUserNotificationsd' \
'com.apple.imagent' \
'com.apple.imautomatichistorydeletionagent' \
'com.apple.imcore.imtransferagent' \
'com.apple.itunescloudd' \
'com.apple.knowledge-agent' \
'com.apple.ManagedClientAgent.agent' \
'com.apple.ManagedClientAgent.enrollagent' \
'com.apple.Maps.mapspushd' \
'com.apple.mediaanalysisd' \
'com.apple.mediaremoteagent' \
'com.apple.mediastream.mstreamd' \
'com.apple.MobileAccessoryUpdater.fudHelperAgent' \
'com.apple.newsd' \
'com.apple.notificationcenterui.agent' \
'com.apple.parentalcontrols.check' \
'com.apple.parsecd' \
'com.apple.parsec-fbf' \
'com.apple.passd' \
'com.apple.photoanalysisd' \
'com.apple.photolibraryd' \
'com.apple.PhotoLibraryMigrationUtility.XPC' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \
'com.apple.RapportUIAgent' \
'com.apple.remindd' \
'com.apple.RemoteDesktop.agent' \
'com.apple.RemoteManagementAgent' \
'com.apple.routined' \
'com.apple.Safari.PasswordBreachAgent' \
'com.apple.Safari.SafeBrowsing.Service' \
'com.apple.SafariBookmarksSyncAgent' \
'com.apple.SafariCloudHistoryPushAgent' \
'com.apple.SafariHistoryServiceAgent' \
'com.apple.SafariLaunchAgent' \
'com.apple.SafariNotificationAgent' \
'com.apple.screensharing.agent' \
'com.apple.screensharing.menuextra' \
'com.apple.screensharing.MessagesAgent' \
'com.apple.ScreenTimeAgent' \
'com.apple.SecureBackupDaemon' \
'com.apple.security.cloudkeychainproxy3' \
'com.apple.security.keychain-circle-notification' \
'com.apple.shazamd' \
'com.apple.sidecar-relay' \
'com.apple.Siri.agent' \
'com.apple.siriknowledged' \
'com.apple.SoftwareUpdateNotificationManager' \
'com.apple.speech.speechdatainstallerd' \
'com.apple.speech.synthesisserver' \
'com.apple.Spotlight' \
'com.apple.suggestd' \
'com.apple.syncdefaultsd' \
'com.apple.telephonyutilities.callservicesd' \
'com.apple.TMHelperAgent' \
'com.apple.TMHelperAgent.SetupOffer' \
'com.apple.UsageTrackingAgent' \
'com.apple.UserNotificationCenterAgent' \
'com.apple.videoconference.camera' \
'com.apple.videosubscriptionsd' \
'com.Arturia.ArturiaSoftwareCenterAgent' \
'com.avid.CloudClientServices' \
'com.avid.link' \
'com.avid.transport.client' \
'com.citrixonline.GoToMeeting.G2MUpdate' \
'com.dropbox.DropboxMacUpdate.agent' \
'com.github.facebook.watchman' \
'com.google.keystone.system.agent' \
'com.google.keystone.system.xpcservice' \
'com.logmein.GoToMeeting.G2MUpdate' \
'com.microsoft.OneDriveStandaloneUpdater' \
'com.microsoft.update.agent' \
'com.paceap.eden.licensed.agent' \
'com.skype.skype.shareagent' \
'com.techsmith.snagit.capturehelper2020' \
'homebrew.mxcl.chromedriver' \
'homebrew.mxcl.mongodb' \
'homebrew.mxcl.postgresql' \
'org.pqrs.karabiner.agent.karabiner_grabber' \
'org.pqrs.karabiner.agent.karabiner_observer' \
'org.pqrs.karabiner.karabiner_console_user_server' \
'org.pqrs.karabiner.karabiner_session_monitor' \
'org.pqrs.karabiner.NotificationWindow' \
)
echo ""
echo "*** BIG SUR GUI AGENTS ***"
for agent in "${TODISABLE[@]}"
do
{
echo "Booting out BIG SUR GUI Agent ${agent}"
sudo launchctl bootout gui/501/${agent}
#sudo launchctl disable gui/501/${agent}
} #&> /dev/null
done
#==================================================================================================
# Big Sur System Daemons to bootout
TODISABLE=( \
'com.apple.analyticsd' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.backupd' \
'com.apple.backupd-helper' \
'com.apple.cloudd' \
'com.apple.CommCenterRootHelper' \
'com.apple.eapolcfg_auth' \
'com.apple.familycontrols' \
'com.apple.findmymacd' \
'com.apple.findmymacmessenger' \
'com.apple.icloud.findmydeviced' \
'com.apple.icloud.searchpartyd' \
'com.apple.locationd' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient.mechanism' \
'com.apple.mediaremoted' \
'com.apple.mobileassetd' \
'com.apple.netbiosd' \
'com.apple.preferences.timezone.admintool' \
'com.apple.remoted' \
'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.remotemanagementd' \
'com.apple.RemotePairTool' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.siri.acousticsignature' \
'com.apple.siri.morphunassetsupdaterd' \
'com.apple.siriinferenced' \
'com.apple.softwareupdate_firstrun_tasks' \
'com.apple.softwareupdated' \
'com.apple.SubmitDiagInfo' \
'com.apple.UserNotificationCenter' \
'com.barebones.authd' \
'com.bombich.ccchelper' \
'com.docker.vmnetd' \
'com.google.keystone.daemon' \
'com.microsoft.autoupdate.helper' \
'com.microsoft.office.licensingV2.helper' \
'com.microsoft.OneDriveStandaloneUpdaterDaemon' \
'com.microsoft.OneDriveUpdaterDaemon' \
'com.paceap.eden.licensed' \
'com.vidyo.DPA.VidyoCamera' \
'org.cups.cupsd' \
'org.pqrs.karabiner.karabiner_grabber' \
'org.pqrs.karabiner.karabiner_observer' \
'org.pqrs.Karabiner-DriverKit-VirtualHIDDeviceClient' \
)
echo ""
echo "*** BIG SUR SYSTEM DAEMONS ***"
for daemon in "${TODISABLE[@]}"
do
{
echo "Booting out BIG SUR Library Daemon ${daemon}"
sudo launchctl bootout system/${daemon}
#sudo launchctl disable system/${daemon}
} #&> /dev/null
done
#==================================================================================================
# Big Sur User Agents (1) to bootout
echo "Disabling geod"
sudo launchctl bootout user/205/com.apple.geod
#sudo launchctl disable user/205/com.apple.geod
@gopsmith
Copy link
Author

gopsmith commented May 17, 2022

# after running the main script, I also disable spotlight indexing:
sudo mdutil -i off -d / /System/Volumes/Data
# and turn off automatic software updates, manually (the script for this doesn't seem to work).
# I also kill some still-running processes, using `pgrep` and `pkill`

@elesto
Copy link

elesto commented May 19, 2022

Im confused to what this script is trying to accomplish. Is this really working for you? It includes bird (icloud and finder) and appsleep (sleep and power) among others which should throw many errors if disabled. Also, do you need to create a new snapshot for the modified volume when using launchctl disable?

@AlecKinnear
Copy link

Thanks @gopsmith This is a great attempt to bring Big Sur and Monterey under control. I'm willing to live without SIP if it means that I can shut down some of the incessant reporting to Apple and others and retain some privacy.

Yet I share some of @elesto's concerns. While I don't need iCloud, I do need sleep and power management to work. How many messages per minute is this configuration generating in the Console?

@dalsvk
Copy link

dalsvk commented Nov 14, 2022

Im confused to what this script is trying to accomplish. Is this really working for you? It includes bird (icloud and finder) and appsleep (sleep and power) among others which should throw many errors if disabled. Also, do you need to create a new snapshot for the modified volume when using launchctl disable?

Thank you for mentioning bird being responsible for icloudsync errors as I was having a fit, figuring it out as it was throwing out error popups everywhere and i don't even use icloud or have another apple device to sync it to. I also commented out appsleep, notificationcenterUiAgent just for the sake of usability.

I feel, it would have been a bit easier if this script mentioned what each of these services do just to make it easier to go back if something goes wrong or categorise them according to a specific usecase.

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

@elesto @AlecKinnear @svk-works I disable the above services for a very specific purpose: a real-time music and video performance, with NO internet access, and for a limited time (only for a few hours; when I’m done I re-enable SIP and all services are automatically restored). It works beautifully for my purposes. I do get a brief iCloud error the first time I open a Finder window, but I can ignore it. iCloud and other services need to be disabled because they are constantly trying to connect to their servers, which tends to disrupt my audio system, causing glitches and delays in reacting to MIDI events, and that’s a terrible experience when performing live music! You can comment out any of the above bootouts if you need those services.

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

it would have been a bit easier if this script mentioned what each of these services do

I agree, though I think most of the services have names that are pretty self-explanatory. As for the others, I did a lot of googling and the results were spotty - Apple apparently doesn’t feel the need to publicly document these things very well or consistently. The next time I have to update the script, I’ll leave some comments.

@dalsvk
Copy link

dalsvk commented Nov 14, 2022

it would have been a bit easier if this script mentioned what each of these services do

I agree, though I think most of the services have names that are pretty self-explanatory. As for the others, I did a lot of googling and the results were spotty - Apple apparently doesn’t feel the need to publicly document these things very well or consistently. The next time I have to update the script, I’ll leave some comments.

Do you happen to have any idea about biomesyncd suddenly using way too much cpu? Google-fu didn't help, and I'm pretty sure it started after the debloat.

Also, what would be the best way to go back to normal without resetting everything?

@gopsmith
Copy link
Author

gopsmith commented Nov 14, 2022

Do you happen to have any idea about biomesyncd suddenly using way too much cpu? Google-fu didn't help, and I'm pretty sure it started after the debloat.

I haven't had an issue with biomesyncd. You may want to add it to the above list. Have you seen this article?: https://discussions.apple.com/thread/253603115.

Also, what would be the best way to go back to normal without resetting everything?

Because I'm only using bootout commands, all services automatically get reset/relaunched whenever the system is rebooted. This is thanks to the read-only system volume. However, SIP is not automatically re-enabled; you have to do that manually.

@dalsvk
Copy link

dalsvk commented Nov 14, 2022

Have you seen this article?: https://discussions.apple.com/thread/253603115.

Oh yes, that discussion was one out of the only few relevant results but they did nothing. That process would start spinning up at random and take over all the power.

Because I'm only using bootout commands

About that, I did uncomment the disable commands too. I took a look inside the logs and saw a lot of invalid timezone messages so I enabled 'com.apple.preferences.timezone.admintool' and it does seem to have done the trick for now. I'll report if I find something else or maybe someone can find this important in the future.

@dalsvk
Copy link

dalsvk commented Nov 14, 2022

Nope, didn't help. It's back up again.

@AlecKinnear
Copy link

AlecKinnear commented Nov 18, 2022

Someone (me?) should go through this list and make a version with which users who would like Sleep to work but who can live and do live without iCloud. Personally I'd like to block the App Store (last main Apple service which I use), but can't do it as there are a few apps which I can't live without it and are App Store only.

If you can live without iCloud and App Store there's hope to keep Apple out of your business and clean up most of the completely unnecessary external connections. Personally, I could live without SIP if it makes it easier to retain control of my own computer and the data which goes in and out.

@AlecKinnear
Copy link

Hi 5l1v3r1,

All instructions and information are in the readme and the comments to this gist. Go back to the previous version to read more comments. When Gordon wrote and shared this script, he did not agree to provide unlimited support to the reckless when they run this script without proper preparation.

Good luck.

@gopsmith
Copy link
Author

@5l1v3r1 Apologies for any confusion. A couple of points here: 1) WiFi is not disabled, but internet access is disabled. As mentioned in the script comments, for my purposes I leave WiFi enabled, for streaming video to a local router and Apple TV (but with NO internet connection). 2) this script does not do anything permanent – the changes only last until the next boot. If you want to reverse it and go back to normal, simply reboot (and either leave SIP disabled, or re-enable it).

Please feel free to make a version of the script that does not disable internet access. For me it's important to have no internet services running, because anything that tries to access the network can cause dropouts in real-time audio, which is a bad thing to have happen when you're performing live music.

@AlecKinnear
Copy link

AlecKinnear commented Jun 30, 2023

@5l1v3r1 I'm weary of people who come to open source shared projects and demand answers. Particularly without carefully reading the documentation and existing comments/correspondence on the code in question.

What are you going to do? Stop using the script and demand a full refund? No worries, I've just sent your refund to your bank account. It should be there by tomorrow morning. Thanks for shopping open source!


@gopsmith Gordon, you have the patience of a saint. Thanks for the script. I'd suggest enhancing the documentation and directing users to the documentation for any existing issue.

@dalsvk
Copy link

dalsvk commented Jun 30, 2023

@AlecKinnear touch some grass, mah dude

@AlecKinnear
Copy link

Don't smoke, sorry. Wine, women and song.

@AlecKinnear
Copy link

AlecKinnear commented Dec 15, 2023

@5l1v3r1 A

@AlecKinnear get a life bro, seriously get a life

I'm not your bro. I've got a couple of tasks for you. 1. Learn to write English. 2. read the documentation/issues before demanding answers from open-source coders.

Gordon has the patience of a saint for freeloaders, I don't.

@FabioFeher
Copy link

Hi.

I used High Sierra script successfully but I don't know how to do it on Big Sur.

Can anyone help with steps to run it?

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

Did ALL of bootouts result in the error messages? If so, I'm wondering if you followed the steps in the comments at the top, "SIP must first be disabled..."?

It's OK if you got a few "No such process" messages – some processes may not exist on your system.

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

Removed com.apple.rapportd from the bootouts – when booted out, screen mirroring (which I need for QLab video streaming to a projector) occasionally asks for a passcode and won't accept any input.

@FabioFeher
Copy link

I tried and faced "Permission denied" and "Boot-out failed: 3: No such process" messages.

Did ALL of bootouts result in the error messages? If so, I'm wondering if you followed the steps in the comments at the top, "SIP must first be disabled..."?

It's OK if you got a few "No such process" messages – some processes may not exist on your system.

SIP is disabled.

Must be in recovery mode to work?

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

Recovery mode is only used to disable SIP – you can't stay in recovery mode.

@FabioFeher
Copy link

Recovery mode is only used to disable SIP – you can't stay in recovery mode.

Can u help how to run script?

Thanks!

@gopsmith
Copy link
Author

gopsmith commented Apr 5, 2024

I was assuming that you did run the script. And if you did, how many errors did you get? Were there any successful bootouts?

@MirComputers
Copy link

Removed com.apple.rapportd from the bootouts – when booted out, screen mirroring (which I need for QLab video streaming to a projector) occasionally asks for a passcode and won't accept any input.

very interesting tip, are you 100% positive that was the issue and ther is no other solution? what kind of passcode was aked?

I am working on a similar project and most of my clients are music producer, i try to keep old macbooks alive :)

@gopsmith
Copy link
Author

Removed com.apple.rapportd from the bootouts – when booted out, screen mirroring (which I need for QLab video streaming to a projector) occasionally asks for a passcode and won't accept any input.

very interesting tip, are you 100% positive that was the issue and ther is no other solution? what kind of passcode was aked?

I am working on a similar project and most of my clients are music producer, i try to keep old macbooks alive :)

Yes, I'm 100% positive. I've had no issues whatsoever since I removed rapportd from the list of bootouts. Rapportd is absolutely necessary for screen mirroring.

(It's not really relevant, but to answer your question, the passcode that was asked for was 4 or 6 digits, I don't remember which. But remember, this was when rapportd was disabled)

@hodfords
Copy link

hodfords commented Aug 3, 2024

I like this idea of this script; unfortunately the moment I run it my macbook becomes unstable and crashes the moment I go to my browser and type in a URL... and there are other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment