Skip to content

Instantly share code, notes, and snippets.

@blackgate
Last active November 22, 2023 01:23
Show Gist options
  • Save blackgate/17ac402e35d2f7e0f1c9708db3dc7a44 to your computer and use it in GitHub Desktop.
Save blackgate/17ac402e35d2f7e0f1c9708db3dc7a44 to your computer and use it in GitHub Desktop.
Macbook Pro 2011 - Disable AMD GPU

Known Issues: On High Sierra there are problems related to the screen brightness and sleep issues.

1. Reset SMC and NVRAM

SMC: https://support.apple.com/en-us/HT201295

NVRAM: https://support.apple.com/en-us/HT204063

2. Change the gpu-power-prefs and disable SIP

Boot into recovery single user mode (press and hold Command + S + R) and run the following commands:

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

3. Create a rescue thumb drive (Can be done in any OS)

In this step we will create a rescue thumb drive that you can use every time you are having trouble booting macOS.

3.1. Download ubuntu iso

http://releases.ubuntu.com/17.10/ubuntu-17.10-desktop-amd64.iso

3.2. Mount the iso

On Windows (7 and later) or Ubuntu should be straight forward (you just need to double click the iso). On macOS, assuming you have the iso in the Downloads folder, run the following command on the terminal:

hdiutil attach -nomount ~/Downloads/ubuntu-17.10-desktop-amd64.iso

Which should return something like:

/dev/disk2          	Apple_partition_scheme         	
/dev/disk2s1        	Apple_partition_map            	
/dev/disk2s2        	Apple_HFS  

Then run the following commands to mount and open the iso disk (in my case /dev/disk2)

mkdir /tmp/ubuntu 
mount -t cd9660 /dev/disk2 /tmp/ubuntu/
open /tmp/ubuntu/

3.3. Format and copy the files

Format your thumb drive as FAT32 and name it RESCUE, then copy the EFI and boot folders from the iso to your thumb drive.

3.4. Edit the grub.cfg file

On your thumb drive, open the file at boot/grub/grub.cfg with any text editor and change it to:

set timeout=10
menuentry "macOS" {
   insmod hfsplus
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0
   search --set=root --file /System/Library/CoreServices/boot.efi
   chainloader /System/Library/CoreServices/boot.efi
}

If you are using High Sierra with APFS change it to:

set timeout=10
menuentry "macOS" {
    outb 0x728 1
    outb 0x710 2
    outb 0x740 2
    outb 0x750 0
    exit
}

If you have more than one macOS installed, add multiple menu entries like this (you can change the name):

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

3.5. Boot you mac with the thumb drive

Boot your mac and when you hear the chimes, press and hold Option (alt) and then choose your thumb drive.

If you haven't added multiple menu entries in the last step, you just need to press enter when grub appears and go straight to step 4.

If you have multiple menu entries, when grub appears press c to open the grub console and run the command:

ls -l

A list of partitions should appear. Take note of the UUIDs for your macOS partitions.

Press ESC to exit the grub console.

Press e to edit one macOS menu entry you want to boot.

Replace YOUR_UUID with the uuid of your partition.

Press fn F10 to boot.

Your macOS should now boot normally.

3.6. Change the UUIDs on grub.cfg (Multiple menu entries only)

If you haven't added multiple menu entries, skip this step.

On your thumb drive, open the file at boot/grub/grub.cfg with any text editor and for each menu entry, replace YOUR_UUID with the uuid you got on the step 3.5.

You can now boot from the thumb drive without having to change the uuids every time.

4. Make it permanent

In this step we will make the macOS boot without the thumb drive.

After booting macOS with your thumb drive and with it still plugged, open the terminal and run the following commands (I will assume your thumb drive name is RESCUE, if not, replace RESCUE with your thumb drive name):

cd /Volumes
sudo mkdir efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi
sudo mkdir /Volumes/efi/boot
sudo mkdir /Volumes/efi/EFI/grub
sudo cp -R /Volumes/RESCUE/boot/ /Volumes/efi/boot
sudo cp -R /Volumes/RESCUE/EFI/boot/ /Volumes/efi/EFI/grub
sudo bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/grub/grubx64.efi --setBoot
sudo bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/grub/grubx64.efi --setBoot

You are now able to boot without the thumb drive.

5. Preventing GPU from waking up from sleep (optional)

When waking up from sleep the GPU is enabled and will drain your battery faster and rise the temperatures slightly. To prevent this, you can use this kernel extension: https://github.com/blackgate/AMDGPUWakeHandler

6. Recover when macOS updates

Everytime macOS updates, you need to bless grub again. For this, you need to boot with your rescue thumb drive, and then on macOS terminal run the following commands:

cd /Volumes
sudo mkdir efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi
sudo bless --folder=/Volumes/efi --file=/Volumes/efi/EFI/grub/grubx64.efi --setBoot
sudo bless --mount=/Volumes/efi --file=/Volumes/efi/EFI/grub/grubx64.efi --setBoot
@nsgrbr
Copy link

nsgrbr commented Jul 6, 2019

Hello to all:

Since two days ago my MacBook Pro is like a brick again. How was: APPLE SECURITY UPDATE 003.

DO NOT INSTALL: Something made in UEFI iokit that can't send any instruction to bypass the nasty GPU.

Regards

Make the entire SecUpdate installation always in Safe Mode.

1 - Plug in MagSafe.
In Safe Mode the Macbook Pro 2011 is slower. My installation of SecUpdate 3 took 1 hour.
It has to be done with the MagSafe plugged into the power outlet.

2 - Boot Recovery Mode (press Command + R) at boot.

3 - Menu Utilities -> Terminal

4 - Delete old boot-args
nvram -d boot-args

5 - Create a new boot-args with Verbose and Safe Mode.
nvram boot-args="-v -x"

6 - Reboot Macbook Pro 2011 with reboot command.
reboot now

7 - Macbook Pro 2011 boot in Safe Mode without press any key.

8 - Open App Store and download SecUpdate or download .DMG file from Apple website.

9 - The installation will be all done in Safe Mode. Macbook Pro will restart many times.

10 - After completing the SecUpdate installation, you can remove the safe mode from boot-args.
sudo nvram -d boot-args

or

nvram -d boot-args

@nsgrbr
Copy link

nsgrbr commented Jul 9, 2019

High Sierra 10.13.6 + GRUB solution + AppleMuxControl.kext (version 3.13) from Sierra 10.12.1 Update = brightness control works!

https://forums.macrumors.com/threads/disable-a-failed-amd-gpu-on-a-2011-macbook-pro-grub-solution.2087527/page-8#post-27525770

@lolgear
Copy link

lolgear commented Aug 12, 2019

Well, It is a long thread...

Could anybody share the best options to revive old MacBook Pro ( 15'', Late 2011 ) ( or it is better to just bring it to Trade-in service )?
I see that High Sierra is not the best OS for this solution, right?

@fjdr
Copy link

fjdr commented Aug 12, 2019

Dear Dmetry

I don't know if a MacBook Pro 15 have the same behavior than mine. I have a MacBook Pro 17, and work without great issues since make same upgrades. Plus the elimination of the Firmware recognition of the damaged dGPU.

You may follow the instructions given in the next link by me:

https://apple.stackexchange.com/questions/362448/mac-book-pro-17-running-without-dgpu-and-16-gb-ram

@arjenwitteveen
Copy link

Hi @blackgate, I just wanted to say thanks for sharing this information.

I have performed your method on my MacBook Pro (15-inch, Late 2011) running El Capitan 10.11.6, and it seems to work great (including sleeping, both from the menu, and by closing the lid). I started out with a different guide; the only additional step I took was moving the AMDRadeonX3000.kext to a different folder and loading it with a login hook (which also performs pmset -a force gpuswitch 0). Not sure if those steps are necessary anymore, but hey, it's working so I'm not touching it. 😄

@jngraham
Copy link

I've tried this solution and it seems to work! I've also tried the WakeHandler and it's amazing. There is something that seems weird, and that is that after the fix, on subsequent startups the EFI volume disappears and I have to hit enter when grub appears each time I boot. It's only a mild inconvenience compared to having a failed GPU, but I wonder if anyone knows anything about this? I'm on Yosemite still.

@elektrokiddo
Copy link

elektrokiddo commented Sep 1, 2019

HI folks,

first of all a big THANKYOU to the developer! I was able to give new life to two 2011 15" mbp's.
I am working now on a 2011 17" book. Cloned a 15" SSD and went through the above process ... with no success. The dGPU is deactivated but the screen still looks a bit "on acid" ... took some photos....
Before all I worked on the board with a heat gun to get a working book even on dGPU power.

https://cloud.nanotec.org/index.php/s/JTeZHa3XgmrtR4m

Can somebody tell me if this is a gpu problem? Panel? Inverter? ....

Found another very interesting article here : https://realmacmods.com/macbook-2011-radeon-gpu-disable/

The gpu prefs get another value there : "x07x00x00x00x01x00x00x00" . I dud not start yet to gather information about the nvram tool so maybe there's somebody out there to explain this...please :-)

@zsoltsavanya
Copy link

Thank you all for this solution. I wasn't even noticed the brightness control problem, but you were right. Sleep is not working here whatever I do, so I gived it up: it's not a big problem. With the grub solution the normal shutdown/restart works fine. I have a question: your MBP still working fine after years with a failed gpu? I mean the failed gpu can cause fatal hw error or any hw related problems?

@BeauSlim
Copy link

Yep, my mbp has had a broken GPU for at least 3 years now. If you are set up properly (loading AMDRadeonX3000 via LoginHook) your "GPU Diode" temperature should be down around room temp, so it shouldn't be causing further heat damage to your laptop.
I always recommend installing Macs Fan Control to boost fans and keep macs running cool.

@jngraham
Copy link

@herivorenz, @nolaprinter: this happened to me today when I updated from Yosemite to El Capitan. I hadn't had this problem when re-blessing grub after installing minor updates to Yosemite, so this came as something of a surprise. I fixed it by resetting SMC & NVRAM and by disabling SIP (csrutil disable) in recovery mode. After that my MBP booted like a charm from the recovery thumbdrive & I've newly disabled the discrete graphics.

@surya00060
Copy link

Hi
I have a MacBook Pro Late 2011 model with faulty AMD GPU. I was not able to login to Mac OS X and I installed Ubuntu on my MBP erasing Mac OS X. My MBP now works fine on integrated card fine. Is there a way I can reinstall Mac OS X and make it use integrated GPU. Thanks in advance for your answers.

@zsoltsavanya
Copy link

surya: I think it's simplier to reinstall Sierra on another working Mac if you can, and then modify it with this grub method (see above the main post by Blackgate, it's so perfect I use it without any problem). If you can't access to a working Mac, then with the 2nd step I think even the Sierra install partition become bootable. Without grub, just the second step: modify the nvram. "csrutil disable" is not required as you haven't got an installed system.
Sierra is the only working system as I know, high sierra has problems (eg. it hasn't "recovery single user mode"!)

@surya00060
Copy link

Thanks for your reply sidha. I don't have another working mac. But I'm not able to go into single-user mode. Should I install Sierra first? Can you explain how to do that? I currently have an Ubuntu system only. I tried to install Mac OS Sierra via bootable USB but the bootable USB was not detectable while pressing Alt button.

@zsoltsavanya
Copy link

zsoltsavanya commented May 24, 2020

You need a working usb installer, if I am right, the installer itself has single-user mode too. Just do step 2 above and you can install I think. Creating a working usb install is a little tricky, search for it: https://support.apple.com/en-us/HT201372

@ChristianHaeuber
Copy link

I'd also like to thank the developer for these instructions. I followed them and was able to get my 2011 mbp 15" functioning again. Thank you!

@suwandyt
Copy link

suwandyt commented Jun 2, 2020

Hi, has anyone here tried installing Mojave or Catalina on their 2011 MBP?

The solution posted by @blackgate and @nsgrbr has worked wonders on my old device. And I will be eternally grateful for the solution :) However, it has come time for me to part with this machine as I purchased a new 13" MBP and am planning to sell this one.

I'm now on High Sierra with the latest solution applied and was hoping to do a clean install of Mojave or Catalina and then sell it off.

Otherwise, I'll just sell it with a caveat, they can't and shouldn't update past High Sierra.

@zsoltsavanya
Copy link

Hi suwandyt. Based on my experience: the only system without any problem is Sierra with this solution (using it now, it's fine since more than a half year now). With high Sierra: if something wrong, than you can't access to single-user mode easily.
If you want to upgrade: it is possible, but I recommend the hardware-based solution (I know it's not free, but is the best and final). Or you can do it yourself, but... : https://www.youtube.com/watch?v=vbXb0gfRxEY So, it is possible to disable the Amd GPU permanently with a kind of hardware modification. Then you can install any OS, even unsupported ones with dosdude1's solutions (just as if you have a MacBook with Intel-only gpu). Your buyer will be fine, will not ever face any problem...

@fjdr
Copy link

fjdr commented Jun 2, 2020

Hello to all: I work with my MacBook Pro 17 early 2011 with an update in RAM and Bluetooth 4.0 card. And change 3 kext files to reach 1536 Mb VRAM. Shortly will test it with Mojave and Catalina.

I use it with High Sierra since years without troubles until each Security Updates. For that reason make a procedure with a sure success.

General Hacks MBP 17 for boot

DISABLE AMD EFI commands

Start in single mode:

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

Then reboot Restore and Disable SIP
Reboot on Recovery mode: In Terminal do:
csrutil disable

And then
Go to your macOS Volume and do:

mv /Volumes/(your Mac Volume)/System/Library/Extensions/AMDRadeonX3000.kext /Volumes/(your Mac Volume)/System/Library/Extension-off/
reboot


Force CAT
sudo /Applications/Utilities/Continuity-Activation-Tool/Continuity\ Activation\ Tool.app/Contents/Resources/contitool.sh -f

@fjdr
Copy link

fjdr commented Jun 2, 2020

NOTE: My discrete Graphic card dies long time ago. Then work only with the integrated only. Upgrade to 16 GB RAM and it is very stable until editing very large photos. But it is reasonably operative.

@fjdr
Copy link

fjdr commented Jun 2, 2020

Other thing: Mojave and Catalina do not use the discrete card at all. But I do not sure about CAT

@BeauSlim
Copy link

@suwandyt I have been running on Mojave for couple weeks. The latest patch for high-sierra wouldn't install for me so I used dosdude's Mojave enabler to install Mojave. I have a startup script to kextload AMDRadeonX3000.kext. Backlight works. GPU diode temp seems higher than it used to be but 40C is okay. Sleep is buggy and I have not yet tried the wake handler.

I would imagine that you will get the best price if you do dosdude's hardware mod to disable the faulty GPU.

@brianjessup
Copy link

Hi! Where did you all track down the gmux i/o ports addresses?

I have a MacBookPro9,1 Mid-2012 nonretina and I'm trying to track those down to modify the kext. The 2011 values don't seem to work for me.

Thank you!

@iriann
Copy link

iriann commented Nov 24, 2020

anyone tried this awsome method on Catalina?

@kandman
Copy link

kandman commented Mar 8, 2021

This is great! I've been using the kext solution for years but always had problems with sleeping and shutdown. This solves everything.

Many thanks to the developer and to everyone who has shared their knowledge.

Question: Currently on 10.11.6 and would like to get to 10.12.x. Has anyone done this successfully and if so, how?

Thanks in advance for your time.

@gaddyya
Copy link

gaddyya commented Dec 4, 2021

In my case, I did the following:

  • option + R + Boot
  • csrutil disable
  • reboot
  • option + S
  • mount -uw /
  • mkdir /Extention-off
  • mv /System/Library/Extension/ATIRadeonX3000.kext /Extention-off
  • reboot

This completely disables the discrete graphics and everything else continues to work. Is retained when falling asleep and rebooting, the brightness change is also alive working!

PS. I've tried to disable by nvram, but for me it dosn't work. But this one is done! Excellent! I satisfied!

@jxdesign
Copy link

My 2011 macbook pro was restarting into what seemed somewhat normal, but then would get stuck on a grey screen and I couldn't access anything. Running this line in single user mode:

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

did the trick. Thank you so much for making this so clear.

Is there a way to make this permanent? I don't need the whole reboot thumb drive steps. Just wondering if there's a way for me to permanently change the gpu power prefs so I don't have to manually type in each digit and letter. The computer will freeze up when I close the screen and put it to sleep and I"ll get the spinning rainbow ball of death and have to restart, and then type the above code in. So anything to permanently run this would be very helpful!

@IgnacioPaiz
Copy link

In step 3, nothing happens when I click the link. "Download ubuntu iso", am I missing something?

@blackgate
Copy link
Author

@IgnacioPaiz This uses an outdated version of Ubuntu, you probably need to download a newer version.

@zsoltsavanya
Copy link

Hi, the link works here, and no, I think you don't need newer, the old version is fine, I'm still using it.

@m-a-v
Copy link

m-a-v commented Apr 16, 2023

This would be the working URL.
https://old-releases.ubuntu.com/releases/artful/ubuntu-17.10-desktop-amd64.iso

But this Ubuntu version is already very much outdated. Basically, you can still use it, but probably an Ubuntu 22.04 LTS would do as well.

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