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.


Comments

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

  1. 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. I had a similar problem. This fixed it for me https://askubuntu.com/a/1358766/840187

  4. 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. 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. 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. 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. 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. 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. 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. 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!

  12. hey guys I am planning to migrate to linux as soon as possible (mid 2012 mbp)but will wait for an answer from here, can I have some directions about how to go about it and what distro to go with thanks in advance

    1. wililupy Avatar
      wililupy

      With the MBP 2012 the stock Ubuntu build will somewhat work. I did find that when I tried to do a clean install of Jammy (22.04.3) on my MBP, the WiFi drivers didn’t work, so I had to use a network cable plugged in to the NIC to work, but during installation, I told it to download 3rd Party Drivers and after installation, everything worked out of the box.

      I just bought a new MacBook Pro 2019 16″ model, and have been trying to get that to work and I’ll have an updated blog entry for that once I have it simplified for normal consumption.

      Happy Hacking!

      1. Hi, I’m also considering installing Ubuntu on a mid-2012 Retina MBP, but I’m having second thoughts because I’m unsure if the Nvidia GT650M will cause any issues, and I really want to be able to use it. Have you encountered any errors related to this?

        1. wililupy Avatar
          wililupy

          I have not tried running on a MBP that had anything other than the Intel Graphics card.
          I know that NVIDIA cards can be somewhat finicky during installation, so I would recommend that when you are doing it, boot into Graphic Safe mode and install that way and make sure you say to Use 3rd party drivers during installation. Especially since in the latest build of 22.04.4, they broke the wireless again so you have to install with the Ethernet cable connected to get updates, but when you install 3rd party drivers, it will install the Broadcom Wireless drivers for the HWE kernel and it will work on first boot.

  13. Hi,
    I have MBP 15inch Mid-2012 (MBP10,1).
    I’m installing Ubuntu Desktop 22.04 and I completed the setup successfully.
    When setup completed, installer ask me to reboot.

    After rebooting, I pressed ‘Alt’ key and selected ‘EFI Boot’.
    Then Grub2 appeared and I choosed Ubuntu.
    Ubuntu boot procedure stuck when boot log appeared.
    (I believe this step has gone beyond the ‘grub/shim’ UEFI signature issue where everyone is talking about.)

    First few lines of Ubuntu boot log is saying APIC bug. (According to https://unix.stackexchange.com/questions/317134/firmware-bug-error-message-on-arch-on-apple , this is nothing important)
    Then one red “Fail” appeared on the screen saying “Failed to start System logging service”.

    This is strange.

    1. Everything sounds good from what you were saying, however, why did you boot from media again after the install? After Ubuntu installs, you should have been told to remove the DVD/USB drive (Install Media) and then press enter to reboot and then the system should have came up with no issues. No need to hold down “Alt” (Or OPTION, which is the hot key during boot up to select your boot volume).
      Have you tried to restart in Rescue Mode in Ubuntu and try to see why the logging service is failing to start? When the system boots up, if you press the TAB right after you hear the “Apple Tone” this should put you in the GRUB editor where you can select safe mode where you can then mount the storage volume and look at the /var/logs to see why you are getting the issue.

  14. Gideon Shaw Avatar
    Gideon Shaw

    Alas this did not work for me. I have an empty HDD, no MacOS, and want to just install Ubuntu. The installation seemed to go well, only issue was that it hung at a grey screen for a while on the restart after install completion. However no matter what I did, I could not get it to boot into Ubuntu after that.

    How did you get to that point where you could fix the EFI issue?

    1. Hey. So just to make sure, I have tried this on newer Mac’s and it hasn’t been working as instructed. Even on Mid 2012 22.04 is not working out of the box like it used to and I have to have it connected via Ethernet to update and install correctly. One thing you can try is to boot up off the install media again, but do it in live mode so that you can inspect the installation. There are some tools that can help recover the system and validate that the install went smoothly.
      I also read an interesting article this past weekend that said that Fedora’s latest release actually works really well with M2 Mac’s, which I may try to do this week that I have off. I”ll keep you posted on what I find.

  15. Good post. I am going through many of these issues as well..

  16. This is my first time pay a visit at here and i am in fact
    impressed to read everthing at single place.

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.