Disable MacBook Pro discrete GPU for specific apps

Is there a way to prevent certain apps from switching the active GPU to the discrete graphics card?


I tried looking in System Preferences but there's only a setting to use the discrete GPU all the time.

MacBook Pro: How to disable discrete GPU permanently from EFI? I read this question and its answers, but it's about disabling the discrete GPU permanently and not per app.

I want GarageBand to stop using the discrete GPU on my MacBook Pro, to save battery life and reduce fan noise.


I think the best answer is gSwitch.

What you could do is use Automator to run the cli command of switch to discrete "--discrete" when GarangeBand is opened and switch to "--dynamic" or close the app when GarageBand is closed.