Allows you to set graphics preferences for macOS applications, and force use of external GPUs, even on internal displays.
This script requires the following specifications:
- Mac running external GPU
- macOS 10.13.4 or later
Install set-eGPU.sh:
curl -s "https://api.github.com/repos/mayankk2308/set-egpu/releases/latest" | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/' | xargs curl -L -s -0 > set-eGPU.sh && chmod +x set-eGPU.sh && ./set-eGPU.sh && rm set-eGPU.sh
This will automatically install the latest version of set-eGPU.sh. Administrative privileges are required only for installation and software updates. All other script activity is performed in a user-privileged shell automatically.
Alternatively, download set-eGPU.sh. Then run the following in Terminal:
cd Downloads
chmod +x set-eGPU.sh
./set-eGPU.sh
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:
set-eGPU
It is worth noting that macOS Mojave uses a completely different and more potent mechanism for setting eGPU application preference, but is in beta stage. This script completely supports that mechanism, but due to Mojave being in beta, the underlying mechanism has bugs and other issues.
The script provides users with a variety of options in an attempt to be as user-friendly as possible - as a numbered menu. Advanced users may pass arguments to bypass the menu.
Checks all available applications and sets their GPU preference to use eGPUs.
Checks specified application(s) and sets its GPU preference to use eGPUs.
Reads specified application(s) GPU preferences.
Resets GPU preferences to system defaults for all applications.
Recover original untouched macOS configuration prior to script modifications.
Run your application and check Activity Monitor > Window > GPU History (⌘ + 4) for GPU statistics.
See the license file for more information.