Z-Car

2011 MacBook Pro GPU Failure – A software fix to disable GPU

Last year I repurposed a 2011 Macbook Pro 15″ as my home media server.  This laptop had been my main machine for a couple years until I upgraded in 2015.  Early in its life, I had used gfxCardStatus to disable the discrete AMD graphics card.  I mainly did this because I did not need the performance, and it definitely affected battery life negatively.  Because of this, I never was aware of the issue that thousands of other MacBook Pro owners experienced, a failing GPU causes the machine to either not work at all, have odd display effects, or reboot when video modes are switched.

About a year after using this machine as my main media server, it started to randomly reboot.  I could not find anything that was causing it, it would just be running fine, and then reboot.  I did notice that if I started up the machine, but did not login to a user account, it would stay running for quite awhile.  After some online research, I soon found out about all the issues that have plagued this machine.  The AMD GPU seemed to be the most likely culprit.  After finally having the machine stay running long enough for me to reinstall gfxCardStatus, I determined that I could immediately crash the system just by switching graphics modes.  Success, I was finally able to confirm that the GPU was failing.

Because I do not have any application that requires the GPU, I realized if I could somehow disable it, I could be back in business.  After extensive searching, I found lots of partial solutions, many required booting with Linux, putting the logic board in an oven, or trying to cut power traces on the motherboard.  After lots of reading, I finally was able to come up with a solution that worked, one that did not require opening up the laptop, or installing Linux.

My machine is a basic system running High Sierra, version 10.13.  I have confirmed that this works, although I did not try with previous versions.  If you have a highly modified system with lots of custom kexts, it may not work.   This modification will force the laptop to not boot into discrete graphics (dGPU) but directly into integrated graphics (iGPU).  While you will now be able to use your system you will lose the ability to use an external display.  Thunderbolt data and video connections should continue to work as normal.   It also assumes that all kexts are still in their default location /System/Library/Extensions, all AMD-kexts remain except one which is required to be moved.

Let’s get started!

Power on your laptop while holding <Cmd>+<r>+<s>, this will get you into Recovery/Single-User mode.  If your machine will not boot up into this mode, you can try putting it into a freezer for 10-15 min beforehand.  If you can keep the machine cool, it should let you boot to a command prompt.

The first step is to disable SIP.  This is done by entering : csrutil disable 

This is a critical step, as the following commands will not run unless you disable the default SIP protection.  You can leave this off permanently, or re-enable after you complete the whole process.  At this point, reboot the laptop by entering : reboot

This time hold down <Cmd>+<s> to boot into single-user mode.  We will then issue commands to disable the AMD GPU on boot by writing specific values into the NVRAM.  

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

Enter : nvram boot-args=”-v”

This will turn on verbose mode when booting up.

One again : reboot

Hold down  <Cmd>+<s>  on boot

Next we will want to move one AMD kext so that it is not loaded on initial boot.  We will just move it, because after the machine boots up and you login, we will want to reload it.  This will keep the GPU disabled, but also will remove power from it so that it keeps your system cooler.

Type the following :

mount root partition writeable
/sbin/mount -uw / 
mkdir -p /System/Library/Extensions-bkup 
mv /System/Library/Extensions/AMDRadeonX3000.kext /System/Library/Extensions-bkup/ 
touch /System/Library/Extensions/ 
mkdir -p /Library/LoginHook
nano /Library/LoginHook/LoadAMD.sh

In nano, add the following text and hit control-X to save

#!/bin/bash
kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
exit 0

You should have a saved file called LoadAMD.sh at this point.  Now type : 

chmod a+x /Library/LoginHook/LoadAMD.sh
defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadAMD.sh 
reboot

This time, let the machine boot up normally

Reboot normally and your machine should work normally, however you will have an accelerated iGPU display.  This process will most likely need to be repeated when you do any system upgrade.  The NVRAM setting should stay, however you most likely will need to move the AMDRadeonX3000.kext file again.  Just make sure that if a new version is used, you save each.  

Hopefully this will allow your machine is provide several more years of service.  Leave me a message if you have any questions, and/or you will successful.


Travel Tag – Old Fashioned License Plate Game for iOS

Default-Portrait2@2x~ipad

Travel Tag is an iOS app of the classic license plate game that everyone played as a kid while driving down the road with your parents on a long trip. Travel Tag makes both short and long trips fun and helps to pass the time. Simply identify all 50 state license plates.

Travel Tag displays a map of your current location, and even provides help by showing you locations where license plates were recently spottted. From the Home screen, you have three options from the lower menu to select a state. You can display all states, those remaining to be found states, and states already found.

After you identify a license plate, Travel Tag will store the time and location, and allow you to view it again in the future.

See how quickly you can find all 50 States!

The original idea for this iOS app was my daughters, she thought it would be fun to use her iPad to play the game and keep track of her progress.  Over a couple weeks we put together the app and decided to make it available for free so that others could play with it as well!

iOS Simulator Screen shot Feb 5, 2014, 4.08.29 PMiOS Simulator Screen shot Feb 5, 2014, 4.11.45 PMiOS Simulator Screen shot Feb 5, 2014, 4.11.41 PM


Mac, a racoon, and no more VPN connection

cisco VPN client for Mac stops working

A configuration error occured when connecting to Cisco VPN with Mac

On too many occasions my new MacBook Pro will no longer connect to my work’s  Cisco IPSec VPN.  The error message displayed is not very helpful, it simply says:

“A configuration error occured. Verify your settings and try reconnecting”

I have been unable to determine a pattern of when this happens, but it seems to occur quite often when bringing the laptop out of sleep.  Although, it does happen at other times as well.  Rebooting has appeared to help, but the whole reason I bought a Mac was because I was sick of having to reboot my PC everyday.

After a little investigation, I determined that there is a process called “racoon” which is responsible for the VPN connection.  – it performs key exchange operations to set up IPSec tunnels. The Apple MAN pages say that racoon speaks the IKE (ISAKMP/Oakley) key management protocol, to establish security associations with other hosts.  If you Kill it (using kill or activity monitor), your VPN will start working again.

You can also do :

~ :? ps -ef | grep racoon
0  5861     1   0   0:00.09 ??         0:00.15 /usr/sbin/racoon
~ :? sudo kill 5861
~ :? ps ax | grep racoon
<wait until it shuts down. sometimes you may need to SIGKILL it (kill -9 <pid>)>
~ :? sudo /usr/sbin/racoon
~ :? ps -ef | grep racoon
0  6786     1   0   0:00.08 ??         0:00.15 /usr/sbin/racoon -x

Some folks have also reported that running multiple copies of racoon can also cause the problem.  In that case, kill all.  The Mac VPN client will auto-restart as needed.

Works on OSX 10.6.5 and 10.6.6