In this short article I will explain how to install the latest Ubuntu 15.04 on a Macbook Pro model 11,2 alongside MacOS X. I will use Ubuntu Gnome, but the process should be exactly the same for the other flavours. Contrary to what you may think, it is a smooth process and almost everything works out of the box. However, a few things still need to be configured or fixed manually. By following this guide you should end up with a functional Ubuntu installation.

# Preliminary steps

If you do not know what is the version number of your Macbook, you can find out following the steps described here. This guide has been elaborated for the model 11,2, although some steps might be applicable to other models.

Before installing Ubuntu you will need to free up some disk space. You can easily do that by using Disk Utility on MacOS: select the hard disk, go to Partitions tab, add a new partition (+), drag to change the split and select it to be left as Free space. I found out that in order to resize the partition, FileVault (i.e. disk encryption) has to be turned off. In my case I allocated ~60GB, enough for my purposes.

After disk is resized, prepare a USB stick with Ubuntu as detailed here.

# Installation

First of all plug your USB stick, reboot, hold the Alt key and select the EFI Boot option. After less than a minute Ubuntu will be ready.

Before proceeding with the installation I recommend you to enable the wireless driver so that you will be able to download the latest updates during the installation as well as download some extra stuff needed later. You can do that by enabling the BCM4360 driver in Software & Updates > Additional Drivers.

The next step is to open the installer. When asked for which installation type you want, select the option Something else and create something like this on your free space:

• swap partition (min. $\left\lceil\sqrt{\text{RAM}}\right\rceil$, max. $1.5 \cdot \text{RAM}$ - see this)
• root partition (ext4, mount point /)

In my case I selected the minimum swap possible (4GB) as my Macbook SSD is only 256GB. Before continuing, select to install bootloader to the EFI partition (/dev/sda1).

Once the installation is finished and before rebooting, I recommend you to download the necessary wireless driver packages (given in the next section), mount the partition where you have just installed Ubuntu and copy them there. This is because you will not be able to enable the wireless Additional driver like you have done during the installation!

# Post-installation steps

## Wireless

In order to get wireless card working, you will need to install bcmwl-kernel-source. It can be downloaded here. If you plan to do an offline installation, download dkms, too. You can then easily install them:

Grub will be the default bootloader after the install. You can still boot into MacOS by holding the Alt key. However, it is better to have a MacOS entry in Grub and, if you want, default it to MacOS (my case). Moreover, you will notice that the Grub font is too small and, last but not least important, you will need to pass a parameter to Linux in order to prevent occasional SSD freezes (see this). So these are the steps to configure Grub:

• Generate a new Grub font suitable for retina displays:
• Open /etc/grub.d/40_custom and append the MacOS entry (MacOS will be the second entry in the EFI boot order, so exiting Grub will just boot it):
• Change these options in /etc/default/grub:
• Update grub:

## Firefox

Many applications are still not adapted to retina displays. Firefox is one of them, but fortunately it can be fixed. Open a new tab, go to about:config and set the variable layout.css.devPixelsPerPx to 2.0. Although it does a pretty good job, the toolbar icons look blurry and some UI controls do not scale properly.

## High CPU usage by kworker

The most important issue I have found so far is the high CPU usage by kworker (i.e. Linux Kernel worker thread), which seriously affects the battery life. Apparently this is caused by an interrupt storm on ACPI interrupt GPE06, as described here. You can verify it by checking if interrupt GPE06 contains a high value:

A quick solution for this issue is to disable this interrupt, i.e.

In order to disable it on every boot, you can add the previous line to /etc/rc.local, just before exit 0.

# Others

• At the time of writing, there is no driver for the webcam present in the Macbook Pro 11,2.
• I have tried other suggested trackpad configurations, but none of them worked better than the default one (which works quite well).
• Suspend/Resume works fine for me, although a few times the laptop does not enter sleep when I close the lid (need to do a few times…).