Why does Automatic Graphics Switching keep re-enabling itself without my involvement? I disable Automatic graphics switching under Energy Saver, as it significantly slows my Macbook Pro (10.15.5). Yet this checkbox keeps getting re-enabled when I have not touched it!
How can I prevent that? Or failing that, how can I disable this from the command line? (I'll write a script to run every ten minutes.)
,
Use this script to turn off the Energy Saver Automatic graphic switching option.

Save it on your Macbook, e.g., as noautosaver.
Make it executable with chmod a+x noautosaver.
Add the script in System Preferences &gt; Login Items.

It is the same code as in the linked question, but always turns the value Off rather than toggling the value.
 #!/usr/bin/osascript

 if running of application &quot;System Preferences&quot; then
     try
         quit application &quot;System Preferences&quot;
     on error
         do shell script &quot;killall 'System Preferences'&quot;
     end try
 end if

 repeat while running of application &quot;System Preferences&quot; is true
     delay 0.1
 end repeat

 tell application &quot;System Preferences&quot;
     reveal pane id &quot;com.apple.preference.energysaver&quot;
     repeat until exists window &quot;Energy Saver&quot;
         delay 0.1
     end repeat
 end tell

 tell application &quot;System Events&quot; to tell ¬
     group 1 of window &quot;Energy Saver&quot; of application process &quot;System Preferences&quot;
     repeat until exists checkbox &quot;Automatic graphics switching&quot;
         delay 0.1
     end repeat

     set cbAGS to (value of checkbox &quot;Automatic graphics switching&quot;) as boolean
     if cbAGS then
        click checkbox &quot;Automatic graphics switching&quot;
     end if
     set  cbAGS to (value of checkbox &quot;Automatic graphics switching&quot;) as boolean
 end tell

 quit application &quot;System Preferences&quot;

 if cbAGS then
     return &quot;   Automatic Graphics Switching is: ON&quot;
 else
     return &quot;   Automatic Graphics Switching is: OFF&quot;
 end if