DEV Community

gie3d
gie3d

Posted on

4 2

MacBook Pro, how to select discrete graphics card or integrated graphics card

Apple only provides an option to let them choose the best graphics models while you're running on battery.

Image description

But sometimes, many times... actually, I really need to be up with battery longer than 3-4 hours. Discrete graphic is one of the most battery consuming in my MBP. So, occasionally, I need to find a way to shut it off. (It may sound silly that you paid for a high performance graphic card, and you want to shut it off 🤧)

Did some quick research and found a command (from https://nathansnelgrove.com/how-to-force-your-macbook-pro-to-use-its-discrete-graphics-card-when-its-plugged-in/):

# Always use the integrated graphics card while running on battery power
sudo pmset -b gpuswitch 0
Enter fullscreen mode Exit fullscreen mode

gpuswitch has 3 options

0 - use integrated graphics card
1 - use discrete graphics card
2 - automatically switch between discrete and integrated graphics card (default option)

and
-b - battery
-c - plugged
-a - both battery and plugged

Hope I could be up with battery a bit longer...đŸ˜Ĩ

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed: Zero in on just the tests that failed in your previous run
  • 2:34 --only-changed: Test only the spec files you've modified in git
  • 4:27 --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • 5:15 --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • 5:51 --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video 📹ī¸

👋 Kindness is contagious

Please leave a ❤ī¸ or a friendly comment on this post if you found it helpful!

Okay