
macbook圖形化編程

Apple’s top end MacBook Pros come with two graphics chips: an integrated Intel Iris Pro chip and a discrete graphics card with more power. That way, you can use the integrated chip when you need better battery life, and the more powerful graphics card when you’re editing video or playing games.
蘋果高端MacBook Pro配備了兩個圖形芯片:一個集成的Intel Iris Pro芯片和一個具有更大功率的獨立圖形卡。 這樣,您可以在需要更長的電池壽命時使用集成芯片,而在編輯視頻或玩游戲時可以使用功能更強大的圖形卡。
Apple has obviously thought of this, and which graphics card you’re computer is using is determined by a dynamic switching algorithm. If you don’t need the performance of the discrete GPU, macOS keeps it turned off. Unfortunately, some apps hijack the discrete GPU.
蘋果顯然已經想到了這一點,并且您使用的是哪種計算機顯卡是由動態切換算法確定的。 如果您不需要離散GPU的性能,macOS會將其關閉。 不幸的是,某些應用劫持了離散GPU。
For example, I’ve found that for some completely ridiculous reason, RescueTime’s background tracking deamon forces the discrete GPU to run. You can see in the screenshot below that it’s one of the “Apps Using Significant Energy”.
例如,我發現出于某些完全荒謬的原因, RescueTime的后臺跟蹤守護進程迫使離散GPU運行。 您可以在下面的屏幕截圖中看到它是“使用大量能量的應用程序”之一。

Now Photoshop using the GPU is understandable, but RescueTime? It’s a small background process that records what app I’m using. There is literally no graphical component. All it’s doing is draining my Mac’s battery life. That’s quite ironic for a productivity app.
現在使用GPU的Photoshop是可以理解的,但是RescueTime嗎? 這是一個很小的后臺過程,記錄了我正在使用的應用程序。 實際上沒有圖形組件。 它所要做的就是耗盡Mac的電池壽命。 對于生產力應用程序而言,這頗具諷刺意味。
The solution I’ve found to this is to use a small menu bar app called gfxCardStatus. It serves two purposes:
我發現的解決方案是使用一個名為gfxCardStatus的小菜單欄應用程序。 它有兩個作用:
- It lets you know which graphics card your Mac is currently using. 它可以讓您知道Mac當前正在使用哪個圖形卡。
- It can force your Mac to use integrated or discrete graphics. 它可以強制Mac使用集成或獨立的圖形。
To get started, download?gfxCardStatus, drag the app to your Applications folder, and run it.
首先,下載gfxCardStatus ,將應用程序拖到您的“應用程序”文件夾中,然后運行它。
It will start running in your menu bar. When the integrated graphics is running, the icon is a little “i”. In the screenshot below, it’s the second app in from the left.
它將開始在菜單欄中運行。 當集成圖形運行時,圖標有點“ i”。 在下面的屏幕截圖中,它是左側的第二個應用程序。

When the discrete graphics is running, the icon is a “d”. Whenever your Mac switches between them, gfxCardStatus will notify you.
當離散圖形運行時,圖標為“ d”。 只要您的Mac在它們之間切換,gfxCardStatus都會通知您。
When the discrete graphics are in use, gfxCardStatus’s menubar app will tell you what apps are currently requiring it under Dependencies. Right now, for me, no apps need it.
使用離散圖形時,gfxCardStatus的菜單欄應用程序將在“依賴關系”下告訴您當前需要哪些應用程序。 現在,對我來說,沒有應用程序需要它。

By default, gfxCardStatus leaves macOS’s dynamic switching algorithm running. If you want to force it to use one or other of the graphics cards, click on the menu bar icon and select either Integrated Only or Discrete Only.
默認情況下,gfxCardStatus使macOS的動態切換算法保持運行狀態。 如果要強制它使用一個或多個圖形卡,請單擊菜單欄圖標,然后選擇“僅集成”或“僅離散”。

To switch back to dynamic switching, select Dynamic Switching.
要切換回動態切換,請選擇“動態切換”。

If you try to switch to integrated graphics when an app that requires the discrete GPU is running, gfxCardStatus will throw up a warning.
如果在運行需要獨立GPU的應用程序時嘗試切換到集成顯卡,則gfxCardStatus將引發警告。

There isn’t much to configure with gfxCardStatus. It just sits in the background doing its own thing. To make sure it runs at startup, select Preferences and then check Load gfxCardStatus at startup.
使用gfxCardStatus進行配置的內容并不多。 它只是在后臺做自己的事情。 為了確保它在啟動時運行,請選擇“首選項”,然后選中“在啟動時加載gfxCardStatus”。

Smart menu bar icons change the letters to represent the actual graphics card that is running. For example, my Mac has an AMD card, so with smart icons on, the icon is an “a” when it’s using discrete graphics.
智能菜單欄圖標更改字母以代表正在運行的實際圖形卡。 例如,我的Mac有一張AMD卡,因此,在啟用智能圖標的情況下,使用離散圖形時,該圖標為“ a”。
gfxCardStatus is a really handy way to keep tabs on what your Mac is doing automatically. I prefer to keep it set to the Dynamic Switching algorithm and only when I’m trying to conserve battery life, force my Mac to use integrated graphics.
gfxCardStatus是一種非常方便的方法,可讓您自動掌握Mac正在進行的操作。 我更喜歡將其設置為“動態切換”算法,并且僅當我嘗試節省電池壽命時,才強制Mac使用集成顯卡。
If you’re experiencing bad battery life on your Mac, check out gfxCardStatus. Even if it can’t?fix the problem, it will give you a good idea of what’s causing it.
如果您的Mac電池續航能力很差,請查看gfxCardStatus。 即使它不能解決問題,也可以讓您很好地了解導致問題的原因。
翻譯自: https://www.howtogeek.com/288346/how-to-tell-which-graphics-chip-your-macbook-is-using-and-switch-it/
macbook圖形化編程