Skip to content

Instantly share code, notes, and snippets.

@ccqpein
Last active July 3, 2023 21:11
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save ccqpein/6ed960f2bee1c83d1d4b00205c229403 to your computer and use it in GitHub Desktop.
Save ccqpein/6ed960f2bee1c83d1d4b00205c229403 to your computer and use it in GitHub Desktop.
macOS 10.14 use pmset to control graphic card switch.
# I find this https://discussions.apple.com/thread/8160651
# but it not match my 2018 version MacBook with macos 10.14
#
# On my local, gpuswitch value is
# 0 -> does not use dedicated graphics
# 1 -> use dedicated graphics
# 2 -> switch automaticly (I guess), because 2 is default value when "automatic graphics switching" selected
# in energy in preference.
# check settings depended on charger/battery
pmset -g custom
# let system use dedicated graphics card when charger plugin
sudo pmset -c gpuswitch 1
# let system use graphics card auto switch when using battery
sudo pmset -b gpuswitch 2
# let system use auto switch on charger/battery (my default setting)
sudo pmset -a gpuswitch 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment