This page is still under development

MacBookPro 3,1 and Ubuntu 10.04 (Lucid Lynx) - Beta 1

This page aims to describe the steps needed, to fully enable all features of the 3rd Generation MacBookPro (release date: late 2007) when using Ubuntu 10.04, codename Lucid Lynx.

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.

  • Feature

    Support status

    Sound

    IconsPage/ok.png

    Suspend & Hibernate

    IconsPage/ok.png

    Desktop Effects (Compiz)

    IconsPage/ok.png

    HFS+

    IconsPage/ok.png

    Keyboard layout

    IconsPage/ok.png

    Keyboard functions (Brightness,volume,...)

    IconsPage/ok.png IconsPage/info.png

    CD/DVD Writing

    IconsPage/ok.png

    Bluetooth

    IconsPage/ok.png

    External Monitor

    IconsPage/ok.png

    Wireless (AirPort)

    IconsPage/ok.png

    iSight

    IconsPage/ok.png

    Touchpad (appletouch)

    IconsPage/ok.png

    Mic

    IconsPage/ok.png

    Apple Remote Control

    IconsPage/question.png

    Firewire

    IconsPage/ok.png

    Position sensor

    IconsPage/ok.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

Suspend & Hibernate

If your screen remains blank when waking from sleep then you may need to install the proprietary NVIDIA graphics card driver. This can be done by going to Hardware Drivers in the Administration menu.

Keyboard functions (Brightness,volume,...)

By default functions keys are usable with the fn key. That means that when using F1 you get Brightness down and if you want F1 you should use simultaneously fn and F1.

If you want to get the opposite (functions keys first) you should pass an option to hid-apple module:

sudo echo options hid-apple fnmode=2 >/etc/modprobe.d/hid-apple.conf
sudo update-initramfs -u -v -k `uname -r`

Keyboard brightness is not managed out of the box. If you want that feature you need to install pommed package and configure it as needed:

sudo apt-get install pommed
sudo gedit /etc/pommed.conf

Alternatively if you do not wish to have the pommed daemon running (its brightness / audio controls can interfere with Ubuntu's builtin ones) you can create your own program to increase / decrease keyboard brightness and bind it to the f9 & f10 keys.

Copy the code below into a new file and call it kbdbrightup.c

At the terminal, compile it using "gcc kbdbrightup.c -o kbdbrightup"

sudo mv kbdbrightup /usr/bin

sudo chown root:root /usr/bin/kbdbrightup

sudo chmod 4777 /usr/bin/kbdbrightup

Then go to System > Preferences > Keyboard Shortcuts and "Add" a new shortcut.

Call it "Increase Keyboard Brightness", command "kbdbrightup".

Assign the F10 key (on Macbook Pro 3,1) to this new keyboard shortcut.

Based on the code below, it will increment the keyboard brightness by stages of 5, up to the maximum of 255.

#include <stdio.h>
#include <stdlib.h>

void main()
{

    FILE *ret;
    char string[10];
    int brightness;

    ret = fopen("/sys/class/leds/smc::kbd_backlight/brightness","r");


    if (ret)
    {
        fgets(string,10,ret);
        printf("String is: %s\n", string);
        fclose(ret);
    }
    else
    {
        printf("Error opening keyboard brightness file.\n");
        exit(0);
    }

    brightness = atoi(string);

    brightness += 5;

    if (brightness > 255)
    {
        brightness = 255;
    }

    sprintf(string,"%d",brightness);
    printf("string,brightness:%s,%d\n",string,brightness);

    ret = fopen("/sys/class/leds/smc::kbd_backlight/brightness","w+");
    if (ret)
    {
        fputs(string,ret);
        fclose(ret);
    }
    else
    {
        printf("Could not open brightness file.\n");
    }
}

Now, the below code does the reverse, it reduces the keyboard brightness down to the lowest value, zero (i.e. off).

Copy the code below into a new file and call it kbdbrightdown.c

At the terminal, compile it using "gcc kbdbrightdown.c -o kbdbrightdown"

sudo mv kbdbrightdown /usr/bin

sudo chown root:root /usr/bin/kbdbrightdown

sudo chmod 4777 /usr/bin/kbdbrightdown

Then go to System > Preferences > Keyboard Shortcuts and "Add" a new shortcut.

Call it "Decrease Keyboard Brightness", command "keybrightdown".

Assign the F9 key (on Macbook Pro 3,1) to this new keyboard shortcut.

#include <stdio.h>
#include <stdlib.h>

void main()
{

    FILE *ret;
    char string[10];
    int brightness;

    ret = fopen("/sys/class/leds/smc::kbd_backlight/brightness","r");


    if (ret)
    {
        fgets(string,10,ret);
        printf("String is: %s\n", string);
        fclose(ret);
    }
    else
    {
        printf("Error opening keyboard brightness file.\n");
        exit(0);
    }

    brightness = atoi(string);

    brightness -= 5;

    if (brightness < 0)
    {
        brightness = 0;
    }

    sprintf(string,"%d",brightness);
    printf("string,brightness:%s,%d\n",string,brightness);

    ret = fopen("/sys/class/leds/smc::kbd_backlight/brightness","w+");
    if (ret)
    {
        fputs(string,ret);
        fclose(ret);
    }
    else
    {
        printf("Could not open brightness file.\n");
    }


}


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.



MacBookPro3-1/Lucid (last edited 2013-12-14 10:07:00 by knome)