Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process

Taken from StackExchange

Thanks to LangLangC

NOTE: This is experimental; works for some people, not for others

Improved thermal and power management

Open Terminal.app

Create login hook folder for thermal and power management

sudo mkdir -p /Library/LoginHook

Create login hook file

sudo nano /Library/LoginHook/LoadX3000.sh

Add folowing contents when nano opens

#!/bin/bash
kextload  /System/Library/Extensions-off/AMDRadeonX3000.kext
pmset -a force gpuswitch 0    # undocumented/experimental
exit 0

Use ctrl + o to save and ctrl + x exit

Make it executable

sudo chmod a+x /Library/LoginHook/LoadX3000.sh

Register login hook

sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.sh

Reboot normally

Check that proper kexts exist

kextstat | grep AMD

The command above should display

... com.apple.kext.AMDLegacySupport (1.5.1) ...
... com.apple.kext.AMD6000Controller (1.5.1) ...
... com.apple.kext.AMDSupport (1.5.1) ...
... com.apple.kext.AMDLegacyFramebuffer (1.5.1) ...

And this
... com.apple.AMDRadeonX3000 (1.5.1)  ...

should also appear on the list

Reboot normally

Boot into single user recovery by pressing on boot

Command + r + s

Modify NVRAM

nvram boot-args="-v agc=0"

Reboot

reboot

Script ot make part of the process automatic

Open terminal

Create script

sudo nano /force-iGPU-boot.sh

Add contents

#/bin/sh
sudo nvram boot-args="-v"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0

Make exectuable

sudo chmod a+x /force-iGPU-boot.sh

When booting into single user mode (Cmd + r or CMD + r + s) use

sh /force-iGPU-boot.sh
@artkirienko

This comment has been minimized.

Copy link

@artkirienko artkirienko commented Feb 19, 2019

@cdleon, I think you need to change this

#/bin/sh
sudo nvram boot-args="-v"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0

to this

#/bin/sh
nvram boot-args="-v agc=0"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0

Since nvram boot-args="-v agc=0" is in Modify NVRAM section.

@soloofboom

This comment has been minimized.

Copy link

@soloofboom soloofboom commented Apr 12, 2019

Hi @cdleon, can you confirm what @artkirienko is saying?
And can I do it if I used the @dosdude method with the Macbook Pro dgpu disabler tool?

Thanks

@Brax84

This comment has been minimized.

Copy link

@Brax84 Brax84 commented May 3, 2019

@soloofboom,@artkirienko I use this
nvram boot-args="agc=0"

with the csrutil enable the the temp of the GPU Diode is more >50°C (agc=0 seems no to work)
With the csrutil disable the temp of the GPU Diode is 1-5°C
But it's also possible enter in Recovery CMD+R open terminal and set
csrutil enable --without nvram

For gpuswitch 0

I've Open terminal and type:

sudo pmset -a gpuswitch 0

because first with only LoadX3000.sh in LoginHook the command pmset -g in terminal show gpuswitch 2 and not 0

System MacOS High Sierra

@cdleon

This comment has been minimized.

Copy link
Owner Author

@cdleon cdleon commented May 20, 2019

@artkirienko @soloofboom @Brax84 for me it worked how I originally posted it. I think I should add that the improvement is just a couple degrees and it doesn't work for everyone, some people have stated it works and others not. Mine is usually at ~43 C, after applying fix which is an improvement from the ~56 C I had before.

@soloofboom

This comment has been minimized.

Copy link

@soloofboom soloofboom commented May 22, 2019

@Brax84 being able to drop the temps to 1-5°C is excellent!

So just to be sure, you did all the method above, without changing what @artkirienko is saying, then
csrutil enable --without nvram in recovery

Reboot

Open Terminal and
sudo pmset -a gpuswitch 0

And then having a 1-5°C on the GPU diode?

Thanks

@Brax84

This comment has been minimized.

Copy link

@Brax84 Brax84 commented May 22, 2019

@soloofboom
After some experiment, I've set : csrutil disable because with SIP complete disable, I've no problem with stop, sleep, and wake, only sporadic freeze with shutdown.
After set in terminal sudo pmset -a gpuswitch 0 the GPU Die is ALWAYS very very low, sometimes macfan doesn't even show the temp of gpu die
I use macbook 15inch late 2011 with High Sierra, with the last update.
Yes, I followed the guide @cdleon and the changes of @artkirienko I've only add the step in terminal sudo pmset -a gpuswitch 0
because before pmset -g show gpuswitch 2, and after sleep I had black screen and panic on an graphic driver.

p.s For High Sierra you can disable sip without Recovery ..see my Tricks

Regards by Italy

@Brax84

This comment has been minimized.

Copy link

@Brax84 Brax84 commented Jun 8, 2019

Hi Everyone,

for "shutdown" and "restart" (for now I've not test "stop") , I'm trying this method:

logout (Cmd+Opt+Shift+Q) and select restart or shutdown
in this way no block or black screen

With Automator I've create app for logout
Open Automator > New > APP add Apple Script in right box

on run {input, parameters}
tell application "loginwindow" to «event aevtrlgo»
	return input
end run

1)Save app into your preferred folder
2)Click on app the cmd+i , add a preferred icon for app with drag&drop.
3)Add app to the Dock

Test on High Sierra 10.13.6

@pzanitti

This comment has been minimized.

Copy link

@pzanitti pzanitti commented Jul 2, 2019

My lid and brightness keys are no longer working on High Sierra Security Update 2019-003. Can anybody else reproduce?

Edit: Nevermind, I was able to get it to work by only moving away /System/Library/Extensions/AMDRadeonX3000.kext instead of all /System/Library/Extensions/AMD*

@MarxCha

This comment has been minimized.

Copy link

@MarxCha MarxCha commented Jul 26, 2019

Hi @cdleon, it doesn't work for me. I would like to revert the process... I have problems to shutdown the Mac -its freeze all the time-
I reset NVRAM.. but it remains the problem. Please HELP.

@Brax84

This comment has been minimized.

@barmins

This comment has been minimized.

Copy link

@barmins barmins commented Nov 4, 2019

can I use this method u using extend monitor?

@wojtekzpodpachy

This comment has been minimized.

Copy link

@wojtekzpodpachy wojtekzpodpachy commented Nov 7, 2019

I THINK I FIGURED IT OUT SO to have sleep function working you have to start gfxcardstatus (no need to set anything) first then kextload x3000 I made a script and set it to start after login here you go
/
open /Users/wojciechsierocki/Desktop/123/gfxCardStatus
sudo kextload /Users/wojciechsierocki/Desktop/amdradeonx3000.kext
killall Terminal
/
(I disabled password for sudo to make it easier)
ofc you need to set your kext destination as well as gfx program
I'm using Mojave

@Brax84

This comment has been minimized.

Copy link

@Brax84 Brax84 commented Nov 18, 2019

My MacBookPro8,2 (2011 15" i7 ) works better with Mojave Dosdude1 Patcher , no problem with shutdown, restart, stop and close lid.
I have apply the guide without other tweaks.
With Catalina Dosdude 1 Patcher Mac Works great but it's impossibile to load AMDRadeonX3000.kext with Kextload and the temp it's unstable.

I'm getting this error on Catalina with manual kextload on terminal

Kext with invalid signature (-67030) allowed: <OSKext 0x7fd53e43a860 [0x7fff8551dd10]> { URL = "file:///System/Library/Extensions/IOSurface.kext/", ID = "com.apple.iokit.IOSurface" }
Disabling KextAudit: SIP is off
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV29AMDRadeonX3000_AMDAccelDevice' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The super class vtable '__ZTV16IOAccelResource2' for vtable '__ZTV31AMDRadeonX3000_AMDAccelResource' is out of date. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV31AMDRadeonX3000_AMDR8xxGLContext' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV32AMDRadeonX3000_AMDAccel2DContext' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV32AMDRadeonX3000_AMDAccelCLContext' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV32AMDRadeonX3000_AMDAccelMemoryMap' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV33AMDRadeonX3000_AMDAccelStatistics' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV35AMDRadeonX3000_AMDAccelEventMachine' is malformed. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The super class vtable '__ZTV20IOAccelVideoContext2' for vtable '__ZTV35AMDRadeonX3000_AMDAccelVideoContext' is out of date. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The super class vtable '__ZTV22IOGraphicsAccelerator2' for vtable '__ZTV37AMDRadeonX3000_AMDGraphicsAccelerator' is out of date. Make sure your kext has been built against the correct headers.
(kernel) kxld[com.apple.kext.AMDRadeonX3000]: The vtable '__ZTV29AMDRadeonX3000_AMDAccelShared' is malformed. Make sure your kext has been built against the correct headers.
(kernel) Can't load kext com.apple.kext.AMDRadeonX3000 - link failed.
(kernel) Failed to load executable for kext com.apple.kext.AMDRadeonX3000.
(kernel) Kext com.apple.kext.AMDRadeonX3000 failed to load (0xdc008016).
(kernel) Failed to load kext com.apple.kext.AMDRadeonX3000 (error 0xdc008016).
Failed to load /System/Library/Extensions-off/AMDRadeonX3000.kext - (libkern/kext) link error.
Check library declarations for your kext with kextlibs(8).

Ideas?

@resc1313

This comment has been minimized.

Copy link

@resc1313 resc1313 commented Jan 13, 2020

I have the same issue as Brax84. Appreciate any help. Thx

@sukisuki18

This comment has been minimized.

Copy link

@sukisuki18 sukisuki18 commented Jan 30, 2020

is there a fix for the sleep/wake???

@DarkLegacy248

This comment has been minimized.

Copy link

@DarkLegacy248 DarkLegacy248 commented Apr 4, 2020

I have an early 2011 MacBook Pro with the same heat issue. Works great in High Sierra (no GFX issue yet) but wanting to up grade OS. I will try Mojave but have the same issue trying to load AMDRadeonX3000.kext with Catalina. Does anyone have a work around.

On a different note I cannot modify any system kext 's either (100% kernal usage) getting permission error when trying to modify IOPlatformPluginFamily.kext (I know a new battery will fix that but it's 9 years on and doesn't move).

Could the issue be related to the new security measures that Catalina brings (ie. Data read-only partition). And is there a way around that within the OS as Sudo /sbin/mount -uw / works but only in single user mode.

Seem like apple is even stopping us from modifying anything even on purpose.

Thanks.

@DJSAKUGA

This comment has been minimized.

Copy link

@DJSAKUGA DJSAKUGA commented May 23, 2020

Same problem here.
I've installed Catalina with Dosdude1 Patcher, I'm trying to kextload "AMDRadeonX3000.kext" to disable software-side with command "pmset -a force gpuswitch 0 (1 or 2). Is there a fix for this? I've tried kextutil, change permissions, single user mode mounting and other things, but nothing at all. Thanks guys.

@varunsinghal2311

This comment has been minimized.

Copy link

@varunsinghal2311 varunsinghal2311 commented May 24, 2020

i have installed Catalina. now this patch is not working. i think its because of this change in Terminal-
"The default interactive shell is now zsh"

can someone please help?

@nplarsen

This comment has been minimized.

Copy link

@nplarsen nplarsen commented Jun 21, 2020

+1 on the issue DarkLegacy248 and DJSAKUGA has. I think this is the main reason why we no longer need to move the AMDRadeonX3000.kext out of the /System/Library/Extensions folder after installing Catalina. It simply just won't load.

It simply would be great to make the faulty dGPU cool down in some way also in Catalina in a software way. Any help would be appreciated.

EDIT: Apple has not provided the AMDRadeonX3000.kext in their installation since High Sierra. That is why it has been a part of the "Legacy Graphic Drivers" in DosDudes Patcher for Mojave and Catalina. It is literally that same kext file in those two patchers. As I understand, it is a file taken from an earlier version of MacOS. The only thing is that Catalina can't load it anymore.

@pedronanonel

This comment has been minimized.

Copy link

@pedronanonel pedronanonel commented Jun 26, 2020

Im stuck on bootloop after trying to install security update. Tried really everything but nothing works

@c0defre4k

This comment has been minimized.

Copy link

@c0defre4k c0defre4k commented Jul 15, 2020

Im stuck on bootloop after trying to install security update. Tried really everything but nothing works

Same Problem here. Has anyone an Idea?

@pedronanonel

This comment has been minimized.

Copy link

@pedronanonel pedronanonel commented Jul 15, 2020

Im stuck on bootloop after trying to install security update. Tried really everything but nothing works

Same Problem here. Has anyone an Idea?

call me on discord : ricolhaw#0023

@c0defre4k

This comment has been minimized.

Copy link

@c0defre4k c0defre4k commented Jul 15, 2020

It appears i had a typo in my force-iGPU.sh script.

Moving the "new/updated" AMDX3000 kexts after the update and clearing the NVRAM/PRAM + setting sudo nvram fa4... did the trick.

@DarkLegacy248

This comment has been minimized.

Copy link

@DarkLegacy248 DarkLegacy248 commented Jul 17, 2020

It appears i had a typo in my force-iGPU.sh script.

Moving the "new/updated" AMDX3000 kexts after the update and clearing the NVRAM/PRAM + setting sudo nvram fa4... did the trick.

Which OS are you using, did you manage to solve the AMDRadeonX3000.kext load on Catalina?

@c0defre4k

This comment has been minimized.

Copy link

@c0defre4k c0defre4k commented Jul 17, 2020

@DarkLegacy248 I‘m on High Sierra

@OmarcianoG

This comment has been minimized.

Copy link

@OmarcianoG OmarcianoG commented Aug 4, 2020

Hi Guys, Thanks in advance for your support.
When I ask:

kextstat | grep AMD

My results are different:
...com.apple.kext.AMDLegacySupport (1.6.8) ...
...com.apple.kext.AMD6000Controller (1.6.8) ...
...com.apple.kext.AMDLegacyFramebuffer (1.6.8) ...

Different from the expected result:

... com.apple.kext.AMDLegacySupport (1.5.1) ...
... com.apple.kext.AMD6000Controller (1.5.1) ...
... com.apple.kext.AMDSupport (1.5.1) ...
... com.apple.kext.AMDLegacyFramebuffer (1.5.1) ...

And this
... com.apple.AMDRadeonX3000 (1.5.1) ...

should also appear on the list

It is ok to follow the next step or I've done something wrong?

I could successfully resurrect an old MBP 15' Early 2011 whit defective gpu using the CDleon method.
I've updated all the security updates and stuff moving the AMDRadeonx3000 file to his original location before updating and moving it back to Extenssions-off when updated succesfully.
No problem with sleep, brightness or anything. Just still a high temperature when running Ableton Live 10.

Thanks!

@WaleedAlassaf

This comment has been minimized.

Copy link

@WaleedAlassaf WaleedAlassaf commented Aug 22, 2020

That dropped my temperature about 5-6°C. I tested before and after with a 1080p 60fps video.

@MBP2011User

This comment has been minimized.

Copy link

@MBP2011User MBP2011User commented Aug 23, 2020

Thankyou so much for the GPU solution and this temperature thing.
I followed your steps to the letter. I have chosen to run Sierra rather than High Sierra, High Sierra seems to make everything run hotter.
I reflowed the computer first and re-pasted everything whilst I was at it, this enabled me to get the OS installed and then I did your software modification.
I have Macs fan control installed now, controlling by CPU Proximity, 50-70deg. Fans hover on 2000rpm mostly and everythings cool.
I also found a method of increasing the HD3000 virtual memory from 512 to 1024mb, not sure if it makes much difference though.
It's great to still be able to use this 17" MBP and I without your solution I wouldn't have my screen brightness.

@GinoLandi

This comment has been minimized.

Copy link

@GinoLandi GinoLandi commented Sep 4, 2020

Hi Everyone,

for "shutdown" and "restart" (for now I've not test "stop") , I'm trying this method:

logout (Cmd+Opt+Shift+Q) and select restart or shutdown
in this way no block or black screen

With Automator I've create app for logout
Open Automator > New > APP add Apple Script in right box

on run {input, parameters}
tell application "loginwindow" to «event aevtrlgo»
	return input
end run

1)Save app into your preferred folder
2)Click on app the cmd+i , add a preferred icon for app with drag&drop.
3)Add app to the Dock

Test on High Sierra 10.13.6

Hi, I'm on Yosemite and macOS doesn't shutdown or reboot, it is stack on black screen.

Cmd+Opt+Shift+Q works, but I'm trying to automate the process and I don't have Automator.

Anyone had other solutions?

Or there's a way to reverse the fix process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.