开发者

How to disable Macbook Pro from switching to a high performance graphics card in Cocoa?

开发者 https://www.devze.com 2023-01-25 14:44 出处:网络
All 2010 Macbook Pros come with two graphics cards — a low-performance built-in Intel HD one and a high-performance discrete NVIDIA one — and it switches between them on the fly depending on the nee

All 2010 Macbook Pros come with two graphics cards — a low-performance built-in Intel HD one and a high-performance discrete NVIDIA one — and it switches between them on the fly depending on the needs of the running applications.

I have a simple Cocoa application that consists of just a menu bar item with a NSTextField in it. All I do is update the text field with an NSAttributedString from time to time. The trouble is that my application switches my Macbook Pro to use the high-performance NVIDIA card (I used the gfxCardStatus tool to confirm this).

What could 开发者_如何学JAVApossibly need the high-performance card? Is there a known list of reasons for the applications to require high-performance graphics card? Is there a way to force the computer to use the discrete graphics card?


There is a good article about GPU switching in the newer MacBook Pros at Ars Technica. I noticed that OS X switches to the dedicated GPU if you

  • Start an application that links against OpenGL
  • Connect a second display

The code of gfxCardStatus is open source. And it seems that the relevant part is located in switcher.m. You can take a closer look here.


In MacOS 10.7 you can specify a setting in the PList to stop going to discrete graphics:

https://developer.apple.com/library/mac/qa/qa1734/_index.html

Needs to be a 2011+ MacBook Pro.

0

精彩评论

暂无评论...
验证码 换一张
取 消