Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

xanderx007

macrumors 6502
Original poster
Nov 7, 2017
262
140
I was able to revive my old 2011 MBP a year ago using the GRUB solution, and it has been working fine until I started having battery issues which prompted an SMC and NVRAM reset. When the NVRAM reset failed, I could no longer boot into my Rescue disk, and no mount of effort on my part in trying to restore it worked. Based on the diagnostics I've done via Single User and Single User Recover mode, the boot partition got severely corrupted. Safe Mode and Recovery mode no longer works.

I Booted it Target Disk mode and networked it to my (newer but not really new) 2015 MBP via Thunderbolt. I tried fixing it with Disk Utility, and although the startup disk still mounts, and I can access the files, DU can't fix the darned thing.

Since I have backed everything up, and I didn't really want to spend more time on it just to fail installing OS X (I have downloaded El Capitan), I gave up trying to install OS X and opted to reformat the thing and just install Ubuntu, since I was basically just using it for web browsing and watching movies.

I chose Ubuntu since that's what my school administrator has been using and installing in our old machines. Being that were both kind of newbies when it comes to Ubuntu, or Linux for that matter, we just did a bit of research online, with him a few weeks ahead of me in advance.

I have to state the fact that I don't really like coding even though did do a little programming back then. I do understand a bit, and it's really a bit, and as such I wanted to avoid even a little coding as much as possible.

But, it was inevitable. I've made an Ubuntu boot disk using the latest version (18.04.2 LTS), read up on installing it, and proceeded to do so, fully aware that the AMD GPU is still very much an issue.

After scouring the Ubuntu Forums and other sources, I've managed to test several options in disabling the accursed dedicated Graphics card. There isn't one method that works right away, and each and every one I tested will work partially, or fail right away.

The first time around, I booted the Mac via USB, pressed 'e' as soon as the grub menu comes up, and used the [nomodeset] function, which is added after [quiet splash] kernel entry.

Code:
set timeout=5
menuentry "Try Ubuntu without installing" {
   set gfxpayload=keep
   linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash nomodeset ---
   initrd   /casper/initrd
}

I pressed F10 to continue booting. This gave me a graphical interface, though the screen color is distorted and I have green lines everywhere, and I proceeded to install Ubuntu the easiest way possible, letting the installer decide and not worrying about partitioning the disk. After installing Ubuntu successfuly, I rebooted into the USB drive again, but this time, I deactivated the AMD GPU by editing the grub again, but, instead of adding just [nomodeset] in the kernel line, I added these lines:

Code:
set timeout=5
menuentry "Try Ubuntu without installing" {
   set gfxpayload=keep
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0
   linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0 ---
   initrd   /casper/initrd
}

Now, these lines looked familiar because the outb commands are used in the grub solution (deactivates the Radeon GPU), while the i915.lvds entry is in the EFI solution (activates the Intel GPU, but I could be wrong as to what this command line does). This is the same change I've made later on.

When GUI comes up, I open the Files app> Other Locations >Computer> Boot> Grub, which gave me access to the grub.cfg file. I then opened a Terminal and typed:

Code:
sudo chmod 777

then dragged the grub.cfg file into the open Terminal window.

Screenshot from 2019-05-21 20-15-11.png


This changes the permissions of the grub.cfg file to read/write.

I then opened the grub file in text editor, and looked for the [menuentry 'ubuntu'] line. This is the topmost entry in the grub menu of the installed Ubuntu. Underneath this is the same [load_video] entry.

Screenshot from 2019-05-21 20-24-48b.png


Take note, the file in this case is already 'Read-Only' as I have already tested rebooting to see if it works. To change the permission back to 'Read-Ony' I entered

Code:
sudo chmod 444

In the Terminal window and dragged the grub.cfg grub file and got this:

Screenshot from 2019-05-21 20-28-16.png


And that's it. My MBP now boots directly into Ubuntu. The screen does turn white (defaault Mac startup), then green (the AMD GPU activating), then black (the AMD GPU turning off). I've actually composed this thread using the same MBP with Ubuntu.

Now, I figured out which solution to use by process of elimination, from the EFI solution and GRUB solution here in MacRumors (to which I've contibuted a few comments), to a solution I found using the [sudo nano] command in Ubuntu Forums, which didn't really work in my case since it's low-level editing and too convoluted for me, aside from the fact that the solution is for dual booting OS X and Ubuntu.

I got inspired somewhat while our school adminstrator and I were talking, and I was searching for said Ubuntu Forums solution because he wanted to look at it. While I was exploring the files looking for the HD Ubuntu install Grub, he was the one who gave me the idea to change the properties while booted into USB (by that time, I've already booted via grub, edited the grub entry, and deactivated the dGPU), since it was the file I was going to edit anyway, and gave the [chmod 777] and [chmod 444] solution.

I checked the active GPU with

Code:
lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA

Screenshot from 2019-05-21 21-08-42.png


Ain't she a thing of Beauty?
Screenshot from 2019-05-21 20-48-02.png
 

Attachments

  • Screenshot from 2019-05-21 20-24-48.png
    Screenshot from 2019-05-21 20-24-48.png
    133.5 KB · Views: 597
Last edited:
  • Like
Reactions: No. 44

dollystereo

macrumors 6502a
Oct 6, 2004
907
114
France
does the dead Radeon drains your battery?
I am wondering to switch (I am already a Ubuntu user at work).
How did you transfer your files from the MacOS formatted drives?
 

xanderx007

macrumors 6502
Original poster
Nov 7, 2017
262
140
does the dead Radeon drains your battery?
I am wondering to switch (I am already a Ubuntu user at work).
How did you transfer your files from the MacOS formatted drives?

My MBP's battery is already busted, so I don't really know if the power drain is significant. Thing is, I am able to leave it unplugged for a little while it's on, and doesn't shut down by itself when it's hibernating or on sleep mode with the lid on, unlike when it was on Mac OS X.

One thing to note; it doesn't get too hot, and the fans don't go bat **** crazy when I put the lid down, which . Whereas when it was on the grub fix, it takes a while before the [lid down] indicator light starts flashing. With the Ubuntu, it immediately goes into hibernation.

I have an extra 2GB internal HD, and Ubuntu sees it as a networked disk, so I have to sort of mount it in the file explorer. I guess, so as long as it's FAT32 or has an EFI partition, Ubuntu will see it. I'll be removing that extra HD and make it into an external back up disk.

I didn't transfer any of my files into it, since I'll be basically using it as a browser.
 

dollystereo

macrumors 6502a
Oct 6, 2004
907
114
France
I am unable to change permission on the grub.cfg file
Code:
changing ownership of 'grub.cfg': Read-only file system
[CODE]
 

xanderx007

macrumors 6502
Original poster
Nov 7, 2017
262
140
I am unable to change permission on the grub.cfg file
Code:
changing ownership of 'grub.cfg': Read-only file system
[CODE]

You have to boot from the USB to be able to modify the permissions and edit the installed grub.
 

dollystereo

macrumors 6502a
Oct 6, 2004
907
114
France
I finally modified the grub of my linux macbook pro. Now with lspci I only see the intel graphics, but I do think that the Radeon is still powered on, because the computer get's hot and drains battery fast.
I was hoping that going full linux would solve this, as some have reported, the machine with linux runs cooler, and battery last longer.
 

xanderx007

macrumors 6502
Original poster
Nov 7, 2017
262
140
I finally modified the grub of my linux macbook pro. Now with lspci I only see the intel graphics, but I do think that the Radeon is still powered on, because the computer get's hot and drains battery fast.
I was hoping that going full linux would solve this, as some have reported, the machine with linux runs cooler, and battery last longer.

In my case, it doesn't really get that hot.
 

ryanjgillies

macrumors newbie
Dec 29, 2019
1
0
Sorry to drag up an old post, but this is the most concise, up to date guide I've seen of this problem and solution.

I had already done this on my Macbook Pro earlier this year and it was working great - I use it as a music player in my bar. I was away for a week and came back to find the screen scrambled again, I'm guessing maybe an update occurred whilst I was gone.

I've double checked and my grub matches the above, with the addition of nomodeset and radeon.modeset=0 present after quiet splash - I've tried it with and without these arguments but get the same garbled result you would expect from the dodgy gpu.

I then checked the active gpu with
Code:
lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
and surprisingly found that both the intel and amd gpu's are active.

Can anyone suggest why the gpu has reactivated and what I can do about it?
 

Draeconis

macrumors 6502a
May 6, 2008
986
280
just performed the same install, following this guide here

runs great, just learning all the differences now between ubuntu and macOS!
 

boatwrong

macrumors newbie
Jan 17, 2023
4
1
Just did this with kubuntu 22.10 and worked great.

One interesting thing happened. After the initial fix I installed a tiling window manager, kde bismuth, and after rebooting the gpu issue resurfaced. Followed the same steps as above and the issue was resolved again without issue.

Thanks for the excellent guide!
 

boatwrong

macrumors newbie
Jan 17, 2023
4
1
Sorry to drag up an old post, but this is the most concise, up to date guide I've seen of this problem and solution.

I had already done this on my Macbook Pro earlier this year and it was working great - I use it as a music player in my bar. I was away for a week and came back to find the screen scrambled again, I'm guessing maybe an update occurred whilst I was gone.

I've double checked and my grub matches the above, with the addition of nomodeset and radeon.modeset=0 present after quiet splash - I've tried it with and without these arguments but get the same garbled result you would expect from the dodgy gpu.

I then checked the active gpu with
Code:
lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
and surprisingly found that both the intel and amd gpu's are active.

Can anyone suggest why the gpu has reactivated and what I can do about it?

I encountered this issue of the gpu error resurfacing after continued usage but this happened with a reboot, something I've done a number of times since the original fix without issue.

However I was able to follow the guide again and get the machine working again from the live usb and without reinstalling the os.

To note: Something interesting occurred and caused the above guide to not work. When selecting the 'Other Locations' in the file explorer application, I selected the hard drive instead of 'Computer' and followed the path to the grub.cfg file. Doing this did not fix the issue but going back through the guide and taking care to select the 'Computer' location did. See the highlighted in red portion for the location I followed that did work.

I suspect that this has something to with how the partitions on the machine are set up but that is way above my head.
 

Attachments

  • Screen Shot 2023-02-09 at 9.37.27 PM.png
    Screen Shot 2023-02-09 at 9.37.27 PM.png
    1.1 MB · Views: 93
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.