With macOS 10.13.4, Apple officially began supporting external GPUs on macs. However, they imposed the following limits:
- Mac must have Thunderbolt 3
- Select AMD GPUs only (reference: Apple)
- No NVIDIA GPUs
- No Ti82 Thunderbolt 3 enclosures
purge-wrangler.sh removes these restrictions and enables:
- eGPUs for Thunderbolt 1 & 2 systems
- NVIDIA eGPUs for all systems
- Legacy AMD eGPUs for all systems
- Ti82 TB3 enclosures
The following is a list of basic requirements a mac must meet to run purge-wrangler.sh.
- Mac: must have a Thunderbolt port (any variant)
- eGFX: Any enclosure + eGPU
- iMac Pro & 2018 MacBook Pro (T2): Disable Secure Boot, as instructed here.
- macOS: 10.13.4-6 (High Sierra), 10.14+ (Mojave)
- System Integrity Protection: must be disabled.
A system backup is highly recommended. Although the patches and recovery techniques have been refined over time, having a fallback is always important.
To get yourself acquainted with eGPU support on macOS and some technical foreword, consider reading the macOS Troubleshooting Guide at egpu.io. To use purge-wrangler.sh, please follow these steps:
Disable system integrity protection for macOS using Terminal in Recovery:
$ csrutil disable
$ reboot
Boot back into macOS, then copy-paste the following into Terminal:
curl -s "https://api.github.com/repos/mayankk2308/purge-wrangler/releases/latest" | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/' | xargs curl -L -s -0 > purge-wrangler.sh && chmod +x purge-wrangler.sh && ./purge-wrangler.sh && rm purge-wrangler.sh
This will automatically install the latest version of purge-wrangler.sh.
Alternatively, download purge-wrangler.sh. Then run the following in Terminal:
$ cd Downloads
$ chmod +x purge-wrangler.sh
$ ./purge-wrangler.sh
You will be prompted to enter your account password for superuser permissions. On first-time use, the script will auto-install itself as a binary into /usr/local/bin/
. This enables much simpler future use. To use the script again, just type the following in Terminal:
$ purge-wrangler
This is supported on 3.0.0 or later. Automatic updates are supported from 3.1.0 or later.
PurgeWrangler makes it super-easy to perform actions with an interactive menu, and is recommended for most users. Providing no arguments to the script defaults to the menu.
For advanced users that may sometimes prefer bypassing the menu, the script provides convenient arguments in an attempt to be as user-friendly as possible.
For Thunderbolt 3 macs, allows the use of unofficial (non-Apple supported) AMD eGPUs such as the Fiji architecture GPUs. For older Thunderbolt models, bypasses the thunderbolt requirement and optionally allows use of unofficial AMD eGPUs. To use unofficial eGPUs, agree to enabling unofficial cards when prompted in the script.
All Thunderbolt macs require extensive patching for NVIDIA eGPUs. This option downloads the necessary NVIDIA drivers, patches any macOS version requirements if needed, and finally applies the necessary system patches needed to allow eGPU acceleration (credits: @goalque).
Enables Ti82 enclosures on macOS, which are blocked by default (credits: @khaosT).
Check to see what patches are installed on the system.
Uninstall any patches without restoring backed-up files, in-place.
Recover original untouched macOS configuration prior to script modifications.
Resolve permission issues with target kernel extensions and rebuild kernel cache.
Reboot the system.
Manage your preferences for queries the script asks when patching. This allows you to set defaults, such as always installing web drivers when patching rather than asking.
Every macOS update rewrites kernel extensions (including security updates). This means that all patches installed using purge-wrangler.sh are reset. With V5.0.0 or later, the system will notify you if this has happened, and allow you to re-patch immediately. If you choose "Never" the reminder will never activate until you reinstall purge-wrangler in the future and then are in the same situation again.
If you are unable to boot into macOS, boot while pressing ⌘ + S, then enter the following commands:
$ mount -uw /
$ purge-wrangler -r
Many thanks to @itsage, @fricorico, @goalque, @fr34k, and many others at egpu.io for the insightful discussion that has culminated into this project.
This script moves core system files associated with macOS. While any of the potential issues with its application are recoverable, please use this script at your discretion. I will not be liable for any damages to your system.
See the license file for more information.
A thank you suffices, but for those kind souls who would love to contribute: