How to install Ubuntu Gutsy on a MacBook 3,1 generation

My new Ubuntu DesktopI recently bought a wonderful Apple Macbook last generation (Santarosa 3,1) but when I tried to run my best Linux distribution (Ubuntu 7.10 Gutsy Gibbon) I ran into a lot of problems. Almost everything doesn’t work out-of-the-box so I looked at wiki, documentation and Google to find out how to arrange them.
This is my personal guide to install Ubuntu Gutsy and work with all the hardware of the Macbook in Linux, try it at your own risk :)

I don’t care about how to double or triple boot your Macbook, it is just documented in a lot of sites, you can refer to the Ubuntu wiki to how to use rEFIt to double boot Mac OS X and Linux.

This guide is for an Ubuntu Gutsy Gibbon 32 bit installation. I know this Macbook have a 64 bit cpu but I still prefer a 32 bit installation then 64. Why? Because the 32 bit software is better supported and the performance aren’t so different.

If you would like to follow a “semi-official ” Ubuntu way to install your Macbook Santa Rosa with Ubuntu 7.10 (and 8.04 Hardy Heron – 8.10 Intrepid Ibex) please read the Macbook Santa Rosa HOW-TO on Ubuntu community site.

Apple Macbook 3,1 GenerationMacBook technical specifications:

CPU: Intel Core 2 Duo 2,2 GHz
Ram: 2GB
GPU: Intel Graphics Media Accelerator X3100
CD/DVD: 8x slot-loading SuperDrive (DVD±R DL/DVD±RW/CD-RW)

The Hardware:

$ lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
02:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03)
03:00.0 Ethernet controller: Marvell Technology Group Ltd. Marvell Yukon 88E8058 PCI-E Gigabit Ethernet Controller (rev 13)
04:03.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

Kernel:

In order to work your kernel needs to be patched with a lot of patches, I know it is frustrating but today there aren’t other method to run your Macbook 3,1 with Ubuntu and with all the hardware present.

sudo aptitude install linux-source-2.6.22 build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev libncurses5 libncurses5-dev subversion
cd /usr/src
sudo tar xjvf linux-source-2.6.22.tar.bz2
sudo ln -s linux-source-2.6.22 linux

Now you need to apply some patches:

sudo svn co https://mactel-linux.svn.sourceforge.net/svnroot/mactel-linux/trunk/kernel/mactel-patches-2.6.22

cd /usr/src/mactel-patches-2.6.22
sudo ./apply /usr/src/linux

cd /usr/src/linux
sudo wget http://launchpadlibrarian.net/10335284/appletouch-add-macbook3-trackpad.patch

sudo wget http://launchpadlibrarian.net/10540630/hid-add-new-apple-keyboard.patch
sudo wget http://follefuder.org/appleir2622.patch.txt.tar.bz2
sudo tar xjvf
appleir2622.patch.txt.tar.bz2

sudo patch -p1 < appletouch-add-macbook3-trackpad.patch
sudo patch -p1 <
hid-add-new-apple-keyboard.patch
sudo patch -p1 <
appleir2622.patch.txt

Ok now we are ready to compile the new kernel and headers:

cd /usr/src/linux
sudo cp /boot/config-2.6.22-14-generic .config
sudo make oldconfig
sudo make menuconfig

Now go to the Processor type and select Core2duo then go to device drivers -> Sound and mark the Intel HDA module. Save the new config and exit.

sudo make-kpkg clean
sudo make-kpkg -initrd kernel_image kernel_headers modules_image

Wait until the kernel’s packages are ready then install them:

cd ..
sudo dpkg -i linux-image-2.6.22.9*.Custom_i386.deb
sudo dpkg -i linux-headers-2.6.22.9*.Custom_i386.deb

Now you have your kernel patched installed you can reboot to try it but if you are impatient or you have problem to build your own kernel as described here, download and install the packages I compiled for me:

cd /usr/src/
sudo wget http://www.michelem.org/wp-content/ubuntu/linux-image-2.6.22.9_2.6.22.9-10.00.Custom_i386.deb
sudo wget http://www.michelem.org/wp-content/ubuntu/linux-headers-2.6.22.9_2.6.22.9-10.00.Custom_i386.deb

sudo dpkg -i linux-image-2.6.22.9*.Custom_i386.deb
sudo dpkg -i linux-headers-2.6.22.9*.Custom_i386.deb

Reboot.
When you are logged into your Ubuntu with the new kernel installed you are ready to continue with this guide to install the rest of the hardware.

Wireless:

Wireless is a BCM4328, it works only with ndiswrapper, unfortunately due to the new kernel you have to compile the ndiswrapper package too:

cd /usr/src
sudo mkdir bcm4328
cd bcm4328
sudo wget http://kent.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.50.tar.gz
sudo tar xzvf
ndiswrapper-1.50.tar.gz
cd
ndiswrapper-1.50
sudo make uninstall
sudo make
sudo make install

Now we can install the bcm4328 drivers:

wget http://download297.mediafire.com/czzdjrxtjejg/exuymodkstx/bcm4328.zip
unzip bcm4328.zip

sudo ndiswrapper -i bcmwl5.inf
ndiswrapper -l
sudo depmod -a
sudo modprobe ndiswrapper

Sound/Audio

The audio driver is an Intel HDA 82801H, but it doesn’t work out-of-the-box with our Macbook 3,1 because we need the latest alsa packages, so let’s go to compile them too:

cd /usr/src
sudo mkdir alsa
sudo rsync -avz --delete rsync://alsa.alsa-project.org/hg/alsa-driver alsa
sudo rsync -avz --delete rsync://alsa.alsa-project.org/hg/alsa-kernel alsa
cd alsa/alsa-driver
sudo ./hgcompile --with-cards=hda-intel
sudo make
sudo make install
sudo /etc/init.d/alsasound stop


sudo vi /etc/modprobe.d/alsa-base
Append this line:
options snd-hda-intel model=mbp3

sudo modprobe snd-hda-intel

May be you have to reboot your system.
Warning because the master mixer is disabled by default so right click on the volume applet and click on “Open Volume Control”. Enable the master mixer and test your sound.

Apple Touchpad:

In order to be able to use full functions of the Apple Touchpad you need to change your Synaptics Xorg configuration with this:

Section "InputDevice"
# updated 2007-12-07
# use command "synclient -m 1" to see raw output
# common stuff
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"

# not using edge scrolling
Option "HorizEdgeScroll" "0"
Option "VertEdgeScroll" "0"


# use two finger scrolling
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"

# scroll speed, lower is faster
Option "HorizScrollDelta" "10"
Option "VertScrollDelta" "10"

# minimum pressure motion factor
Option "PressureMotionMinZ" "10"

# touch and untouch thresholds, higher numbers if you like to push hard
Option "FingerLow" "10"
Option "FingerHigh" "20" # change to 30 or 40 if like

# borders based on output from synclient
Option "LeftEdge" "20"
Option "RightEdge" "1200"
Option "TopEdge" "20"
Option "BottomEdge" "3
70″

# speeds, smaller number for a slower mouse
Option "MinSpeed" "0.8" # 0.5 is very slow, 1.5 is very fast
Option "MaxSpeed" "1.2" # up to 1.5 works ok
Option "AccelFactor" "0.10"

# tap times, change to suit your tapping habits
Option "MaxTapMove" "100"
Option "MaxTapTime" "100"
Option "MaxDoubleTapTime" "20
0″

# don't change these or two finger tap stops working
Option "TapButton2" "3"
Option "TapButton3" "2"

# must be commented out or normal tapping wont work
#Option "TapButton1" "0"

# needed for disabled while typing fix
Option "SHMConfig" "on"
EndSection

Make sure you have the Synaptics Touchpad string before any other mouse configured in the server layout like this:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Synaptics Touchpad"
InputDevice "Configured Mouse" "SendCoreEvents"
EndSection

This is my full xorg.conf

iSight webcam:

Following the Étienne Bersac howto Built-in iSight Firmware Tools it will work without any problem.

Backlight brightness:

You have to install the xbacklight and it will work great:

sudo aptitude install xbacklight

Video:

The graphic card is an Intel GM965 (X3100) it works out-of-the-box with the latest intel video drivers, but this driver is actually blacklisted in Compiz, so if you try to enable Compiz Fusion your Macbook will refuse it due to lack of XV support when using XAA.
I solved it commenting out the blacklist and using the noxv with gstreamer:

sudo vi /usr/bin/compiz

Comment out the line 60 ( T=”$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12″ # intel 965)

Now launch the “gstreamer-properties” command from a terminal, go to the Video tab and select “X Window System (No Xv)” as Default Output.

This will permit you to watch your videos and use Compiz togheter, but you will use more CPU processor then GPU.

Suspend/Hibernation:

I didn’t test it with the Ubuntu official kernel but with this patched kernel they work very fine!

Functions keys:

If your functions keys don’t work fine, volume controls, brightness etc.. You should install pommed:

sudo aptitude install pommed

This should arrange them.

CD/DVD read & write:

It works out-of-the-box, I suggest you to install the best cd/dvd recording software Brasero:

sudo aptitude install brasero

Apple IR Remote:

It should be works with the patch you downloaded and inserted before in the kernel. If you would like to associate keys with events on main video softwares follow the MacBookPRO wiki page at Ubuntu.com (section Apple Remote Control)

Enjoy your new Apple Macbook with your Ubuntu Linux!

Special thanks to the following links authors:

- Buying a new MacBook? Think twice…
- MacBook on Ubuntu Community help
- MacBook PRO on Ubuntu Wiki
- MacBook PRO SantaRosa on Ubuntu Wiki
- MacBook SantaRosa on Ubuntu Community help

Tags: , , , , , , , , , , , ,

Post simili:

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

22 Responses to “How to install Ubuntu Gutsy on a MacBook 3,1 generation”
  1. iPhone iPad iPod MacBook - Cool MacBook images
    13:57 on April 7th, 2013

    [...] My White Macbook Image by MicheleM_ How to install Ubuntu Gutsy on a MacBook 3,1 generation [...]

  2. iphone repair crawley
    00:57 on October 2nd, 2011

    Its such as you read my thoughts! You appear to understand so much approximately this, such as you wrote the ebook in it or something. I feel that you could do with a few percent to force the message house a bit, however instead of that, this is wonderful blog. A fantastic read. I’ll definitely be back.

  3. definisi3
    05:14 on September 25th, 2011

    A lot of thanks for your own work on this web site. Gloria take interest in engaging in investigations and it\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s really easy to see why. I notice all relating to the dynamic tactic you render priceless steps through the blog and therefore inspire contribution from the others on the area so my child is undoubtedly learning so much. Take pleasure in the remaining portion of the new year. You are always doing a useful job.

  4. Definisi1
    05:13 on September 25th, 2011

    I enjoy you because of all your work on this website. Kate takes pleasure in getting into research and it is obvious why. Most of us notice all regarding the dynamic form you make great thoughts by means of the web site and in addition encourage response from some others about this concept then our child is now learning a lot. Take advantage of the remaining portion of the year. You are always performing a pretty cool job.

  5. Trojan Remover
    12:30 on August 23rd, 2011

    whoah this blog is magnificent i really like reading your articles. Keep up the great work! You already know, many persons are searching around for this information, you could aid them greatly.

  6. Cool MacBook images | iPhone blogging
    08:16 on April 3rd, 2011

    [...] Ubuntu on Macbook Image by MicheleM_ How to install Ubuntu Linux on an Apple Macbook Santarosa [...]

  7. MacBook Pro (Fuente: faq-mac.com) | iPhone blogging
    06:58 on April 3rd, 2011

    [...] White Macbook Image by MicheleM_ How to install Ubuntu Gutsy on a MacBook 3,1 generation Share this on: Mixx Delicious Digg Facebook Twitter [...]

  8. Used Macbooks
    13:07 on October 17th, 2009

    Thanks for all the patches that you have posted here.Those are really nice and I loved them as much as I can.Hope this mac book works at its best efficiency level.

  9. Bob Tran
    03:47 on January 2nd, 2009

    Compliments. That’s a very well written Ubuntu OS installation guide. I’m sure a lot of Mac computer lovers will like it.

  10. Joe
    04:19 on April 28th, 2008

    Where did you find that wallpaper? I really like it.

  11. odo_
    01:56 on April 8th, 2008

    hi, great guide.
    i wanted to ask if you are experiencing some strange keyboard behavour after a while of using, this happens to me at the same time the dvd drive stops working.

    i will try your kernel

    thanks

  12. shriek
    21:27 on April 2nd, 2008

    GREAT GUIDE!!! Thanks a lot!

  13. rudi
    17:07 on March 19th, 2008

    Compliments. Very nice guide. There is only one question:

    I wanna use dualscreen mode. I have a Mini-DVI-to-VGA Adapter to use the external monitor (a TFT). How do I configure it?

    I tried this guide:
    http://ubuntuforums.org/showthread.php?p=1773624

    But when I boot with both monitors the kdm does not start.

    When I boot without external monitor and plug in the monitor later and press Ctrl+Alt+Backspace it starts with swapped resolutions. The external has 1280×800 and the internal 1280×1024.

    Any ideas???

  14. Tomas
    00:02 on February 21st, 2008

    Thanks so very much!

  15. Diego
    03:18 on January 8th, 2008

    Hi Michele,
    did you manage to compile 2.6.23 kernel on macbook? I see mactel repository has a lot more patches for this kernel version, I think now you won’t need others.
    If you installed it already, did you lost some functionality? I’m compiling it right now…

  16. Oriol
    14:41 on January 6th, 2008

    Ah! And thanks for this nice guide.

  17. Oriol
    14:04 on January 6th, 2008

    Ian Ohr, I think that you must instal autoconf:
    $ sudo aptitude install autoconf
    But you must apply the patch to the kernel. If not you will obtain another error.

  18. Sergey
    00:09 on January 1st, 2008

    Thank you for good guide!))
    What’s about S2RAM?
    Is it working for you?

  19. Ian Ohr
    19:00 on December 27th, 2007

    I am at the stage of getting the audio drivers working. I have rsynced both directories, but when I run the:
    $sudo ./hgcompile –with-cards=hda-intel
    It gives these errors:
    ./hgcompile: line 42: aclocal: command not found
    ./hgcompile: line 43: autoconf: command not found
    ./configure –with-cards=hda-intel
    ./hgcompile: line 45: ./configure: No such file or directory

    And it is correct, there is no configure script in the directory. How can I get the version of the directories that you downloaded at the time you wrote this tutorial?

  20. Nicho
    02:45 on December 22nd, 2007

    SOOOOOO MUCH THANKS, I’ve been reading all the pages from the links section, and get confused a lot, cause I can’t really tested on a MacBook, since I’m just about to buy one, but is relieving seeing someone that all ready configure one, and very well explained, even the DEB packages, man, you’re AWESOME,thanks.

Leave a comment

(required)

(required)


*

Comments links could be nofollow free.

Categories