gpu-switch
Simple CLI shortcut to manually hot-switch between integrated and discrete GPUs for dual-GPU MacBooks by running a few selected pmset commands
Usage
After successful installation, make sure "Automatic graphics switching" option is enable in "Engery Saver" in System Preferences under Energy Saver.
Type gpu-switch commands in Terminal app as follows:
- To use iGPU in both battery and charging modes:
gpu-switch -i - To use dGPU in both battery and charging modes:
gpu-switch -d - To use automatic graphics switching in both modes:
gpu-switch -a - To use iGPU in battery mode and dGPU while charging:
gpu-switch -bc - Reset to default settings:
gpu-switch -r - View list of all commands:
gpu-switch -h
Installation
Installation:
Copy gpu-switch executable file to usr/local/bin directory manually or by running install file
Uninstallation:
Delete gpu-switch executable file from usr/local/bin directory manually or by running uninstall file
Warnings
- This script only works if Mac is dual-GPU and works with
pmsetcommands. - For compatibility check: run
pmset -gin Terminal. - This script is simply a shortcut for
pmsetcommands which requires root permission as doespmset. - Remember to go back to automatic switching or discrete graphics in newer Mac models to use external displays.
Recommendation
gfxCardStatus is recommended regardless to keep track of which GPU is activated at all times
Tested
on a 15'' MBP 2018