[Tested with Lucid latest updates, you can contact me at luis TOD alves TA lafaspot TOD com]

MacBookPro 5,5 and Ubuntu 10.04 (Lucid Lynx)



This page aims to describe the steps needed, to fully enable all features of the 13.3 (mbp 5,5) and 15 inch (mbp 5,4) 5-th Generation MacBookPro (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

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

sudo apt-get install nvidia-bl-dkms pommed

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:

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 nvidia-bl-dkms
sudo apt-get install nvidia-bl-dkms

An alternative to using the nvidia-bl-dkms module for LCD dimming support (F1-F2 keys), is to add this line to the "Device" section of /etc/X11/xorg.conf:

Option "RegistryDwords" "EnableBrightnessControl=1"

Sensors (temps & fans)

Edit /etc/modules:

gksudo gedit /etc/modules

And add to the end:

coretemp

To enable temperature sensors.

Suspend & Hibernate

Suspend and Hibernate work if the machine has had the latest EFI update (version 1.7) and the 195 version nVidia drivers.


Reboot

Rebooting and Shutdown seems to work fine.

Video & Effects (Compiz)

IconsPage/restricted.png 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. Some users reported that version 195, which is available as recommended, works great. But some other users, installing Lucid from scratch (e.g. not upgrading from Karmic) couldn't suspend or hibernate the computer with 195.x drivers.

Instead, with version 173.x (from repositories) or 190.x (from the nvidia website), the computer went back to work for suspending/resuming & hibernating/waking up. Version 173.x didn't refresh long pages shown with Firefox when scrolling (Chromium worked fine), but version 190.x worked fine also with Firefox and Chromium. Bottom line: if you have some problems with your display using 195 drivers, try with 190.x first, until the bugs reported for nvidia at launchpad are completely fixed.

Note: I've found that making sure the mactel-support repository is added, and ALL current recommended-updates are installed, before activating the nVidia-current driver appears to alleviate all of the above problems mentioned. Using the driver before updates appears to cause problems with the startup splash.

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

On other devices, the Mac is found. It does not offer any services, but this seems to be a software problem.

Keyboard Functions

What works:

  • F1 and F2 for LCD dimming (with 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)
  • CAPSLOCK light (uninstalling mouseemu)

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.

  # 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.


Capslock Light

To enable the CAPSLOCK light you need to remove the mouseemu package.

For testing you can execute this command and then test switching CAPSLOCK:

sudo killall mouseemu

If everything is OK you can permanently remove mouseemu:

sudo apt-get --purge remove mouseemu


Touchpad (bcm5974)

The touchpad works out of the box. You can enable two-finger scrolling from the preference->mouse->touchpad applet. It also may help you to uncheck the "Enable mouse clicks with touchpad" checkbox under the Touchpad tab. Furthermore tweaking the drag and drop time to be less, helped significantly. The click-and-drag also works.

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. Obs: It's necessary to use 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 works for me out of the box. To unmute the front speakers run alsamixer from the Terminal, or use gnome-alsamixer:

  sudo apt-get install gnome-alsamixer

To enable the optical output, check the IEC958 option, and you'll see a red light coming from your headphone jack.

If sound is not working the following may help.

From the terminal, type:

   gksudo gedit /etc/modprobe.d/alsa-base.conf

Add the following line to the end of the file. Save the file. Reboot.

   options snd-hda-intel model=mbp55

***this also working for the new MBP 6,1 models.

Microphone

Also working, see above.

If you encounter problems with microphone in Skype, try to select "fixed (plug)" (instead of "Default device (default)") as Microphone device.

External Monitor

Dual monitor tested successfully with Twinview on the recommended lucid drivers described above. My external monitor was detected correctly by nvidia-settings tool. External VGA's resolution tested up to 1920x1080.

You may experience some trouble with the external VGA and the new drivers: if the detected resolution of externally connected monitors doesn't go beyond 640x480, you will need to inactivate EDID. Add:

Option     "NoEDID" "True"

to /etc/X11/xorg.conf

Apple Remote Control

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

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. Though my remote is model No A1294, gnome-lirc-properties detects its signals (however, he Enter button is detected as an additional Play button). Although this seems to work, on my mbp 5,4 the remote does not actually control any applications, like the Totem Movie Player - more testing is required.

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.




CategoryMac

MacBookPro5-5/Lucid (last edited 2013-12-14 03:08:39 by knome)