I do respect your opinion and normally I'd agree with much of what you've said. However my opinion (and I stress it is only my opinion) is based on the fact that:
A) Apple admitted it shipped substandard equipment. - We know this because they set up the replacement program for machines well out of warranty. Kudos to them for doing this, that was the right thing to do.
B) I don't believe it's conceivable that Apple did not discuss this workaround fix at some point. They will have made a conscious decision not to make the information easily available. I'll leave you to draw your own conclusions as to why they decided to do that but I decided they just wanted people to go out and buy another MacBook Pro ($$$$$$). I (personally) do not thing that was the right thing to do, its not a decision I would have made anyway.
Another thing to consider is that it would not have taken an Apple engineer very long at all to create an update to do all this in an automated way. Apple devices are often bought by people with limited technical knowledge. This fix will beyond the ability of many people. How MacBook Pro's have gone in the trash when they didn't have to?
I think it comes down to the difference between what you "have" to do and what you "should" do. When dealing with my clients/customers I always err towards what I "should" do. I don't believe Apple has done that with this issue.
Vc
[doublepost=1514106959][/doublepost]Hi all,
Thought I'd post the process I needed to follow to make this fix permanent on our 2011 MacBook Pro running El Capitan. The EFI var fix temporarily worked but would not survive a reboot. What I missed was the initial bit where AppleMacFinder moved the AMD Kext files and forced the rebuild of the driver cache. I've now rebooted our laptop 10+ times and the fix has stuck.
There is no new content in this post. All the really technical bits have been posted here by others, so props go to them. I've just pulled it together in to a process that worked for me in the hope it will help others. My notes prefixed with "Vc Note".
A) Boot off Arch Linux CD and set EFI variable to disable discreet AMD chip and get a clear display to work with:
===
=== 100% WORKING SOLUTION
===
=== Force your MBP to ALWAYS use Intel integrated GPU (EFI variable fix)
===
=== to make it great again !
===
1) Create the Arch Linux LiveCD/LiveUSB :
You need a working computer for that and a spare CD/DVD/USB drive. Download the latest Arch Linux ISO image from this page -
https://www.archlinux.org/download/ , at the time of writing it is
archlinux-2017.03.01-dual.iso. Then you could either simply burn this ISO to CD/DVD
(which later could be either inserted to MBP's SuperDrive or External DVD Drive connected to MBP by two USB cables) or create a bootable USB: use the great detailed instructions from this page,
https://wiki.archlinux.org/index.php/USB_flash_installation_media
2) Boot to it: insert this CD/DVD/USB to Macbook Pro, hold
Option key while booting, choose "EFI boot"
(that is your bootable installation media), press "
e" key to edit the GRUB options of the
Arch Linux archiso x86_64 UEFI CD menu entry while it is selected at the main screen, add
nomodeset to the end of this line and press
Enter. If everything is done correctly, you will find yourself at the Linux console!
3) Edit EFI vars: looks like
efivarfs filesystem is mounted by default! So you can already
cd /sys/firmware/efi/efivars and
ls to explore this directory and see if there is a
"gpu-power-prefs-..." variable
(where ... is UUID of this variable). If there is such a variable, its better to remove it with
rm. In my case the
efivarfshas been mounted by default with read/write permissions, but if you are getting the
"operation not permitted"message while attempting to
rm, it means that in your case
efivarfs has been mounted as read-only and you need to remount it with read-write permissions and try again
(credits to totoe_84 for this valuable addition) :
*) cd /
*) umount /sys/firmware/efi/efivars/
*) mount -t efivarfs rw /sys/firmware/efi/efivars/
*) cd /sys/firmware/efi/efivars/
Vc Note: I had to do the above umount & mount every time I ran through this process.
If your screen is so distorted that it is difficult to see the letters, just start typing the
rm gpu-power-pre and then press
TAB key for autocompletion. In my case there were not such a EFI variable, only
"gpu-active-..." and maybe somehow related
"gfx-saved-config-restore-status-..." . Then I looked again at that
gpu-switch text file (mentioned above,
https://github.com/0xbb/gpu-switch/blob/master/gpu-switch),
and entered
THESE COMMANDS:
*) chattr -i "/sys/firmware/efi/efivars/"
<----- skip this command (Vc NOTE: if this isn't the first time you've been through this process (it took me a few goes to get this working), you will probably have to run this command on the /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
file so you can delete it and recreate it with the printf command in the next step)
Actually a gpu-switch script had "${sysfs_efi_vars}/${efi_gpu}" but I didnt have a "gpu-power-prefs-..." variable - so, partially by mistake, I didn't add that efi_gpu suffix and entered this incomplete path accidentally
*) printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
Did not have a EFI "gpu-power-prefs-" variable so I thought that it will be OK to create a new one with a random UUID - in this case, taken directly from a gpu-switch script
*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
http://www.tecmint.com/chattr-command-examples/ -
chattr (Change Attribute) is a command line Linux utility that is used to set/unset certain attributes to a file in Linux system to secure accidental deletion or modification of important files and folders, even though you are logged in as a root user.
...
Syntax of chattr ---> chattr [operator] [flags] [filename]
...
A file is set with ‘
i‘ attribute
(+i as you see in this command) ---> cannot be modified (immutable). Means no renaming, no symbolic link creation, no execution, no writable, only superuser can unset the attribute.
...
Operator
- + : Adds the attribute to the existing attribute of the files.
- – : Removes the attribute to the existing attribute of the files.
- = : Keep the existing attributes that the files have.
This chattr command is supposed to lock a file to make it accessible only by "superuser" - and so that, while booting, your EFI will have no chance to screw up your
gpu-power-prefs-... variable under any circumstances
*) cd /
Could not unmount efivars if you are inside this directory, so change to the root directory
*) umount /sys/firmware/efi/efivars/
Guarantees that your EFI variables are flushed to efivarfs filesystem, please unmount it safely before rebooting)
*) reboot (
Vc Note: get ready to do the next bit straight away)
B) Boot to recovery prompt (cmd+R) and turn off System Integrity Protection. I found I couldn't move the Kext files without doing this.
C) Boot to OSX, open terminal and carry out the following (no need to do steps 1 & 2 and 8 & 9). It’s possible you’ll need to delete the contents of the AMD_Kexts folder first if this isn't the first time this has been done on the machine.
1) fsck -fy
(to check a disk)
2) mount -uw /
(mount a root filesystem with read/write permissions)
3) sudo mkdir /AMD_Kexts/
(make a directory to store the AMD drivers in case you'll need them in future)
4) sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/
(move the AMD drivers)
5) sudo rm -rf /System/Library/Caches/com.apple.kext.caches/
(remove the AMD drivers cache)
6) sudo mkdir /System/Library/Caches/com.apple.kext.caches/
(just in case OS X will be dumb and will not recreate this directory, I am creating it for OS X)
7) sudo touch /System/Library/Extensions/
(to update the timestamps so that new driver caches - without AMD drivers - will be definitely rebuilt)
8) sudo umount /
(umount a partition to guarantee that your changes are flushed to it)
9) sudo reboot
D) Reboot and repeat step A.
E) Boot to recovery prompt (cmd+R) and turn on System Integrity Protection.
F) Boot in to OSX and disable automatic updates.
Vc NOTE: By disabling automatic updates you obviously won't receive Apple's security updates which will leave your machine vulnerable to exploits. It may be possible to accept updates and simply repeat the process above to get your MBP working again, however it is not something I've tested, and I was concerned that if the AMD problem got worse over time on my machine I may not be able to read the screen and apply this workaround. I consider the risk of switching off updates to be the price I've had to pay to get the machine working again and not have to buy a new laptop.