Skip to content

Instantly share code, notes, and snippets.

@acj
Last active July 7, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acj/b10e4f46f3ceb663e2bcdd00128c893b to your computer and use it in GitHub Desktop.
Save acj/b10e4f46f3ceb663e2bcdd00128c893b to your computer and use it in GitHub Desktop.
Building a custom ISO to fix the 2011 MacBook Pro Radeongate GPU problem

How to build a bootable Arch-based thumb drive that can temporarily disable the Radeon GPU in a 2011 MacBook Pro.

I recently spent a few hours rescuing a faithful 2011-era MacBook Pro that had begun to suffer from the "Radeongate" graphics distortion problem. While it's possible to disable the Radeon GPU, the steps involve a lot of manual labor. Their automated solution produced an ISO that wouldn't boot for me, so I ended up building a custom ISO that only requires me to run one command after installing each macOS update. A non-technical family member can perform the fix, which is a big plus.

You'll need to buy RealMacMods' automated utility so that you can grab their script that does the heavy lifting. It's $10 at the time of this writing and is a nice way to support their research. The RadeonDisable.sh script is included in the bundle that they provide after the purchase. Once you have that script or have rolled your own based on their instructions, follow these steps to build a new ISO that includes the script.

Disclaimer

Some of the commands described below can harm your system if you make a mistake. I've used this process successfully, but I take no responsibility for what happens on your end. Be safe, type carefully, and good luck.

Steps

Note: I developed this process on Ubuntu Linux, but the same tools should be available on other Linux distributions.

  1. Download an Arch .iso image: https://www.archlinux.org/download/
  2. Unpack the iso:
$ mount -t iso9660 -o loop archlinux-xxxxxx-x86_64.iso /mnt
$ cp -a /mnt arch-custom-radeon-fixer-iso
$ cd arch-custom-radeon-fixer-iso/arch/x86_64
$ unsquashfs airootfs.sfs
$ rm airootfs.sfs
  1. Copy the RealMacMods script into place and make it executable
$ cp path/to/RadeonDisable.sh squashfs-root/root/
$ chmod +x squashfs-root/root/RadeonDisable.sh
  1. Optional but recommended - add nomodeset to the boot options:
$ cd ../..
$ mkdir mnt
$ mount -t vfat -o loop EFI/archiso/efiboot.img mnt
$ vim mnt/loader/entries/archiso-x86_64.conf
# Add `nomodeset` to the end of the `options` line. Save and exit.
$ umount mnt
$ cd arch/x86_64
  1. Repackage the ISO's filesystem
$ mksquashfs squashfs-root airootfs.sfs
$ rm -r squashfs-root
$ cd ../..
  1. Build a new hybrid ISO with EFI boot support
# This label will vary depending on your Arch image. If it's incorrect, then the image won't boot.
$ export ISO_LABEL="ARCH_201807"
$ xorriso -as mkisofs -iso-level 3 -full-iso9660-filenames -volid "${ISO_LABEL}" -eltorito-boot isolinux/isolinux.bin -eltorito-catalog isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr isolinux/isohdpfx.bin -eltorito-alt-boot -e EFI/archiso/efiboot.img -no-emul-boot -isohybrid-gpt-basdat -output ../arch-radeon-disabler.iso .
  1. Write the new ISO to your thumb drive
sudo dd if=../arch-radeon-disabler.iso of=/dev/sdXX bs=10M
  1. Boot your Mac while holding down the Option key. When you see an "EFI Boot" option, select it. Let the machine boot up. At the shell prompt run the following command and follow the instructions:
# ./RadeonDisable.sh

References

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