up

MacBook Pro 5,1 and 5,2 on Ubuntu 10.04 LTS

This page aims to describe the steps needed, to fully enable all features of the 5th Generation MacBook Pro (release date: late 2008, early 2009) when using Ubuntu 10.04 LTS (Lucid Lynx).

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

sudo dmidecode -s system-product-name


This should either return MacBookPro5,1 or MacBookPro5,2. If not, this page is not really so well suited for your situation. If you have a MacBook Pro, but a different hardware revision, please go to the MacBook Pro start page. If you have a different Intel CPU-based Macintosh product, go to the Mactel Community Help Pages to 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.

  • Feature

    Support status

    Sensors (temps & fans)

    IconsPage/warning.png

    Suspend & Hibernate

    IconsPage/ok.png

    Reboot

    IconsPage/ok.png

    Desktop Effects (Compiz)

    IconsPage/ok.png IconsPage/info.png

    HFS+ (only read)

    IconsPage/ok.png

    CD/DVD Writing

    IconsPage/ok.png

    Bluetooth

    IconsPage/ok.png

    Screen brightness adjustment

    IconsPage/ok.png

    Keyboard functions (Brightness, volume, etc)

    IconsPage/ok.png IconsPage/info.png

    Sound

    IconsPage/ok.png

    Microphone

    IconsPage/ok.png

    External Monitor

    IconsPage/question.png

    Wireless (AirPort)

    IconsPage/warning.png

    Trackpad

    IconsPage/ok.png

    Webcam/iSight

    IconsPage/ok.png

    Apple Remote Control

    IconsPage/question.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 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, but remember that rEFIT supports this MacBook only from 0.12. For 64Bit Ubuntu use rEFITt 0.14 or higher. Info rmation about rEFIt can be found at http://refit.sourceforge.net/

Package Support for Intel Macs

Install the modules from the MactelSupportTeam/PPA. Lucid Lynx have in the Kernel 2.6.32 all that need you to make work fine your MacBook Pro 5,1, but to Make work the buttons for keyboard backlight just add this PPA:

sudo add-apt-repository ppa:mactel-support 


Install:

  • pommed (Make work the buttons for keyboard backlight)

If you want to install them:

sudo apt-get install pommed

Boot/GRUB/Plymouth

Boot was nice the first boot for me, but the resolution went back to 640x480 right after. Follow these instructions to get GRUB and Plymouth back http://idyllictux.wordpress.com/2010/04/26/lucidubuntu-10-04-high-resolution-plymouth-virtual-terminal-for-atinvidia-cards-with-proprietaryrestricted-driver/

Just don't forget to fill in the resolution you want (typicaly: 1440x900)

Reboot

Confirmed working out of the box.

Suspend & Hibernate

Suspend is working out of the box, way faster than on Karmic.

Hibernate is pretty slow, possibly slower than boot up.

Wireless

STA drivers in the non-free Hardware drivers can be installed. You will need a wired Internet connection to do this. Go to System->Administration->Hardware Drivers. Select the Broadcom STA options and click enable.

Many people confirmed having a lot of disconnections with the latest version of network manager. See https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/488340

It can be fixed using volanin's ppa: http://ppa.launchpad.net/volanin/ppa/ubuntu/pool/main/n/network-manager/

DON'T INCLUDE THIS PPA IN YOUR APT, ONLY DOWNLOAD NETWORK MANAGER AND DEPENDECIES There is conflicts with the other packages he maintains

STA drivers of ubuntu 11.04 works very well on 10.04 and resolve this issue. You can download it here:http://packages.ubuntu.com/natty/bcmwl-kernel-source

Sensors

To enable all these sensors:

  • One motion sensor

  • Ambient light sensor

  • One fan sensor

  • 16 temperature sensors

You have to edit /etc/modules:

gksudo gedit /etc/modules 

And add at the end:

coretemp
applesmc

After a reboot (or modprobing the modules), they will be recognized. You can verify this by using

dmesg | grep apple

Output should be something like:

[  975.586518] applesmc: Apple MacBook Pro 5 detected:
[  975.586522] applesmc:  - Model with accelerometer
[  975.586524] applesmc:  - Model with light sensors and backlight
[  975.586526] applesmc:  - Model with 20 temperature sensors
[  975.587187] applesmc: device has already been initialized (0xe0, 0x00).
[  975.587189] applesmc: device successfully initialized.
[  975.588120] applesmc: 2 fans found.
[  975.590446] input: applesmc as /devices/platform/applesmc.768/input/input10
[  975.594503] applesmc: driver successfully loaded.

Unfortunately, none of the sensors have correct names. There is a legacy description suitable for other MacBook's at the old mactel-linux site with an (incorrect) sample sensors.conf at this mactel 2007 mail thread.

Add this to your sensors.conf or sensors3.conf file to provide context for some of the temperature sensors (this was generated on a MBP 5,2):

chip "applesmc-isa-0300"
    label "temp1" "TB0T Enclosure Bottom 0"
    label "temp2" "TB1T Enclosure Bottom 1"
    label "temp3" "TB2T Enclosure Bottom 2"
    label "temp4" "TB3T Enclosure Bottom 3"
    label "temp5" "TC0D CPU Diode"
    label "temp6" "TC0F CPU ???"
    label "temp7" "TC0P CPU Pin"
    label "temp8" "TG0D GPU Diode"
    label "temp9" "TG0F GPU ???"
    label "temp10" "TG0H GPU Heatsink"
    label "temp11" "TG0P GPU Pin"
    label "temp12" "TG0T GPU Transistor"
    label "temp13" "TG1H GPU 2 Heatsink"
    label "temp14" "TN0D Northbridge Diode"
    label "temp15" "TN0P Northbridge Pin"
    label "temp16" "TTF0 Unknown"
    label "temp17" "Th2H Heatsink 2"
    label "temp18" "Tm0P Memory Controller"
    label "temp19" "Ts0P PCI Express Slot Pin"
    label "temp20" "Ts0S PCI Express Slot (unk)"
    label "fan1" "Left Fan"
    label "fan2" "Right Fan"

chip "coretemp-isa-0000"
   label temp1 "Core0"

chip "coretemp-isa-0001"
   label temp1 "Core1"

Keyboard functions

Almost all keyboard functions work out of the box. The only exceptions I could find are the LED Backlighting controls and the Expose and Dashboard keys.

In order to have Ubuntu correctly recognize the keyboard backlight function, you have to install the module pommed from the Mactel PPA repository; to do so, run:

sudo apt-get install pommed

Bluetooth

Pairing works out of the box. Beyond that, not tested.

If you have issues with Bluetooth, try to reset it with:

sudo hciconfig hci0 reset

If you want:

  • send file: launch Applications > Accessories > Bluetooth (bluetooth-applet)

  • receive file: set name and visibility with System > Preferences > Bluetooth (bluetooth-property) and launch Applications > Accessories > Bluetooth File Sharing (gnome-obex-server)

Remember that the system service Bluetooth device manager (bluetoothd) must be running in the background.

Note: Did not succeed to connect two computers or to browse a device yet!

Trackpad

Left-click, right-click (two finger)use and basic trackpad work out of the box. To enable two finger scrolling and tap to click:

  • System > Preferences > Mouse > Touchpad

Desktop Effects (Compiz)

You must enable the a non-free graphics driver to use Compiz. Go to System -> Administration -> Hardware Drivers and choose the NVIDIA accelerated graphics driver (version 190). It works on MacBook Pro, you will have to reboot after install.

External Monitor

Using Xinerama

WARNING This section was copy pasted, use with caution, not tested

Note: this work on Jaunty with ndivia-settings but with glitches: compiz doesn't work and I couldn't move the mouse cursor from one screen to another.

Using the restricted nvidia driver >= 177.80, one can set up a dual head configuration and make full use of an external display. An example xorg.conf configuration of a working dual head setup using Xinerama (separate X sessions for each display) is shown below.

* Note that in the following example the external LCD is rotated (counterclockwise) left.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" Below "Screen1"
    Screen      1  "Screen1" 0 0
EndSection

Section "Module"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "1"
EndSection

Section "Monitor"
    Identifier     "Configured Monitor"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Apple Color LCD"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "(Some model name here which is detected automatically)"
    HorizSync       31.0 - 65.0
    VertRefresh     59.0 - 61.0
EndSection

Section "Device"
    Identifier     "Configured Video Device"
    Driver         "nvidia"
    Option         "NoLogo"
#   Option         "RandRRotation" "on"
#   Option         "Rotate"        "CCW"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9300M"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9400M"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Default Screen"
    Device         "Configured Video Device"
    Monitor        "Configured Monitor"
    DefaultDepth    24
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option         "NoLogo"
    Option         "RandRRotation" "on"
#   Option         "Rotate"        "CCW"
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option         "NoLogo"
    Option         "RandRRotation" "on"
    Option         "Rotate"        "CCW"
EndSection

Note: NVidia splash-logo is disabled due to the Option "NoLogo" entries as seen in the above example

Using TwinView

Make sure to have the monitor plugged in before you boot the laptop, because the screen detection might not work correctly otherwise. With the binary NVidia driver installed, go to System -> Preferences -> Display. You will be redirected to nvidia-settings, which can also be found directly under System -> Administration -> NVidia X Server Settings. In the X Server Display Configuration, click on detect displays, then click on your external display, configure button -> TwinView -> Apply changes.

If the external monitor's display looks heavily corrupted in colours and refresh (and you've made a supported resolution and refresh rate is selected), check under GPU-{number} -> DFP-{number} - {external monitor} and switch off the "Force Full GPU Scaling".

Here is a dual head configuration using the restricted nvidia driver (version >= 177.82). The xorg.conf file was generated by nvidia-settings and was tested with a ViewSonic VA1912wb (19" widescreen) LCD at 1440x900, above the MacBook screen. The desktop size is 1440x1700; Xinerama is not used. It may be possible to use this configuration with an external LCD with a different resolution by modifying the "+900" in the Option "metamodes" line to match the height (in pixels) of the desired monitor.

The xorg.conf file, with input device sections omitted, follows:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Apple"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9400M"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+900, DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Sound

Works out the box

Microphone

Works out of the box. You will need to increase the microphone input volume:

  • System > Preferences > Sound > Input

Remote Control

Coming soon

Screen brightness adjustment

Works out of the box. See keyboard for changing the default operation of the function keys.

Known issues

Increase minimum fan speed

To increase the minimum fan speed, you must first have activated the internal sensors. Then you can run this command:

echo 3000 | sudo tee /sys/devices/platform/applesmc.768/fanX_min

(replace X by the fan number, usually 1 to 2.) This will make the fan run at least 3000rpm, still allowing the hardware to spin up under heavier load. Also, this setting change won't last when you restart.

To make it last, place this file in /etc/init.d/applesmc_fan

 #!/bin/bash
echo 3000 | tee /sys/devices/platform/applesmc.768/fan1_min
echo 3000 | tee /sys/devices/platform/applesmc.768/fan2_min

and enable it:

sudo update-rc.d applesmc_fan defaults 55

Set Graphics Card to Powersave Mode

Both of the following settings belong in the Device section of your Xorg file, located at /etc/X11/xorg.conf.

If you would like to constantly enable powersave mode, add:

Option     "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x3"

If you would like powersave only when using the battery, use this instead.

Option     "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

Note that, although users have experienced drops of several degrees C, using this option will lower performance for graphics-intensive applications.

Enable laptop-mode

Some users have reported power savings from enabling laptop mode. To do so, make sure laptop-mode-tools is enabled

sudo aptitude install laptop-mode-tools

Disable UUID in Grub

There have been several cases where, early in the boot process, Grub throws up a message that says: "Gave up waiting for root device"; it also says that it will start a Linux shell, but nothing happens. This leaves the computer stuck at this stage, no matter how long one waits.

Note that this is an intermittent issue; it is entirely possible that a MacBook Pro would boot correctly any number of times, then turn up this error. Furthermore, it is possible to type "reboot" and have the machine boot properly on the next reboot (or after 5 or 10 such attempts).

There is an easy way to avoid this issue; there are 4 steps to follow:

  • 1.- While logged into Lucid, in the Terminal application, type the following:
    •   sudo gedit /etc/default/grub
    2.- Uncomment the line that reads:
    •   GRUB_DISABLE_LINUX_UUID=true
    3.- Save and Close
    4.- Run the following command:
    •   sudo update-grub


CategoryMac




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 documentation going on.


CategoryMac

MacBookPro5-1_5-2/Lucid (last edited 2013-12-14 00:53:35 by knome)