MacBook Pro 5,3 and Ubuntu 10.04 (Lucid Lynx)



This page aims to describe the steps needed, to fully enable all features of the 15.4 inch 5-th Generation MacBookPro Aluminium (Unibody) (release date: June 2009) when using Ubuntu 10.04, Lucid Lynx.

IconsPage/terminal.png You can find out, what model you have by typing at the terminal:

sudo dmidecode -s system-product-name


  • If you have a different model, please go here and find the right wiki.

Overview

Anything not mentioned here probably already works out of the box. If not, please refer to the Ubuntu Apple Users forum.

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 work)
IconsPage/question.png (not yet documented)

Basic Installation Instructions

Common things about installing and maintaining Ubuntu on Intel-based Macs: Intel CPU-based Macintosh Generic Installation Instructions

Package Support for Intel Macs

You need some modules from the MactelSupportTeam/PPA :

sudo add-apt-repository ppa:mactel-support && sudo apt-get update

Sensors (temps & fans)

Edit /etc/modules:

gksudo gedit /etc/modules

And add to the end:

coretemp

To enable temperature sensors.

Reboot

Rebooting and Shutdown seems to work fine.

Suspend & Hibernate

Confirmed working out of the box:

  • Suspend, when closing lid.
  • Suspend, when chosen from the power menu.
  • Hibernate, when chosen from the power menu.

Differences with Mac OS:

  • Suspend is sluggish. Be patient.
  • Does not wake when lid is opened. Push the power button to wake.

Video & Effects (Compiz)

You should use the restricted driver, install from: System -> Administration -> Hardware Drivers. Select the NVidia graphics driver that says recommended and Activate. Reboot to apply the change.

HFS+ (only read)

Confirmed working out of the box.

CD/DVD Writing

Both writing and reading work fine.

Bluetooth

Confirmed working out of the box:

  • Detection of devices
  • Sending files to devices (OBEX push)
  • Bluetooth Mouse
  • Bluetooth Keyboard

Keyboard functions (Brightness,volume,...)

The mactel PPA modules needed on ubuntu on mac are mbp-nvidia-bl-dkms (for the LCD dimming support), and pommed (for the keyboard backlight control keys).

sudo apt-get install mbp-nvidia-bl-dkms pommed

mbp-nvidia-bl-dkms must be in /etc/modules file to load. Open the file in an editor with:

gksudo gedit /etc/modules

And add to the end this line:

mbp_nvidia_bl shift=2

The shift option reduces the dimming range to make it more comfortable. You can tune the value as you want.

If you use a different kernel like pae, you will need to install it again under the pae kernel to make it work LCD dimming keys work, and reboot.

sudo apt-get remove mbp-nvidia-bl-dkms
sudo apt-get install mbp-nvidia-bl-dkms

What works:

  • F1 and F2 for LCD dimming (with mbp-nvidia-bl-dkms packages installed)
  • F3 and F4 can be correctly associated with any command in the system preferences.
  • F7, F8 and F9 are correctly associated with audio player's 'previous', 'play/pause', 'forward' commands.
  • F10, F11, F12 correctly mute and tune audio volume (after having correctly configured audio, see below)

The default setting of the /etc/pommed.conf, in the "Keyboard backlight control"-section, is a bit annoying. To change this you may use some of these settings:

# default value for automatic backlight (0 - 255)
default = 0
---
# step value (1 - 127)
step = 16
---
# enable/disable automatic backlight
auto = no
---
# idle timer - switches off keyboard backlight automatically (timeout in seconds, -1 to disable)
idle_timer = 300

The mouseemu package might affect the caps-lock behaviour, if caps-lock fails to work remove this package if installed.

As of version 1.31, pommed supports the mbp 5,5 and mbp 5,4. The default settings work ok, and you can always tune its config file:

gksudo gedit /etc/pommed.conf

To swap the fn key functionality (e.g. use fn+F1 to dim the LCD etc..), edit /etc/pommed.conf and set the variable fnmode to 2, or add this line to /etc/modprobe.d/options:

options hid_apple fnmode=2


Keyboard backlight without pommed

Consider this if you want a way to control the backlight from the command line or with the mouse.

You can choose a value from 0 to 255 to tune the keyboard backlight by writing to /sys/class/leds/smc::kbd_backlight/brightness. For example this command switches the light completely on:

  echo 255 | sudo tee -a /sys/class/leds/smc::kbd_backlight/brightness

The file reporting the ambient light sensor is /sys/devices/platform/applesmc.768/light (the number 768 in the path might be different on your machine). To read the value do

  cat /sys/devices/platform/applesmc.768/light

which should give different values under different light conditions.

With the following method you can control the backlight through a GUI. Create a new file in /usr/local/bin:

  gksu gedit /usr/local/bin/keyboard-backlight

Copy this script into the file and save it:

  #!/bin/bash

  # A little script to set the keyboard backlight
  # Note: clicking "Cancel" in the dialog sets the backlight to 0.
  # Note: needs to be called as root (with gksu or sudo) because
  # of writing to /sys. Use "sudo visudo" to edit the /etc/sudoers file
  # if you want to allow non-admin users to change this value, possibly
  # without having to enter a password. Read "man sudoers" and, e.g., use
  # ALL ALL = NOPASSWD:/usr/local/bin/keyboard-backlight
  # to allow all users to execute this command on all hosts without
  # a password.
  #
  # Note: If setting the slider fully to the left BRIGHTENS the lights
  # rather than DIMMING them, replace
  #     --min-value="0"
  # with
  #     --min-value="1"

  # Read current value
  BACKLIGHT=$(cat /sys/class/leds/smc::kbd_backlight/brightness)

  BACKLIGHT=$(zenity \
                --title "Keyboard backlight" \
                --scale \
                --text="Adjust the keyboard backlight" \
                --value="$BACKLIGHT" \
                --min-value="0" \
                --max-value="255")

  echo $BACKLIGHT | tee -a /sys/class/leds/smc::kbd_backlight/brightness
  exit 0

Use this command to make the file executable:

  sudo chmod +x /usr/local/bin/keyboard-backlight

You may want to create a launcher on the panel. In this case enter

  gksu /usr/local/bin/keyboard-backlight

as the command line. Very smartly, the dialog will recognise the word "keyboard" and suggest a good launcher icon automatically.

You could also use the ambient light value to extend the script to make the backlight depend on the ambient light.

Touchpad (bcm5974)

You can enable two-finger scrolling from the preference->mouse->touchpad applet.

The shipped driver does not allow click-and-drag which I find frustrating. The next lines will install an experimental version that adds such feature:

sudo apt-get install dkms
wget http://launchpadlibrarian.net/24871974/bcm5974-dkms_1.1.4_all_test.deb
sudo dpkg -i bcm5974-dkms_1.1.4_all_test.deb
sudo modprobe -r bcm5974
sudo modprobe bcm5974

Right-clicking when using touchpad

Right-clicking is achieved by clicking with two fingers anywhere on the touchpad.

Wireless (AirPort)

IconsPage/restricted.png The Broadcom driver was not installed by default on Lucid. You'll need the STA one, goto "System->Administration->Hardware Drivers" and enable it. If you prefer the command line, execute on the Terminal:

sudo apt-get install bcmwl-kernel-source

Then reboot the system and you're OK.

iSight

IconsPage/webcam.png

Confirmed working out of the box. Tested using cheese (sudo apt-get install cheese) and skype. If it's not working you should use the isight-firmware-tools. In case you don't wan to do this, you need boot OSX first to load the isight firmware, and reboot into Ubuntu. This will trigger OSX to load the firmware which should last until you poweroff the machine.

Sound

Sound hardware is functional out of the box, but you need to make some adjustments. It's easiest to use gnome-alsamixer for these. Install the package:

  sudo apt-get install gnome-alsamixer

Start the mixer from menu Applications -> Sound and Video -> Gnome ALSA Mixer. Uncheck the "Mute" box next to the front speaker settings and also move their slider to maximum. If you want to enable the optical output you need to check the IEC958 option; you'll see a red light coming from your headphone jack.

(You can also use alsamixer in a Terminal instead of gnome-alsamixer. It is installed by default).

Microphone

External Monitor

Dual monitor was tested successfully with Twinview on Ubuntu 10.04 (Lucid Lynx) using the nvidia-current driver. Use menu System -> Administration -> Nvidia X Server Settings to configure.

Apple Remote Control

It Works with Remarks. Volume control works. Forward and back works (even on Mozilla Firefox). Menu has no action. Pause/Play not tested.

You have to install gnome-lirc-properties:

sudo apt-get install gnome-lirc-properties

gnome-lirc-properties will give you an entry "Infrared Remote Control" in menu System > Administration. After launching this it will guide you through the configuration.

Firewire

Works out of the box.


CategoryMac




IconsPage/users.png
Please update this page if you have figured out anything that is not mentioned here!



IconsPage/users.png
The MactelSupportTeam is about to restructure and reorganize the documentation for Intel-based Macs. If you are interested in helping, please visit our team page for information. For all Mactel wikis, there is a starting place here. There is also a thread about planning the Mactel docummentation going on.



MacBookPro5-3/Lucid (last edited 2013-12-14 10:04:10 by knome)