Installing Ubuntu 20.04.2 on Macbook Pro Mid 2012

Hello everyone. Been a while and I have a new blog entry so that I don’t forget how to do this if I ever have to do it again.

I got my girlfriend a new Macbook Pro M1 for Hanukkah and she gave me her old one (It’s a Macbook Pro Mid 2012, or 14,1). I was going to update it to Mac OS 11, but found out that it didn’t support it, so I figured I would try to revive life to it by installing Ubuntu on it. This proved to be harder than I expected, but if you keep reading, I’ll tell you how I finally did it. (I’m actually writing this blog from the laptop running Ubuntu.)

So, the installation was pretty straight forward. I burned Ubuntu 20.04.2 on a DVD (From https://releases.ubuntu.com) and booted up the mac by inserting the DVD in the drive and holding down the “Option” key while booting up and I select the first EFI Partition to boot from by pressing the Up arrow after selecting it. It booted right into Ubuntu no problem.

I managed to install Ubuntu, and everything went smoothly. After installation, I noticed a weird error about MOK and EFI. I found out that Mac’s EFI wants a signed OS. To fix this, all I did was:

sudo su -
cd /boot/efi/EFI/ubuntu
cp grubx64.efi shimx64.efi

This will clear the black screen and error when booting.

Next, I ran sudo apt update & sudo apt upgrade -y to make sure I had all the updates to my laptop.

With the 20.04.2 update of Ubuntu, everything works out of the box with the Mid 2012 version of the Mac Book. If you run into any issues during the installation, leave a comment and I will try to help.

Leave a comment if it helps.


Posted

in

, , ,

by

Comments

24 responses to “Installing Ubuntu 20.04.2 on Macbook Pro Mid 2012”

  1. Nirmal Avatar

    Hello Lucas,

    How is the Performance. Is the Fan running hot?. Is the Wifi Drivers are working well?

    I am also thinking PopOS and Lubuntu/Kubuntu on these devices. Any reason you gone with Ubuntu?

    Regards
    Nirmal

    1. wililupy Avatar
      wililupy

      I have been using Ubuntu since Dapper Drake, and really like the distribution. I have actually started using Kubuntu 20.04.2 on this mac and it has been pretty solid. I notice it only gets hot when I have it plugged in, and every once in a while, the wifi will drop, but running sudo dhclient wlp2s0 gets it back up and running normally.
      Everything works out of the box, and updates work as well. Been pretty happy with it as my daily driver on my mac.

    2. wililupy Avatar
      wililupy

      I moved to Kubuntu after a while since I like drag and drop operations. I have noticed that the laptop runs a little warmer than usual, but it doesn’t seem much more than when it ran MacOS. The battery life is much better, which to me means more since I travel a lot and don’t have access to outlet’s or power so I will take that over no power.

  2. Luke Williams Avatar
    Luke Williams

    One thing I have noticed now that I have had Ubuntu running on my Macbook is that the battery life has nearly doubled. While running MacOS X, the battery would only last about an hour, but since moving to Ubuntu 20.04, it now lasts about 3 hours on the battery.

  3. Moose Avatar
    Moose

    Question. So I’m doing basically the same thing. But after the install completes all I get is a grey screen that sits there. Do I need to boot into the mac recovery mode to run the commands you’ve listed?

    Thanks!

    1. wililupy Avatar
      wililupy

      Does the install complete? You should be able to boot into Ubuntu, and then install normally. It does take a while, mainly because of the Broadcom wireless source code build, but even if that doesn’t work, it should still boot. Just no wireless. But and quick “sudo update” fixes those sources and gets you up and running. I’m replying to you on my MacBook Pro 2012 and even when I update to the HWE kernel, it still updates and works. Which Macbook are you trying to run on? I will try to help as best I can.

    2. Niklas Avatar
      Niklas

      I had a similar problem. This fixed it for me https://askubuntu.com/a/1358766/840187

  4. Bruce H McIntosh Avatar

    Running Ubuntu Studio 20.04.2 on a MBP 9 (late 2011). The only thing it won’t do is resume from suspend. ‘s driving me nuts, because other than that one thing it’s an ironclad joy to use.

    1. wililupy Avatar
      wililupy

      That’s awesome and sucks at the same time. Not sure about the resume operation. I would put in a bug on Launchpad about it.

      1. is Avatar
        is

        to get the laptop to sleep, add the following line in grub

        GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash init_on_alloc=0″

  5. Mona Maier Avatar
    Mona Maier

    Hello Lucas,
    I want to do the same thing. Unfortunately my late 2010 Macbook keeps hanging on boot – freezing there. There is no EFI/ubuntu directory / only a /boot/grub directory = that is why your approach doesn’t work. Any ideas on how to fix that?
    Best Regards
    Mona

    1. wililupy Avatar
      wililupy

      I haven’t tried this procedure on older Mac’s. However, you should still be able to boot into a legacy BIOS mode by holding down Option with the boot device connected and at least get into Ubuntu. Do you have any error messages or a way to see what the boot screen is displaying?

  6. Nikolaos Avatar

    Just came across this article. Thanks for the info. About to install Ubuntu Server 20.04 LTS on several Mac Mini Late-2012 systems.

    One concern I have is that if the power shuts off and restarts OR if it simply reboots will it automatically launch into Linux OR will I have to do anything to get it to boot into Linux again. I want to use it as a server so definitely want it to be able to boot right into Linux just not sure about this Mac EFI and whether it will be a challenge or not.

    Lastly, any thoughts/concerns on installing on Mac Mini Late-2012’s?

    1. wililupy Avatar
      wililupy

      I haven’t tried installing on Mac Mini, but with Macbook Pro, after installation I had no issues, especially with the latest 20.04.3 release. If you hit something odd, let me know.

  7. Harold Avatar
    Harold

    Hello! I think I have the exact same MBP: 2012 13″ Retina. I recently installed 20.04 LTS and as you mention, works flawlessly out of the box, but I find some issues with Bluetooth: it says it’s on and it “sees” some of my devices, they appear listed. I can pair with my Bluetooth keyboard and it works, I can type; but when trying to pair with earphones, it says it’s paired, but the audio is chopped, as in it sounds and then goes mute, intermitent.

    Anyways, did you have to install additional bluetooth drivers? Does yours work with sound devices?

    1. wililupy Avatar
      wililupy

      Hi Harold,

      Sorry, I haven’t ran into this issue. I know that I ran into something similar a while back on an IBM Thinkpad running Ubuntu, and I ended up updating to the HWE kernel and that seemed to fix it. I haven’t tired headphones on my current build.

  8. Robin Avatar
    Robin

    Hi,
    I tried the same thing (Ubuntu 20, MB Pro 2012) , but it after booting it says “Missing OS”…
    How can I fix that issue on the macbook?

    1. wililupy Avatar
      wililupy

      Sounds like you didn’t write the MBR with GRUB. I haven’t tried to dual boot MacOS with Ubuntu. Since the mac can’t use the latest version, I just went “All in” with Ubuntu on it.

  9. EgonX Avatar
    EgonX

    Just did an install on my 10,1 Mid 2012 MacBook Pro Retina. It’s installed and running. I can ALT+F2 to get to a console, but the “Desktop” isn’t starting up. Just hanging at a cursor. I did apt update/upgrade at the terminal and rebooted, but still no desktop… Not sure what the problem is. The installer off the USB stick worked fine.

    1. wililupy Avatar
      wililupy

      With 22.04, I had no issues, however, I’m using an older Mid-2012 Macbook pro. I recently upgraded and tried to do a clean install and it worked with no issues. When you look at the syslog or dmesg, what drivers are saying are missing? Have you tried KDE? I actually found that Kubuntu (Ubuntu with KDE backend) works much better than straight Ubuntu.

  10. Jesse Avatar
    Jesse

    I just did an install of Ubuntu on my girlfriends Mid-2012 MacBook Pro 13″. The original EFI was corrupt, so I had to delete that partition and then the install went smoothly. But now I’m finding I’m unable to access the internet. If I use an ethernet cable, it will say “Server Not Found” and I’ll get a connection error in the network section of Ubuntu’s settings. And if I try to use Wi-Fi, it tells me I don’t have a Wi-Fi adapter (which I know isn’t true; it works fine when I started it up in MacOS Recovery Mode). Any thoughts?

    1. wililupy Avatar
      wililupy

      I haven’t seen this error before. What version of Ubuntu are you installing? I found that the latest 22.04.3 LTS with the 6.2 kernel a lot of features work now much better than before in the 5.15 kernel.

  11. Michael Brady Avatar
    Michael Brady

    Does the light on the keyboard work with these Linux OS s?

    1. wililupy Avatar
      wililupy

      Yes. Everything works with the 22.04.3 release.
      I did try to install on a newer 2019 Macbook pro but that didn’t work, so I’m looking at what needs to be done to get that one working. Stay Tuned!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.