The MacBookAir4,2 works well with Ubuntu 12.04 Precise Pangolin. Earlier versions of Ubuntu work less well and need significant, expert setup. At present, configuring an Ubuntu installation on the MacBookAir is likely to prove difficult for someone with no prior experience of using Linux. Novices users might be better to use VirtualBox to install Ubuntu in a virtual machine.

For further discusion and to seek help, see Ubuntu MacBookAir 4 thread in the Ubuntu Forums.

MacBookAir 4,2 and Ubuntu 12.04

This page aims to describe the steps needed to fully enable all features of the 13 inch 4th Generation MacBookAir (release date: July 2011) when using Ubuntu 12.04 (Precise Pangolin). The same instructions also work with the 11 inch 4th Generation MacBookAir (release date: July 2011). If you have a different model, please go here and find the right wiki.

If for some reason you want to install Ubuntu 11.10 (Oneiric Ocelot), see the previous version of this page for details. Ubuntu 12.04 LTS needs much less configuration than 11.10 as many issues have already been solved, so it's recommended to install 12.04 LTS rather than 11.10.

Overview

Anything not mentioned here should work out of the box. If not, please refer to the Ubuntu Apple Users forum.

Feature

Support status

LCD Panel

IconsPage/ok.png

Suspend, Hibernate, Shut-down and Reboot

IconsPage/ok.png

Keyboard functions (Brightness,volume,...)

IconsPage/ok.png

Keyboard backlight

IconsPage/ok.png

Touchpad

IconsPage/ok.png

Wireless

IconsPage/ok.png

Bluetooth

IconsPage/ok.png

iSight

IconsPage/ok.png

Sound

IconsPage/ok.png

Microphone

IconsPage/ok.png

External Monitor

IconsPage/ok.png

Thunderbolt

IconsPage/dont.png

SD card slot

IconsPage/ok.png

Fan Control

IconsPage/ok.png

HFS+ (OS X disc partition)

IconsPage/ok.png

Sensors (temps & fans)

IconsPage/ok.png

GPU Power Save

IconsPage/ok.png

IconsPage/ok.png (works out-of-the-box) IconsPage/ok.png IconsPage/info.png (works, with remarks) IconsPage/warning.png (needs manual install) IconsPage/dont.png (won't currently work (completely)) IconsPage/question.png (not yet documented)

Basic Installation Instructions

General instructions for installing and maintaining Ubuntu on Intel-based Macs are found in the Intel CPU-based Macintosh Generic Installation Instructions. Note that a few differences exist for this particular model:

cd [path to script]
chmod a+x setup_mac_usb_boot.sh
sudo ./setup_mac_usb_boot.sh

cd [path to folder containing script]
chmod a+x post-install-precise.sh
./post-install-precise.sh

The script will update some configuration settings recommended to allow the MacBookAir4,2 to function fully under Ubuntu 12.04.


Further instructions

This page is a work in progress, and outlines the steps that a reasonably knowledgeable user would use to install Ubuntu on a MacBookAir4,2. If you encounter difficulties, you can find further information and ask questions in the Ubuntu MacbookAir4 Thread.

The relevant code snippets from post-install-precise.sh script are embedded into this wiki page on a per-task basis, so you can copy and paste one snippet at a time, so you know exactly what changes are being made. Just running the script --although convenient-- is potentially too much of a black box for many users.

LCD Panel

Does work out of the box.

Suspend, Hibernate, Shut-down and Reboot

All except hibernate work perfectly with no need for post-installation changes.

To fix the hibernate problem, you need to add the resume parameter with the correct swap partition to the kernel boot options. For example, in my case, swap is at /dev/sda5 so I edited /etc/default/grub as follows:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1 resume=/dev/sda5"

after making this change, run 'sudo update-grub'.

Finally, to enable hibernate follow the steps on this page.

The following change brings back eth0 after suspend when using the apple usb-ethernet adapter:

echo 'SUSPEND_MODULES="asix usbnet"' | sudo tee -a /etc/pm/config.d/ethernet_fix

Keyboard functions (Brightness,volume,...)

In some keyboards, mappings aren't correct (±§~` symbols). With care, all these issues can be fixed using the xmodmap program:

xmodmap ~/.Xmodmap

example xmodmap configs: 1. dfacto 2. pof

Keyboard backlight

Works out of the box.

Touchpad

Works perfectly out of the box.

There are 3 different drivers available for the touchpad:

Wireless

Works perfectly out of the box using either 'wl' (broadcom closed driver) or 'brcmsmac' (open source driver).

If using the default wl driver in Ubuntu 12.04 you'll notice a 30 seconds delay to connect to a wireless network after resuming from suspend, it is recommended to use the updated version (using CFG80211 API) which does not have this timeout, to use the updated version follow these instructions:

$ sudo apt-get purge bcmwl-kernel-source
$ sudo add-apt-repository ppa:poliva/pof
$ sudo apt-get update
$ sudo apt-get install broadcom-sta-dkms
$ echo 'blacklist bcma' |sudo tee -a /etc/modprobe.d/blacklist-bcma.conf

If you want to use the brcmsmac driver, follow these instructions:

$ echo 'blacklist wl' |sudo tee -a /etc/modprobe.d/blacklist-wl.conf
$ echo 'brcmsmac' |sudo tee -a /etc/modules

Please note that the brcmsmac driver is not as good with power management as the wl driver, and will drain your battery faster.

Bluetooth

Works perfectly out of the box.

iSight

Works perfectly out of the box.

Sound

Works perfectly out of the box, but it's switched off by default after installation. Run "sudo alsamixer" command in a terminal. Then select the surround channel and unmute it by pressing "m" and put the volume up.

Microphone

Works perfectly out of the box.

External Monitor

Works perfectly out of the box. Some users have reported problems getting the external monitor to work after resume from a suspend, specially when using compiz (unity 3d). As a workaround, switch to the unity2d interface.

Thunderbolt

Thunderbolt support is not yet available under Linux. This is an area under heavy development and support is likely to be available in future versions of Ubuntu.

SD card slot

Works perfectly out of the box.

Fan Control

Works perfectly out of the box, macfanctld isn't strictly needed but if you want to install it:

        sudo add-apt-repository ppa:mactel-support/ppa
        sudo apt-get update
        sudo apt-get install macfanctld
        sudo service macfanctld stop
        sudo sed -i "s/\(^exclude:\).*\$/\\1 13 14 15/" /etc/macfanctl.conf
        sudo service macfanctld start

HFS+ (OS X disc partition)

Works perfectly out of the box.

Sensors (temps & fans)

Works by default however to (optionally) read the sensor data requires the package lm-sensors which is installed by post-install-precise.sh.

sudo aptitude install lm-sensors
sudo tee -a /etc/modules <<-EOF
        coretemp
        hid_apple
EOF

GPU Power Save

The post-install script, post-install-precise.sh, adds a boot parameter to grub, which allows the GPU to enter a low power state when it is idle. This option offers a considerable power reduction of 26%, according to an article at Phoronix.

sudo cp /etc/default/grub /etc/default/grub.$(date +%Y-%M-%d)
sudo sed -i "s/\(GRUB_CMDLINE_LINUX_DEFAULT=\).*\$/\\1\"quiet splash i915.i915_enable_rc6=1\"/" /etc/default/grub
sudo update-grub

Other Power Saving tips

To enable power management for USB/PCI/SATA devices when on battery:

wget http://pof.eslack.org/archives/files/99_macbookair
sudo mv 99_macbookair /etc/pm/power.d/99_macbookair
sudo chmod 755 /etc/pm/power.d/99_macbookair

If you don't use bluetooth regularly you can disable it by default at boot time. You can enable it manually later by clicking on the top panel bluetooth icon if you need to use bluetooth:

sudo sed -i '$i /usr/sbin/rfkill block bluetooth' /etc/rc.local

If you want to enable automatic keyboard brightness level and automatic LCD backlight level based on the ambient light sensor, you can install lightum:

sudo add-apt-repository ppa:poliva/lightum-mba
sudo apt-get update
sudo apt-get install lightum

Configuration file is on '~/.config/lightum/lightum.conf'.


CategoryMac

MacBookAir4-2 (last edited 2013-12-14 02:16:55 by knome)