Getting Ubuntu 9.04 Running Smoothly on a MacBook Pro (3,1)

Here's the setup process for getting a MacBook Pro (rev 3,1) working well under Ubuntu 9.04.

First, enable the NVIDIA drivers using jockey-gtk, the hardware drivers manager.

Next, add the keys for the mactel PPA:

sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0x8db7f87a2b97b7b8

Then install a set of packages for better drivers covering the wifi, touchpad, power management, backlight, and more. Also remove mouseemu to avoid conflicts:

sudo apt-get install bcm5974-dkms gnome-power-manager nvidia-bl-dkms hid-dkms applesmc applesmc-dkms hal-applesmc mbp-nvidia-bl-dkms xserver-xorg-input-synaptics linux-backports-modules-jaunty
sudo apt-get remove mouseemu

Add the needed modules to /etc/modules:

applesmc
nvidia_bl

Better touchpad settings go in /etc/hal/fdi/policy/appletouch.fdi. This configuration enables two-finger and three-finger clicks for middle and right click, and sets improved acceleration parameters.

An init script can swap the function key meanings so they register as F1, F2, etc. Add it to the default runlevels using update-rc.d:

#!/bin/bash
echo 2 > /sys/module/hid_apple/parameters/fnmode

Finally, run syndaemon at login to prevent awkward touchpad events while typing:

syndaemon -d -t -K -i 2