Installing Ubuntu on 2011 MBP with failed AMD GPU

Discussion in 'Windows, Linux & Others on the Mac' started by xanderx007, May 21, 2019.

Thread Status:
The first post in this thread is a WikiPost, and can be edited by anyone with the appropriate permissions.
  1. xanderx007, May 21, 2019
    Last edited by xanderx007: May 21, 2019

    xanderx007 macrumors regular

    xanderx007

    Joined:
    Nov 7, 2017
    #1
    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
     

    Attached Files:

  2. dollystereo macrumors 6502a

    dollystereo

    Joined:
    Oct 6, 2004
    Location:
    France
    #2
    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?
     
  3. xanderx007 thread starter macrumors regular

    xanderx007

    Joined:
    Nov 7, 2017
    #3
    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.
     
  4. dollystereo macrumors 6502a

    dollystereo

    Joined:
    Oct 6, 2004
    Location:
    France
    #4
    I am unable to change permission on the grub.cfg file
    Code:
    changing ownership of 'grub.cfg': Read-only file system
    [CODE]
     
  5. xanderx007 thread starter macrumors regular

    xanderx007

    Joined:
    Nov 7, 2017
    #5
    You have to boot from the USB to be able to modify the permissions and edit the installed grub.
     
  6. dollystereo macrumors 6502a

    dollystereo

    Joined:
    Oct 6, 2004
    Location:
    France
    #6
    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.
     
  7. xanderx007 thread starter macrumors regular

    xanderx007

    Joined:
    Nov 7, 2017
    #7
    In my case, it doesn't really get that hot.
     
Thread Status:
The first post in this thread is a WikiPost, and can be edited by anyone with the appropriate permissions.

Share This Page

6 May 21, 2019