9

I use my early 2011 15" MacBook Pro for nearly everything under the sun - I often monitor which GPU is active using gfxCardStatus. I've noticed some idiosyncrasies in how OS X decides when to switch graphics processors:

  • MOST apps that require X11 will trigger auto-switching, but not all
  • It seems every app that requires java will trigger the auto-switching, though I've not tested this with non-GUI apps.
  • Some apps (like Mathematica or XCode) which COULD require a high-performance GPU will force movement to the discrete card straight away, even if only fired up for a trivial task (dynamic switching in-app would be cool, off topic)
  • Many legacy apps (silverlight) which have no business asking for my discrete card will force it regarless
  • Finally, some apps (GIMP, in particular) which could definitely benefit from a discrete GPU actually don't ask for it at all.

Does Apple document how it chooses when to switch cards? Can apps make an OS-level request for the discrete card if it exists?

5

On a high level, it's like an automatic transmission - when you press the gas gently, the throttle increases but when you stomp on the accelerator pedal the engine downshifts the transmission to increase the mechanical advantage.

You can influence switching to the powerful GPU by hitting the API with significant work and expect the "transmission" to dispatch that load to the non-integrated GPU.

The documentation on the API are all in Xcode (and online too, but I prefer using search on Xcode to hunt for a document).

I would start with:

Those links cover the Mac Pro and the "What you should know when using OpenCL" section contains a helpful note that WWDC 2013 Session 508: Working with OpenCL describes how to switch between two GPUs in a Mac portable using power considerations.

  • Looks interesting. I'll check the Xcode docs when I'm on my Mac later. – agentroadkill Dec 2 '15 at 15:00
  • So to be clear - it's entirely up to the application's developer to decide if the app should use discrete or integrated graphics? The OS doesn't make this call itself? – agentroadkill Dec 2 '15 at 17:48
  • @agentroadkill I'd say it the opposite - the developer can ask the OS what's happening now and can influence things, but the OS is deciding to schedule the work based on multiple conflicting inputs. After all, you might have dozens of apps machine GPU calls continually. – bmike Dec 2 '15 at 17:51
  • Right, the OS ultimately makes the call, but per the linked article: DeviceSelectCL shows how to identify the offline GPU that is not connected to a display, and then use the CL device corresponding to this GPU. So the dev can choose to push work to that GPU, the OS will decide if it's allowed and arbitrate that, but the app can push its work there, at will. – agentroadkill Dec 2 '15 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .