I have a MacbookPro 5,1/5,2/5,3 that comes with two graphic cards, and by default I get the 9600M GT that consumes more battery that the other one. I have no idea how to deactivate it and activate the second one.

More details after the Bruno's reply:

I'm using Ubuntu :

11.10 64 bits with kernel 3.0.0-15-generic (Zegnus, MBP 5,1)

12.04 64 bits with kernel 3.2-0-24-generic (Megagolgoth, MBP 5,3)

I have installed rEFIt 0.14, and GRUB2 EFI64

I've modified the entry on the file /boot/grub/grub.cfg adding

outb 0x750 0

even though at the top of the file it says:

DO NOT EDIT THIS FILE
It is automatically generated by grub-mkconfig using templates
from /etc/grub.d and settings from /etc/default/grub

I save the file, boot, select the entry and then I have a black screen and nothing more happens.

I need more help. After adding Outb 0x750 0 to grub.cfg. I stuck at black screen at startup. I even cant switch between terminals using alt+F1. What do you suggest My laptop is 5,1 9600M GT with 256 megs of memory.
–
user264542Apr 2 '14 at 11:35

Save that in a file called igd.c. Compile it with gcc -O2 igd.c -o igd. This will create an executable called igd. Executed with superuser privileges, it will turn off the discrete controller and switch to the integrated controller.

Now we need to execute this on resume. Create a file called /etc/pm/sleep.d/10igd

It should contain:

#!/bin/sh
#
/path/to/igd

Where /path/to is the path to where you put the igd executable we created in the previous step.

chmod +x /etc/pm/sleep.d/10igd

This file will be executed on suspend and resume. Done right, that 10igd script would check to see if this is a suspend/resume/freeze/thaw and only execute when needed. As-is, it executes on all of them. No big deal, it won't hurt to run it during freeze or suspend.

I got everything working on my mbp5,1: Sound, LCD Backlight, Keyboard backlight, Fans running low (since disabling 9600M GT),Apple like short cut (CMD+C to copy),Flash (almost stable)... So just ask if you need more help