I use the
Automatic Graphics Switching option as noted in this Apple support document. However sometimes it will still switch to the discrete graphic card. Is there a way to disable this?
One option might be to use Cody Krieger's gfxCardStatus app and to select the integrated GPU from it. Doing that, Mac OS should only use the integrated GPU until you either switch it back to automatic or explicitly tell it to use the discrete GPU. Unfortunately, I don't know of a way to do this without gfxCardStatus, but there is probably a way, seeing as the app does it. Still, it seems to work pretty well.