Easing (some of) the pain of GPU switching on my mid-2009 Macbook Pro using Automator
I like to keep my laptop cool, so I usually run on the integrated 9400 graphics chip. But lately I've been finding myself playing a lot of games on my unibody mbp. However, it gets kind of tedious to have to continually switch over to the "better performance" 9600M option in energy saver. Instead of opening energy saver, clicking "better performance" and then restarting, is there a simple applescript or shortcut I can just double click that will do all this for me? I'd like to just place that script on the desktop and call it "play games" or something." I know it's a small inconvenience, but does anyone have a solution? Or can anyone make a simple automater or applescript to handle this?
I regularly switch between the NVIDIA GeForce 9400M ("Better battery life") and the NVIDIA GeForce 9600M GT ("Better graphics performance") on my mid-2009 MBP running OS X 10.6.3. I grew tired of clicking on the Energy Saver Preferences, and occasionally I would forget which GPU I was running until I opened the Preferences panel. After an unsuccessful search for a solution similar to the gfxCardStatus solution (
http://codykrieger.com/gfxCardStatus/) for the new 2010 dual-GPU MBP line, I came up with my own GPU-for-dummies approach using Automator.
My solution uses two Automator apps to switch to the desired GPU. The apps (named "GPU-9400" and "GPU-9600") are in my Applications folder so I can access them easily. In addition to choosing the appropriate GPU with a simple click, the app also renames itself on the fly. This way, when I log back in after a GPU switch, I have a visual indication which GPU is currently in use. For example, when I click on the "GPU-9600" app, Automator will rename it to "GPU-9600 *ACTIVE*". If I then later click on "GPU-9400", Automator will rename it "GPU-9400 *ACTIVE*" and will also strip the "*ACTIVE*" from the GPU-9600 app name. There's a partial screenshot of my Applications menu at
http://i249.photobucket.com/albums/gg231/funnee1/GPU Switcher/GPUSwitcher.jpg that explains it better than I can.
If you'd like to give it a try, here's what you need to do:
1. Download the attached ZIP file, and unzip the two apps into your Applications folder.
2. Assign the shortcut COMMAND-OPTION-S to System Preferences. (See
http://www.macworld.com/article/135010/2008/08/sysprefs_shortcut.html if you need help doing this.)
IMPORTANT NOTE: You must use COMMAND-OPTION-S as the shortcut for these apps to function correctly.
3. Close all open applications (since switching your GPU is going to require a logout).
4. If you're currently running the NVIDIA GeForce 9400M (i.e. "Better battery life"), click on the "GPU-9600" app. Conversely, if you're currently running the NVIDIA GeForce 9600M GT (i.e. "Better graphics performance"), click on the "GPU-9400" app.
IMPORTANT NOTE: If you click on the app that corresponds to the GPU you're already running, the app will successfully rename itself to indicate the GPU is active, but the app will then error out since it's expecting a logout prompt which obviously won't appear.
I built this for my personal use, so I have only used this on my mid-2009 MBP running OS X 10.6.3. Depending on your hardware and OS version, your mileage may vary. As with all applications, I *STRONGLY* recommend you backup your system before running these apps. The Automator scripts in the apps are simple and won't cause any damage to your system or files if they fail, but safe is always better than sorry. There is no warranty on these apps and they are provided "as-is".
Also, because these are simple Automator apps, you can edit them in Automator if you'd like to tweak the behavior to your needs.
I hope you find this solution useful.
Chris Wintermeyer