如何在 Cocoa 中禁止 Macbook Pro 切换到高性能显卡?

发布于 2024-10-02 13:07:34 字数 403 浏览 0 评论 0原文

所有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

虚拟世界 2024-10-09 13:07:34

有一篇关于新款 MacBook Pro 中 GPU 切换的好文章,位于 Ars Technica
应用程序, OS X 会切换到专用 GPU

  • 我注意到,如果您启动一个链接到 OpenGL
  • 连接第二个显示器的

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

  • 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.

↘人皮目录ツ 2024-10-09 13:07:34

在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文