Skip to content

Instantly share code, notes, and snippets.

@blackgate
Last active June 2, 2021 12:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackgate/48c57e3ac5f82a1b43c6c2cb8be98fec to your computer and use it in GitHub Desktop.
Save blackgate/48c57e3ac5f82a1b43c6c2cb8be98fec to your computer and use it in GitHub Desktop.
Macbook Pro 2011 - Disable Discrete Graphics

This solution requires installing linux. If you don't want to install linux see this gist: https://gist.github.com/blackgate/17ac402e35d2f7e0f1c9708db3dc7a44

Disable SIP

If you can boot into recovery mode (Command + r), open the Terminal and enter:

csrutil disable

If you can’t, create a USB stick with rEFInd as described here: http://www.rodsbooks.com/refind/sip.html#disable_in_refind

Boot into single user mode (Command + s) and change the gpu-power-prefs nvram variable:

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
reboot

Install ubuntu alongside with macos following the steps in the description of this video: https://www.youtube.com/watch?v=ELUzf0MDQS0

After following those steps, when grub appears press 'c' and execute:

ls -l

Annotate the uuid for the macos partition

Press ESC and boot ubuntu

Open the terminal and edit the custom grub entries

sudo nano /etc/grub.d/40_custom

Add the following entry to the end, replacing the <ANNOTATED UUID> with yours

menuentry "macOS" {
    insmod hfsplus
    outb 0x728 1
    outb 0x710 2
    outb 0x740 2
    outb 0x750 0
    search --no-floppy --fs-uuid --set=root <ANNOTATED UUID>
    chainloader /System/Library/CoreServices/boot.efi
}

Save the file, update grub and reboot

sudo update-grub
reboot

You should now be able to boot macos with AMD graphics disabled.

When you update macOS and you are not booting into grub anymore, you can use the rEFInd usb stick created earlier to boot into grub, and start macOS from there. Then on macos Terminal execute:

cd /Volumes
sudo mkdir efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi
sudo bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/ubuntu/grubx64.efi --setBoot
sudo bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/ubuntu/grubx64.efi --setBoot

And it should be working again.

@herivorenz
Copy link

Excellent. Thanks for that. Have it working (I think). I just have one question. On boot up without the flash drive, I get a grey screen for 30 seconds before the grub appears. Hitting Enter successfully launches OS. Just wondering if the delay is normal. Also, ran an OS update (El Capitan) and this did not break the code. Great work! You're a champ!

@blackgate
Copy link
Author

@herivorenz The delay is a common GRUB issue when used with more than one SSD/HDD.

@herivorenz
Copy link

Ok thanks. Just have the one HDD so guess it is just a glitch. Thanks for your input and expertise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment