So I've been experimenting with the refit shell to see if its possible to enable the 9400M instead of the 9600M GT.
The refit shell is part of the standard refit installation and you can load it by choosing the little terminal icon from the refit menu when you first boot. The following will walk you through using the shell to try and activate the 9400M on the MBP 5,1.
<disclaimer>Warning: If you are not very familiar with things like hex editors and low level stuff, or if you are just careless, you could mess with your EFI in a bad way, so please proceed with caution (if you are careful and know what you're doing it is perfectly safe).</disclaimer>.
First thing to know if you're using the shell is that most shell commands can take the option -b which means to break each output page. They all also take the option -? which means to show a help page about the command. ie. from the refit shell do:
to get info about the help command or you can just do
which will show you all the different commands the shell supports. The first one to look at is
which will show us that we can see both display controllers (9400 & 9600) with pci id's 00 02 00 00 and 00 03 00 00 respectively.
If we do
we find that the 9400M just has 0xFF for all values, and so I think is not power up maybe, whereas the 9600M GT has some sane information.
The next thing we can do is get a list of all the efi devices:
Which again lists the 2 video controllers with handles e5 and e7 respectively. You can get some more info by doing:
and same for e7 - this seems to show that handle e7 is being used as the active graphics card (which is the 9600M GT from what I can tell).
Next we can see all the EFI variables with
and there are 2 pretty interesting ones there - gpu-power-prefs and LEGACYVGAHANDLE. If you look carefully you'll notice that the value of LEGACYVGAHANDLE (on my machine it is 18 4A 6D 7E 00 00 00 00 - where the first 4 bytes are the same as the handle shown when you do a dh -b e7 - 7E6D4A18 - but just in reverse byte order since it's little endian). The other thing to note is that gpu-power-prefs is stored in NVRAM (indicated by the NV) whereas LEGACYVGAHANDLE is not, and from what I've been able to gather LEGACYVGAHANDLE gets set as a result of the value of gpu-power-prefs. The default value of gpu-power-prefs is 01 00 00 00 (ie 1) and I've been experimenting with different values to see if we can get the 9400M powered up at boot (since I assume it is powered down normally).
You can use dmpstore to save a variable to a file or to load a variable from a file, so we can use this to change the values of these variables. So try something like the following to save the original value of gpu-power-prefs to a file and edit a copy of the file to set a new value from:
Code:
dmpstore gpu-power-prefs -s fs0:\gpu-power-prefs.orig
cp fs0:\gpu-power-prefs.orig fs0:\gpu-power-prefs
hexedit fs0:\gpu-power-prefs
now change the 01 00 00 00 and the end of the file to 00 00 00 00 (ie effectively change the value from 1 to 0). You can check that you didn't make any major screwups by doing a:
Code:
comp fs0:\gpu-power-prefs.orig fs0:\gpu-power-prefs
and it should show just a single byte change from 01 to 00.
We can now set the value of gpu-power-prefs to our new value by using dmpstore again:
Code:
dmpstore gpu-power-prefs -l fs0:\gpu-power-prefs
So with this new value you can exit the shell and power on and off the machine. Now go back into the shell and do a dmpstore gpu-power-prefs and you'll see its got your new value of 00 00 00 00 AND if you do a dmpstore legacyvgahandle you can see the handle should now be changed to that of the device e5 (ie the 9400M) instead of the device e7 (the 9600M GT).
So at this point it looks like we've got the 9400M enabled as the legacy mode GPU - YAY - BUT unfortunately though when I then go and boot into Ubuntu it still only lists the 9600M GT and there is still no sign of the 9400M.
So after all that I still can't seem to get it to use the 9400M over the 9600M GT - I've posted the instructions here though in case anyone else can get further with it or wants to experiment more.
Bookmarks