These instructions cover the late 2010 MacBookAir3,1 and MacBookAir3,2 models. Most of the information in this article is derived from the Ubuntu Forums.
Installation works using the Apple Superdrive, additional steps may be required for other installation methods, such as these for an USB stick method.
But, when you boot the Ubuntu disc and see the purple screen with a keyboard picture at the bottom, press a button on the keyboard to bring up the menu. Select your language, then press F6 for other options, turn on "nomodeset", press Esc and select try ubuntu. Note: nomodeset works around a graphics problem which we'll see in a bit.
- Trouble Shooting: If you get a GRUB screen when booting the 64 bit version, and it fails to boot from the disc, then hold down the Alt key when powering on, you should see a "Windows" and an "EFI boot" option for the disc, select the "Windows" option and you should get the familiar purple screen.
When you reboot the machine, and after the disc ejects, the system may fail to actually reboot, we'll fix this later. For now, just hold down the power button to switch it off and turn it back on.
- Trouble Shooting: After a reboot you may encounter a few seconds of the GRUB bootloader menu. If you don't do anything, chances are you may end up with a black screen and nothing happens. If so, shut down by pressing the power button. Reboot again, go to the GRUB menu again, but this time, press "e" on your keyboard to edit the boot options. You will see that the boot option has reverted back to "quiet splash". You will want to replace it with "nomodeset" again. And then Ubuntu will boot up properly with graphics (which are not yet optimized for your screen).
Now if you can suffer the serious graphic problem for a couple of minutes and login, then setup an internet connection. Once you have internet access, go to System > Administration > Additional Drivers. You may need to reboot the machine before anything appears in the driver list. Select the NVIDIA driver and click install. Once it's installed, reboot the computer. You can stop squinting at the screen in pain now.
Note: wondering what filesystem to choose? For SSDs, it seems recommended to pick ext4 with journaling as this supports TRIM functiality. Read more at http://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu
Feel free to try the MacBookAir3-2-Narwhal-PostInstall.sh, or you can follow the step by step instructions below.
note: this script broke my fresh installation so not sure it s a good idea to use it.
Apple uses 6-bit LCDs which support only 262144 colours instead of 16 million. So we need to enable dithering at 6 bits per colour channel to smooth colour gradients.
Assuming you use gdm (the default) as login manager, run:
sudo gedit /etc/gdm/Init/Default
Add to the end of the file, but above the exit 0 line:
/usr/bin/nvidia-settings -a [gpu:0]/Dithering[DFP-2]=1 /usr/bin/nvidia-settings -a [gpu:0]/DitheringDepth[DFP-2]=1
To fix backlight and touchpad issues with suspending, create a new file:
sudo gedit /etc/pm/config.d/macbookair_fix
And add these lines.
SUSPEND_MODULES="bcm5974 mbp-nvidia-bl" HIBERNATE_RESUME_POST_VIDEO="yes" ADD_PARAMETERS="--quirk-reset-brightness" DROP_PARAMETERS="--quirk-none"
To fix the backlight function keys:
sudo gedit /etc/X11/xorg.conf
Find the Device Section for the Nvidia driver and add this line to the end of the section:
Option "RegistryDwords" "EnableBrightnessControl=1"
The block should now look like this:
Section "Device" Identifier "Default Device" Driver "nvidia" Option "NoLogo" "True" Option "RegistryDwords" "EnableBrightnessControl=1" EndSection
Nearly there, we just need to change some boot parameters now:
sudo gedit /etc/default/grub
Change the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=pci acpi_backlight=vendor"
Now, finally run:
if you can't install wireless driver you should try :
sudo apt-get update
sudo apt-get --reinstall install bcmwl-kernel-source
Fans will work fine without macfanctld, ignore this section if you have not installed macfanctld (it won't install this package by default).
macfanctld (MAC fan control daemon) uses applesmc-dkms to take the temperatures of sensors inside the computer and set the fan speed accordingly. Two of those sensors, TCZ3 and TGZ3, falsely oscillate between 0 and 255 degrees C causing macfanctld to toggle the fan on and off. The following instructions describe how to instruct macfanctld to ignore the input from said sensors, allowing the fan to operate normally:
Ensure the macfanctld is stopped with sudo /etc/init.d/macfanctld stop.
Run macfanctld -f to obtain the list of sensors and their associated ID numbers.
Open /etc/macfanctl.conf and add the numbers for TCZ3 and TGZ3 sensors to the "exclude" list. (Mine were 8 and 14 respectively. Ex: exclude: 8 14. Note it's "exclude" and not "excluded".)
Run macfanctld -f | grep exclude and confirm temp*_input are printed in the list.
Restart the fan control daemon with sudo /etc/init.d/macfanctld start.
- Trouble Shooting: Not sure if you need to install the package "macfanctld" first from either Synaptics or doing "sudo apt-get install macfanctld" at the Terminal.
Headphones and speakers should work out of the box.
Multitouch works out of the box, however the bcm5974 can't handle suspends very well. If you have followed the Post Install instructions, it will be unloaded at suspend time.
Hotkeys work out of the box.
You can swap the behaviour of the Fn key by running:
sudo nano /etc/rc.local
Then adding this line to the file (before the exit line):
echo 2 > /sys/module/hid_apple/parameters/fnmode
You can change the number to 0 = disabled, 1 = fkeyslast, 2 = fkeysfirst.
F11 and F12 keys
F11 and F12 are used for mouse emulation. If you want them to function as regular F11 and F12 again you'll have to uninstall the 'mouseemu' package
sudo apt-get uninstall mouseemu
Out of the box support (with a decent open source driver, yay!).
Do *NOT* install the nvidia-bl-dkms driver from the Mactel archive because it will pin your backlight setting. The default mbp_nvidia_bl driver included in the standard Linux kernel works fine. The backlight keys on the MBA keyboard should also work fine. If they don't, check if you have the right module loaded.
lsmod | grep mbp_nvidia_bl
If not, make sure it will be loaded by default.
sudo bash echo mbp_nvidia_bl >> /etc/modules modprobe mbp_nvidia_bl
To prevent your backlight from resetting to a fixed value after suspend, make sure you've followed the Post Install instructions.
Tips and Tricks
A collection of helpful tips for the Macbook Air.
You can also calibrate the display. Run:
sudo apt-get install xcalib sudo mkdir /etc/xcalib/
Then if you used a dual-boot setup and still have OS X installed, run:
sudo mkdir /media/OSX sudo mount -o ro /dev/sda2 /media/OSX sudo cp /media/OSX/Library/ColorSync/Profiles/Displays/Color\ LCD-00000610-0000-9CF3-0000-000004273CC0.icc /etc/xcalib/colorprofile.icc sudo umount /media/OSX
Once again if you use gdm as login manager, run:
sudo gedit /etc/gdm/Init/Default
Then add this line with the other lines:
So, the end of the file should look like this now:
/usr/bin/xcalib /etc/xcalib/colorprofile.icc /usr/bin/nvidia-settings -a [gpu:0]/Dithering[DFP-2]=1 /usr/bin/nvidia-settings -a [gpu:0]/DitheringDepth[DFP-2]=1 exit 0
Avoid long EFI wait before GRUB
If your Macbook spends 30 seconds with "white screen" before GRUB shows, try booting from your Mac OS X install disc, select language, then click Utilities->Terminal, and enter:
bless --device /dev/disk0s1 --setBoot --legacy
Assuming that the bootloader is on sda1, otherwise /dev/disk0s2 if it's on sda2, etc.
You may have noticed that some keys are missing from the keyboard. Most of these can be accessed with the Fn key:
No PrintScr key? Go to System > Preferences > Keyboard Shortcuts, then find the "Take a Screenshot" entry and set it to another key. I set mine to the eject key (after disabling the eject shortcut), the eject key is hardly useful on the Air anyway (you can run 'eject' from the command line in the rare case you need it for the Superdrive.)
Superdrive Doesn't Work
Actually, it does, but only if you boot (or re-boot) the Macbook with the Superdrive plugged in. It doesn't seem to work if you hot-plug it -- probably the same mechanism that keeps the Superdrive from working with any other system than the Macbook Air.
Disable the Mac Startup Sound
The "BONG" when you turn on your laptop driving you crazy? Via the ArchLinux Wiki:
- Reboot into the OSX installation media (holding down C to boot from the DVD or USB stick)
- From the Utilities menu, start the Terminal
- Issue the following command:
# /usr/sbin/nvram SystemAudioVolume=%01
Note - Think carefully before disabling the startup sound. It serves the same purpose as the BIOS beep does on a PC - it lets you know that all the hardware was initialized properly. You could be disabling an important diagnostic tool.