如何在 Cocoa 中禁止 Macbook Pro 切换到高性能显卡?
所有 2010 款 Macbook Pro 都配备了两张显卡——一张是低性能的内置 Intel HD 显卡,一张是高性能的独立 NVIDIA 显卡——并且它可以根据正在运行的应用程序的需求在它们之间进行动态切换。
我有一个简单的 Cocoa 应用程序,它仅包含一个菜单栏项,其中包含一个 NSTextField 。我所做的就是不时使用 NSAttributedString
更新文本字段。问题是我的应用程序将我的 Macbook Pro 切换为使用高性能 NVIDIA 卡(我使用 gfxCardStatus 工具来确认这一点)。
什么可能需要高性能卡?是否有应用程序需要高性能显卡的已知原因列表?有没有办法强制电脑使用独立显卡?
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 possibly 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一篇关于新款 MacBook Pro 中 GPU 切换的好文章,位于 Ars Technica。
应用程序, OS X 会切换到专用 GPU
gfxCardStatus 的代码是开源的。相关部分似乎位于 switcher.m 中。您可以在此处仔细查看。
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
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.
在 MacOS 10.7 中,您可以在 PList 中指定一个设置以停止使用独立显卡:
https://developer.apple.com/library/mac/qa/qa1734/_index.html
需要是 2011 年以上的 MacBook Pro。
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.