MacBook Pro – AMD GPU issues – how I finally fixed it

From Cheeky Factor

Status: Archived
Publication date: 2019-12-15
Last edited by: Garyf
Last updated: 2024 - 09 - 4

The problem

So, after several weeks, I finally found a way of fixing it. A few days OK I was ready to give up. But then I found that with the operating system the Mac was using I had to do things differently. The operating system in question, High Sierra.

How did I do it, good question, here is the answer…

The resolution

Please note: cheekyfactor.com or the owners of this site cannot be held responsible if things go wrong. You perform these tasks at your own risk.


Device: MacBook Pro
Operating system: MacOS
Software: No software identified

Guidance for MacBook Pro, MacOS,

First of all, I needed to get a copy of Arch Linux. I downloaded it and stuck it on a USB stick.

Before we go into Arch Linux, I did some preparation on the MacBook pro. At this point the graphics on the Mac was bad, you could barely make out what was going on. Boot in single user mode by holding down command and S.

Once in single user mode, run the command:

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

Then run:

reboot

When rebooting hold down command R down until you hear the chime.

You will then be able to select which drive you want to boot from. Insert the USB stick with Arch Linux on into the machine. Select the EFI boot. Select Arch Linux archiso x86_64 UEFI CD. Press the E key. At the bottom of the screen you will get a line of code. At the end at nomodeset

ArchLinux Boot Options

Run the command:

cd /sys/firmware/efi/efivars

Then

ls

You will get:

MacBook pro – Arch Linux list
MacBook pro – Arch Linux list

At the bottom right hand corner you can gpu-power-prefs-

We need to remove it do this use the command

rm gpu-power-prefs-

Then hit the tab key, this should automatically populate the rest of the filename. I did have a few issues where it didn’t populate the full name so had to type in the last section.

If you don’t have one of these, don’t worry, go to the next section.

Sometimes when removing you may get an error that says

“operation not permitted”

If that’s the case, then the efivarfs has been mounted as read only. You will need to remount it with read write permissions and repeat the rm command. To do this run the command:

cd /

umount /sys/firmware/efi/efivars/

mount -t efivarfs rw /sys/firmware/efi/efivars/

cd /sys/firmware/efi/efivars/

rm gpu-power-prefs-

Again, after the gpu-power-prefs- hit the tab key which should populate the rest of the filename. Now we have to create a new gpu-power-prefs file, run the command:

printf “\x07\x00\x00\x00\x01\x00\x00\x00” > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

Finally on this bit (in theory), we can set it so the file can only be accessed by a superuser. You can do this running the chattr command, this is:

chattr +i “/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9”

If this works, unmount the efivars using the command:

cd / umount /sys/firmware/efi/efivars/

This basically flushed the efivars out. Now to reboot.

reboot

For some reason chattr wasn’t found. So I went to basics and changed the owner of the file /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9 using chown.

But for some reason, the chown didn’t work, I couldn’t even figure out what the user permission was.

But it still didn’t work. I rebooted the machine, still got stuck half way through.

The Apple logo with a bar stuck at 50%
The Apple logo with a bar stuck at 50%

So I forced shut it down.

If you have done this already, boot into single user mode but holding down command and S when you boot the machine up.

Run

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

And reboot. On the reboot, hold down command and R when you boot the machine up, let go when you get the Apple logo.

macBook pro – macOS utilities
macBook pro – macOS utilities

Click on utilities and terminal:

MacOS utilities for terminal
MacOS utilities for terminal

If you have more than one partition run the following lines, if you only have one partition you can skip this bit:

diskutil cs list (find UUID for drive) diskutil coreStorage unlockVolume UUID

Now, we all need to do the following, run the command:

cd /Volumes/Macintosh\ HD

MacOS terminal with /Volumes/Macintosh\ HD command
MacOS terminal with /Volumes/Macintosh\ HD command

Now, we need to remove the AMD Kexts, first create a directory where we can stick them on the off chance you need them in the future using the line:

mkdir AMD_Kexts

Because I had done this a few times, I have now started to create the directory on the date, so this one I called 13Dec19_AMD_KEXTS Now, lets move those AMD Kexts:

mv System/Library/Extensions/AMD*.* AMD_Kexts/

then type in reboot:

reboot

In theory, if you have done everything correctly, you should now have a working MacBook Pro.

I booted, and f**k me, it worked!

The MacBook Pro boots
The MacBook Pro boots

But the question is, will it reboot OK.

But I still want to want to set that files so it is only accessible to the superuser (technical term – immutable). I have decided not pursue this, it’s December, I need to get this Mac back to her owner before Christmas and fast running out of time.

After looking online, sometimes if the USB stick that you use isn’t formatted correctly that seems to be an issue. So will give that ago if it comes back to me.