PLEASE DO NOT EDIT THIS PAGE

You should be using this page for documentation https://help.ubuntu.com/community/MacBook5-1/Intrepid

Introduction

This guide will help you through all the steps necessary for installing Ubuntu on the late 2008 Aluminum unibody MacBook (MacBook5,1). This guide is currently aimed at Ubuntu 8.10 (Intrepid Ibex).

Work on trackpad (and other) functionality is occurring now, and can be tracked at this forum thread.

Where this guide states 'Works out of the box', extra packages may need to be installed, but require no further configuration.

Basic Instructions

* rEFIt 0.12 supports the MacBook and MacBook Pro Aluminum.

* Read also waldobeer's post on the forums here:

"rEFIt 0.11 currently will not boot another partition. However the subversion repository for rEFIt has updates that appear to support the new hardware. No idea when the new version will be build/released, so I ended up using rEFIt for the partition tool, then booting into ubuntu by holding down alt during boot and selecting the "Windows" drive.

I installed the 32-bit Ubuntu 8.10 beta. The regular install cd appeared to work just fine, but I ended up using the alternative cd (stupidly hoped for LVM). To make the alternative cd boot, I had to disable the framebuffer with the "nofb" option, otherwise it would hang on a black screen before install."

Installing and Booting

For those wondering about the install process and the possible non-boot issue here is how I fixed it. No guarantee this will work for all.

Installing is probably best done by first using the Apple Boot Camp utility to partition. The utility assumes you will be installing windows so ignore the step about windows drivers. Just partition for the size you want. There is more info on installing here but it may be a bit out of date.

Once that is done, reboot with the Ubuntu CD in the drive and hold down the "c". Once booted, install. On the partitioning step, choose manual and then create both an ext3 partition for / and a swap partition. Make sure you don't delete the OS X partition. This gave me /dev/sda3 for / and dev/sda4 for swap. It will probably be similar for others. On the last step, I chose advanced and pointed grub at /dev/sda3. I'm not sure if that is the best approach but it worked. Given that other tools will manage the dual boot, it seems prudent to let grub just manage Ubuntu. If others have more info on this please edit appropriately. Install.

If you are like me, once you finish the install and reboot, you won't be able to boot Ubuntu. This is probably a bug and may eventually be fixed. Normally you hold the option key and it will give you two choices: OS X and "windows" which is what the mac calls the partition regardless of what is installed there. The fix seems to be installing rEFIt. Once you do that, reboot and choose the partition tool and sync. That should fix it. If it freezes when trying to boot Linux do a complete shut down and start up. That fixed it for me. More info http://ubuntuforums.org/showthread.php?t=767677

If you want, you can leave rEFIt installed as it's a very nice boot loader and you get an apple and a tux icon rather than the "windows" option. However, you can also remove it and let the mac boot camp tool manage the dual boot. It seems both approaches work fine.

Things working out of the box

Sensors

  • One motion sensor

  • Ambient light sensor

  • Two fan sensors

  • 20 temperature sensors

CD/DVD Writing

Writing CD/DVDs works with GnomeBaker (though not with Gnome's CD/DVD Creator).

Wireless

Bluetooth

Note (by Nikos.Alexandris): Did not succeed to connect two computers or to browse a device yet!.

Succeeded to connect to bluetooth device after resetting hci device. (by geekaholic)

sudo hciconfig hci0 reset

Suspend

(tested with gnome-power-manager)

iSight

(tested with Ekiga)

Package Support for Intel Macs

Add these lines to /etc/apt/sources.list:

deb http://ppa.launchpad.net/mactel-support/ubuntu intrepid main
deb-src http://ppa.launchpad.net/mactel-support/ubuntu intrepid main

Then install the packages hal-applesmc and applesmc-dkms (System > Administration > Synaptic Package Manager > Search). Edit /etc/modules to include 'applesmc' on a new line. Since the packages in the PPA can change quite a bit, please check here to make sure there are not other packages you should install for your hardware.

Trackpad

Left-click, basic trackpad and two-finger vertical scrolling work out of the box. Work on right-click, multi-touch etc is progressing. See this forum thread

Copy the settings in /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi over to /etc/hal/fdi/policy/ and change them there.

sudo cp /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi /etc/hal/fdi/policy/
gksudo gedit /etc/hal/fdi/policy/11-x11-synaptics.fdi

Add whatever options you prefer, such as the following:

  <merge key="input.x11_options.TapButton1" type="string">1</merge>
  <merge key="input.x11_options.SHMConfig" type="string">True</merge>

Video

Works using restricted drivers for nvidia 177.

MacBook Dual Head Setup

Here is a dual head configuration for the normal (non-Pro) Aluminum MacBook using the restricted nvidia 177.82-0ubuntu0.1 driver. 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

MacBook PRO Dual Head Setup

Using the restricted nvidia driver 177.80, one can setup 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.

Comment by Nikos.Alexandris: BASIC INSTRUCTIONS: TO BE ADDED

* 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 9600M GT"
    BusID          "PCI:2:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600M GT"
    BusID          "PCI:2:0:0"
    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

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

Sound

With the following line in /etc/modprobe.d/options, the headphone port will work, but the built-in speakers don't.
IconsPage/important.png NOTE: The file /etc/modprobe.d/options no longer exists in newer versions of Ubuntu. It is still supported by the kernel, however the filename needs the .conf extension, i.e. /etc/modprobe.d/options.conf would be the file you create to save your options. Actually the filename doesn't matter as long as the .conf extension is used.

options snd_hda_intel model=mbp3

Managed to get internal speakers working by upgrading alsa to version 1.0.18 using the script provided in http://ubuntuforums.org/showthread.php?t=962695. This can also be accomplished by downloading libasound2, alsa, and it's associated dependencies from jaunty and installing with dpkg. Before rebooting, you must add the option shown above to /etc/modprobe.d/options. After successful installation reboot and start alsamixer in your gnome-terminal. Set all up Master, PCM, Line-Out and switch from 2ch to 6ch. At last call "sudo alsactl store". Enjoy your internal speakers!

You can also use alsa 1.0.19 just released. But left speaker is muted like in 1.0.18 :-(. I think we must wait for mbp5 instead of mbp3 model in alsa config... You can find pulsaudio tutorial here to use skype and other software: http://www.pulseaudio.org/wiki/PerfectSetup

Microphone

The built-in microphone works using (in the Volume Control dialog) the HDA NVidia device.

  • In the Recordings tab activate audio recording for example in the first Capture column.
  • In the Options tab set Front Mic to be the first Input Source.

Remote Control

sudo apt-get install gnome-lirc-properties

Screen brightness adjustment

Works only in text-mode

  • This can be done by applying the package mbp-nvidia-bl-dkms from the mactel PPA.

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

switch to text-mode using (CTRL+ALT+F1).

echo 1 | sudo tee /sys/class/backlight/mbp_backlight/brightness

Switch back to X (ALT+F7) & enjoy longer battery life!

Hopefully we can get the Brightness keyboards (Fn1&2) & interaction with the ambient sensor working later on.

See this thread for more information.

Works in Xorg and text-mode (1)

  • This can be done by applying the package nvidia-bl-dkms from the mactel PPA.

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

Finally add the line nvidia_bl shift=2 to /etc/modules.

Works in Xorg and text-mode (2)

To adjust backlight, you can install latest CVS version of Nvclock.

Install Nvclock

  • download the source

cvs -d:pserver:anonymous@nvclock.cvs.sourceforge.net:/cvsroot/nvclock login

(press enter at password request)

cvs -z3 -d:pserver:anonymous@nvclock.cvs.sourceforge.net:/cvsroot/nvclock co -P nvclock
  • compile:

cd nvclock

./configure

If you have the error:

X11 required for nvcontrol support

Try with:

./configure --disable-nvcontrol

In any case, continue with:

make

sudo make install

Use Nvclock

Adjust backlight in a terminal with:

nvclock -S 15

You can use a percentage value (min 15, max 100) or a delta one, for example:

nvclock -S +10

Script to save & restore backlight level

If you want, you can use a init script to save & restore backlight level at boot/shutdown:

  • Create a new file:

sudo gedit /etc/init.d/backlight-set
  • Copy in it this code:

#!/bin/sh

# Save & restore backlight level
#

case "$1" in
    start)
        HOME=/root /usr/local/bin/nvclock -S `cat /root/.backlight`
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        HOME=/root /usr/local/bin/nvclock -i | grep Backlight | awk '{print $3}' > /root/.backlight
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac
  • Make it executable:

sudo chmod +x /etc/init.d/backlight-set
  • Add to runlevel:

sudo update-rc.d backlight-set defaults
  • Keyboard keys

If you want to use F1 and F2 keys with nvclock under X11, you can modify hal scripts. Edit /usr/lib/hal/scripts/linux/hal-system-lcd-set-brightness-linux and add this lines before after comments

if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "general" ]; then
    brt=`expr $value \* 100 / 15`
    logger "BRT $brt"
    /usr/local/bin/nvclock -S $brt
fi

Known issues

File all known issues here. If you have any input to the issue, please start a forum thread so we can gather information to get it fixed!

  • Short battery life (less than 2 hours!) under Ubuntu comparing with OSX. Comment: should improve by being able to change brightness, but it's not even close to OSX performance.

  • PowerTOP reports that the module for the 10/100/1000 interface wakes the processor 100+x/sec, accounting for >50% of wakeups on an idle system. This dramatically shortens battery life. One potential solution is to unload this module if you only use wireless.

  • MB5,1 get hotter in linux than in OSX

  • The system hangs sometimes while booting/shutting-down. Comment: Using the nvidia driver 177.80 on the MacBook Pro Aluminum, the system rarely hangs during the shutdown process.

  • Rebooting doesn't work. The computer stops just before reboot with the screen blank, but still active. Occasionally the screen is blank and also the internal speakers give out three or four short signals.
  • Sound is still not working even through head phones using instructions given.
  • I didn't install rEFIt before installing Ubuntu, and I accidentally installed GRUB to the MBR (default installation). This way I ended up with no bootable system at all. I could start into Ubuntu by inserting the CD and hitting the "Start from first hard disk" option, but there was no way to get into OS X (tried different possibilities with the OS X installation disc). Solution for me was to download the rEFIt ISO image in Ubuntu and burn it to a CD. Booting from that CD, I was able to resync my partition tables and boot into any OS. The next time I would prefer to install rEFIt beforehand and put GRUB into the Ubuntu partition Wink ;)


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

MacBook Aluminum (last edited 2013-12-14 02:23:53 by knome)