Installing Ubuntu 14.10 - Utopic Unicorn on a Macbook Pro 11-1 (2014)
This page is about installing Ubuntu 14.10 - Utopic Unicorn on a MacBookPro 11,1 (2014), a 13-inch Mac laptop released in 2014, which has a retina display, solid-state drive, and is based on Haswell Intel CPU and Intel integrated graphics.
Significant parts of this guide are derived from the previous installation guide.
This guide only contains parts that are relevant for Ubuntu 14.10.
Preparation
Creating a bootable USB-Stick
Prepare an USB-Stick with a livecd desktop version of Ubuntu 14.10, detailed instructions are available here Create a usb stick on mac osx
This guide assumes that you want to keep an OS X partition. Therefore we start with resizing the existing OS X partition using diskutil. You may have to boot into recovery mode (Press Cmd+R during start of the boot process) in order to make it work. Resize your OS X partition so that at least 20 GB of free space or more remain, depending on your needs.
Booting Ubuntu from the USB-Stick
Insert the USB-Stick, reboot your Mac and immediately press the alt key to bring up the bootdisk selection. Choose the USB-Stick. Once the live version is up and running you may want to adjust the display settings and configure an appropriate scaling setting to make everything more readable on the retina display.
System Settings --> Display --> Scale for menu and title bars: 1.75
You may also want to enable natural scrolling as the default behaviour feels wrong when you're used to OS X.
System Settings --> Mouse & Touchpad --> scrolling
Now launch a terminal and install the wifi drivers
sudo apt-get install bcmwl-kernel-source
Next connect to your wifi so we are able to download the latest updates during the installation.
1. Installation
Now start the graphical installation.
Choose a partition layout that suits your needs. If you don't know what you're doing, go for 1 ext4 partition with mount point / and 1 partition as linux swap, roughly 1.5x the size of your RAM. Be careful to not erase the whole drive if you want to keep your existing OS X installation.
Once the installation is finished DO NOT REBOOT, yet. (If you did, boot from the USB-Stick again and proceed as below)
1.1. Setting up efibootmgr
We will be using efibootmgr here as it is extremly lightweight and doesn't break your OS X installation. System updates on the OS X side are working with this setup as of Jan 2015.
Open the terminal again to configure efibootmgr:
sudo apt-get install efibootmgr sudo efibootmgr
Displays your current setup which should point to your mac partition (BootOrder 0080) which we want to change so that grub is launched by default
sudo efibootmgr -o 0000,0080
Make sure that BootOrder is now BootOrder 0000,0080 otherwise you'll not be able to boot OS X from grub (Note: You can still boot to OS X by holding down the alt key during the very beginning of the startup and then select the EFI partition)
Now reboot your machine into the newly installed 14.10
2. Configuration
2.1 Display optimization
As already done with the livecd, adjust the scaling setting to your needs. Be careful with changing font-sizes etc. it can easily mess up your system. If scaling only is good enough for you this is likely the most efficient way.
System Settings --> Display --> Scale for menu and title bars: 1.75
2.2 Grub tuning
By default grub is in hidden mode which we are going to change
sudo nano /etc/default/grub
Comment out every line that starts with GRUB HIDDEN
#GRUB_HIDDEN_TIMEOUT=0 #GRUB_HIDDEN_TIMEOUT_QUIET=true
and change GRUB_CMDLINE_LINUX="" to
GRUB_CMDLINE_LINUX="libata.force=noncq"
This seems to prevent occasional freezes caused by the SSD. Change anything else you'd like to have different and save. Then update grub.
sudo update-grub
2.2.1 Fixing small grub fonts
On the command line execute the following:
sudo grub-mkfont -s 36 -o /boot/grub/DejaVuSansMono.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
Open and edit again /etc/default/grub and add the following line at the bottom:
GRUB_FONT=/boot/grub/DejaVuSansMono.pf2
Update grub again and after the next boot you have a nice readable grub startup screen.
2.3 Setting up Internet connectivity
As we again do not have internet connectivity we need to install the bcmwl sources again. While it may be possible to copy them from the USB-Stick after the installation I find it much more convenient to quickly connect my mobile via Bluetooth and download the drivers. The Bluetooth connection can be conveniently set up via the icon in the menu bar.
sudo apt-get update sudo apt-get install bcmwl-kernel-source
Disconnect the Bluetooth internet connection and connect your wifi at this time.
2.4 System upgrade
Time for a system upgrade
sudo apt-get dist-upgrade
2.5 Setting up Power Management
For better battery life and power management we're going to install powertop and TLP.
Install powertop
sudo apt-get install powertop sudo powertop --calibrate
Make sure powertop with --auto-tune is executed during startup
sudo nano /etc/rc.local powertop --auto-tune
Install tlp
sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp sudo tlp start
2.6 Fixing the touchpad
To fix the standard touchpad behaviour which is just unusable we switch to the mtrack drivers and remove the synaptic drivers as described here.
gsettings set org.gnome.settings-daemon.plugins.mouse active false sudo apt-get install xserver-xorg-input-mtrack sudo apt-get autoremove xserver-xorg-input-synaptics sudo rm /usr/share/X11/xorg.conf.d/50-synaptics.conf
Then edit 50-mtrack.conf
sudo nano /usr/share/X11/xorg.conf.d/50-mtrack.conf
The most important and time consuming part is to figure out a configuration that works for you. The below configuration should be quite close to OS X behaviour depending on how you've used the touchpad. This configuration has tapping enabled and configured.
Section "InputClass" MatchIsTouchpad "on" Identifier "Touchpads" Driver "mtrack" Option "IgnoreThumb" "true" Option "ThumbSize" "50" Option "IgnorePalm" "true" Option "DisableOnPalm" "false" Option "BottomEdge" "30" Option "TapDragEnable" "true" Option "Sensitivity" "0.6" Option "FingerHigh" "3" Option "FingerLow" "2" Option "ButtonEnable" "true" Option "ButtonIntegrated" "true" Option "ButtonTouchExpire" "750" Option "ClickFinger1" "1" Option "ClickFinger2" "3" Option "TapButton1" "1" Option "TapButton2" "3" Option "TapButton3" "2" Option "TapButton4" "0" Option "TapDragWait" "100" Option "ScrollLeftButton" "7" Option "ScrollRightButton" "6" Option "ScrollDistance" "100" EndSection
Documentation of the settings and values can be found in the readme of xf86-input-mtrack on github
Natural scrolling can be enabled with:
echo "pointer = 1 2 3 5 4 6 7 8 9 10 11 12" > ~/.Xmodmap
Now restart lightdm to test the new configuration
sudo restart lightdm
That should leave you with pretty basic, working installation of Ubuntu from which on you can continue according to your preferences.
Remaining issues and optimization potential
- Battery Life and power management tuning
- Automatic background light / brightness management
- SPDIF port red light (old methods to turn it off seem not work) - It looks weird when the red light remains on
- Camera - Not tested
Useful links and resources
Sources and resources
13.10 / 14.04 Guides - Previous Ubuntu installation guides
Macbook trackpad in Ubuntu - Improving touchpad behaviour with mtrack
xf86-input-mtrack - Alternative, better touchpad driver solutions