MacBook 5,2 and Ubuntu 10.04 (Lucid)

This page aims to describe the steps needed, to fully enable all features of the 5.2 White Macbook (release date: early 2009) when using Ubuntu 10.04, Lucid. You can check here if you own this model: on wikipedia, on apple.com

You can find out what model you have in OSX, System Profiler

If you have a different model, please go https://help.ubuntu.com/community/MacBook 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/warning.png

    Suspend

    IconsPage/ok.png

    Hibernate

    IconsPage/dont.png

    Shutdown

    IconsPage/ok.png

    ACPI, power management, etc

    IconsPage/ok.png IconsPage/info.png

    Shell/CTRL-ALT-Fn

    IconsPage/warning.png

    Reboot

    IconsPage/dont.png

    Desktop Effects (Compiz)

    IconsPage/ok.png IconsPage/info.png

    Keyboard functions (Brightness,volume,...)

    IconsPage/warning.png

    CD/DVD Writing

    IconsPage/ok.png

    Bluetooth

    IconsPage/ok.png

    External Monitor

    IconsPage/ok.png IconsPage/info.png

    Wireless (AirPort)

    IconsPage/ok.png IconsPage/info.png

    iSight

    IconsPage/ok.png IconsPage/info.png

    Touchpad (appletouch)

    IconsPage/ok.png IconsPage/info.png

    Apple Remote Control

    IconsPage/ok.png IconsPage/info.png

    Firewire

    IconsPage/question.png

IconsPage/ok.png (works out-of-the-box)
IconsPage/ok.png IconsPage/info.png (works perfectly, but needs a little job)
IconsPage/warning.png (works, with remarks)
IconsPage/dont.png (won't work - please post if you have hints)
IconsPage/question.png (not yet documented - please post if you can test)

Basic Installation Instructions

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

Wireless (AirPort)

To enable wireless you need to install the restricted Broadcom STA driver. Open System -> Administration -> Hardware Drivers and choose Broadcom Sta.

Desktop Effects (Compiz)

You probably want to enable the proprietary graphics driver. Go to System -> Administration -> Hardware Drivers and choose the NVIDIA accelerated graphics driver (latest version).

Touchpad

thanks to http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;att=0;bug=576456

You should disable the mouse plugin in gnome-settings-daemon, since gnome-control-center can't handle every possible touchpad setting via gnome-mouse-properties. Open a terminal and type

gconftool-2 --type boolean --set /apps/gnome_settings_daemon/plugins/mouse/active false

Then, create this file: /etc/hal/fdi/policy/99-x11-synaptics.fdi

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
       <merge key="input.x11_options.Device" type="string">/dev/psaux</merge>
       <merge key="input.x11_options.Protocol" type="string">auto-dev</merge>
       <merge key="input.x11_options.SendCoreEvents" type="string">true</merge>
       <merge key="input.x11_options.LeftEdge" type="string">100</merge>
       <merge key="input.x11_options.RightEdge" type="string">1120</merge>
       <merge key="input.x11_options.TopEdge" type="string">50</merge>
       <merge key="input.x11_options.BottomEdge" type="string">310</merge>
       <merge key="input.x11_options.FingerLow" type="string">5</merge>
       <merge key="input.x11_options.FingerHigh" type="string">20</merge>
       <merge key="input.x11_options.MaxTapTime" type="string">100</merge>
       <merge key="input.x11_options.MaxTapMove" type="string">150</merge>
       <merge key="input.x11_options.MaxDoubleTapTime" type="string">180</merge>
       <merge key="input.x11_options.VertScrollDelta" type="string">20</merge>
       <merge key="input.x11_options.HorizScrollDelta" type="string">50</merge>
       <merge key="input.x11_options.MinSpeed" type="string">0.49</merge>
       <merge key="input.x11_options.MaxSpeed" type="string">0.78</merge>
       <merge key="input.x11_options.AccelFactor" type="string">0.0010</merge>
       <merge key="input.x11_options.LockedDrags" type="string">false</merge>
       <merge key="input.x11_options.TapButton1" type="string">1</merge>
       <merge key="input.x11_options.TapButton2" type="string">3</merge>
       <merge key="input.x11_options.TapButton3" type="string">2</merge>
       <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>
       <merge key="input.x11_options.HorizTwoFingerScroll" type="string">false</merge>
       <merge key="input.x11_options.FastTaps" type="string">true</merge>
       <merge key="input.x11_options.VertEdgeScroll" type="string">false</merge>
       <merge key="input.x11_options.HorizEdgeScroll" type="string">false</merge>
       <merge key="input.x11_options.SHMConfig" type="string">true</merge>

      </match>
    </match>
  </device>
</deviceinfo>

If you want you can change these settings in order to reach your preferred config. Check man synaptics to find all options and tuning.

Keyboard functions

Volume Up, Volume Down, Volume Mute, Eject will work out-of-the-box.

Adjusting the screen brightness works out of the box with the default free graphics driver. But when you install the restricted NVIDIA graphics driver, it won't work.

There is a repository https://launchpad.net/~mactel-support/+archive/ppa with the package nvidia-bl-dkms, but this don't work for me.

ACPI, power management, etc

..now writing..

Shell/CTRL-ALT-Fn

Switching to shell with CTRL-ALT-Fn will work only with defaults free graphics driver. With NVIDIA proprietary drivers this won't work. If anyone has a solution, please post.

External Monitor

Works fine with proprietary NVIDIA graphics driver, you just need to configure it with the nvidia-settings tool - no reboot is needed. You can find it in System -> Administration.

Sound and Headphones

I get these working only with some settings in file /etc/modprobe.d/options - you may need to create it.

If you use this, you get poor sound quality but headphones working (you need to reboot)

options snd_hda_intel model=mbp3 power_save=5

If you don't want to reboot, you can:

  • close all audio applications
  • unload the module snd-hda-intel typing a couple of times in a terminal

sudo killall pulseaudio && modprobe -r snd-hda-intel
  • and than reload the module with this command

sudo modprobe snd-hda-intel model=mbp3 power_save=5

If you want good audio quality but NO headphones working, you can instead use this in the same file as above, and than reboot - or if you don't want, you can do as before:

options snd_hda_intel model=acer-aspire-7730g power_save=5

Microphone

The internal microphone works with both settings as in the section above.

Suspend/Hibernate

Suspend works out of the box. Hibernate won't work. If someone has some hints, please post :).

Remote Control

You have to install gnome-lirc-properties from repositories, and configure it following the wizard, choosing Apple Mac Mini IR Receiver with Custom remote control. Then go in System -> Preferences -> Infrared Remote Control, unlock the window, choose autodetect and select the IR receiver. Now you can test it: in the bottom of the window, you can see if you remote control works.

Then change the file /etc/lircd.conf.gnome into this:

begin remote
  name             Apple_A1156
  bits             8
  eps              30
  aeps             100
  one              0 0
  zero             0 0
  pre_data_bits    24
  pre_data         0x87EE81
  gap              211982
  toggle_bit_mask  0x0
  ignore_mask      0x0000ff01

      begin codes
          KEY_VOLUMEUP       0x0B
          KEY_VOLUMEDOWN     0x0D
          KEY_PREVIOUSSONG   0x08
          KEY_NEXTSONG       0x07
          KEY_PLAYPAUSE      0x04
          KEY_MENU           0x02
      end codes


end remote

Now, create and make executable two files in your home directory-I created them in the "script" directory: they will let you adjust audio volume from shell: script/volume_up

A=`pacmd dump | grep "set-sink-volume " | cut -d " " -f 3`
B=$((A + 0x01000))
if [ $(($B)) -gt $((0x10000)) ]
 then
    B=$((0x10000))
fi
pactl set-sink-volume 0 `printf "0x%X" $B`

script/volume_down

A=`pacmd dump | grep "set-sink-volume " | cut -d " " -f 3`
B=$((A - 0x01000))
if [ $(($B)) -lt $((0x00000)) ]
 then
    B=$((0x00000))
fi
pactl set-sink-volume 0 `printf "0x%X" $B`

This two scripts are useful to control your audio level from the shell or in a script. If they don't work because you have some esoteric configs, maybe you can adjust them on line 3 - take a look at the output of the command

pacmd dump

in line beginning with "set-sink-volume" and adjust line 3 accordling.

Now, you have to create a file like this (this is my own config, you can change it according to your preferences) in your home directory: .lircrc

begin rhythmbox

begin
prog = Rhythmbox
button = play
config = playpause
end

begin
prog = Rhythmbox
button = pause
config = pause
end


begin
prog = Rhythmbox
button = forward
config = next
end

begin
prog = RhythmBox
button = backward
config = previous
end

begin
prog = RhythmBox
button = fw
config = seek_forward
end

begin
prog = RhythmBox
button = bw
config = seek_backward
end
end rhythmbox


begin
prog = irexec
button = volup
config = $HOME/script/volume_up
repeat = 2
end


begin
prog = irexec
button = voldown
config = $HOME/script/volume_down
repeat = 2
end

begin
prog = irexec
button = play
config = rhythmbox-client
end

begin
prog = irexec
button = menu
config = rhythmbox-client --set-rating 2
end

and last add and enable the command "irexec --daemon" in System -> Preferences -> Session Properties (gnome-session-properties, from shell) - this will run irexec every time you log in into your home session and execute your favourite commands when you press something on your remote control.

With this .lircrc file:

  • Pressing Play/Menu will start rhythmbox, if it is not already running
  • Pressing vol+/vol- will change system volume
  • Pressing Play will play/pause playback, if rhythmbox is running
  • Pressing forward/backward will change song, if rhythmbox is running
  • Pressing menu will rate with two stars the current song, if rhythmbox is running

You can change it as you prefere.


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.



MacBook5-2/Lucid (last edited 2013-12-14 02:10:04 by knome)