To disable the Nvidia 9600M GT you have to add the following to the grub menu entry outb 750x0
, ie:
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
outb 0x750 0
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt5)'
search --no-floppy --fs-uuid --set=root bc495raf-515r-4r2b-b3de-0ec679a7303a
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=bc495raf-515r-4r2b- b3de-0ec679a7303a ro hpet=force
initrd /boot/initrd.img-3.0.0-12-generic
}
Additionally for powerdown after resume after suspend:
On resume, the discrete graphics controller will be turned on and active. We need to turn it off and switch back to the integrated GPU.
This can be done with a very simple little program:
#include <stdio.h>
#include <sys/io.h>
#define PORT_SWITCH_DISPLAY 0x710
#define PORT_SWITCH_SELECT 0x728
#define PORT_SWITCH_DDC 0x740
#define PORT_DISCRETE_POWER 0x750
static int gmux_switch_to_igd()
{
outb(1, PORT_SWITCH_SELECT);
outb(2, PORT_SWITCH_DISPLAY);
outb(2, PORT_SWITCH_DDC);
return 0;
}
static void mbp_gpu_power(int state)
{
outb(state, PORT_DISCRETE_POWER);
}
int main(int argc, char **argv)
{
if (iopl(3) < 0) {
perror ("No IO permissions");
return 1;
}
mbp_gpu_power(0);
gmux_switch_to_igd();
return 0;
}
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
outb
, I get black screen. – Mladen Jablanović Jan 04 '14 at 20:22