Search code examples
macoscocoagpuosx-lioninfo-plist

Don't automatically switch to the higher-end discrete GPU


As written in this Technical Q&A:

By default, once your application creates an OpenGL context (by either calling OpenGL directly or an API that relies on OpenGL such as Core Animation, Core Image, etc), the MacBook Pro automatically switches to the higher-end discrete GPU for performance concerns and won't switch back until the application quits.

There is a way to prevent this? The discrete GPU, on newer MacBook Pros, wastes power and shortens battery life.

The simple insertion of the NSSupportsAutomaticGraphicsSwitching key in Info.plist (suggested in the Technical Q&A), apparently, is not enough.


Solution

  • On late 2008 MacBook Pros, unfortunately, there is nothing we can do to avoid the switching to the discrete GPU.

    On 2011 MacBook Pros, instead, the automatic switch can be prevented inserting the NSSupportsAutomaticGraphicsSwitching key with a Boolean value of true inside the Info.plist file. Note that this only works starting with Mac OS X Lion.