Introduction

Information on getting Ubuntu 7.10 to work on the new Santa Rosa MacBook v3.1 and 4.1. This page is just starting out so please add any helpful information. This is a good thread to read: http://ubuntuforums.org/showthread.php?t=610375 pay attention to user Seq's posts.

For additional information when using Ubuntu 8.10 (Intrepid Ibex), please refer to MacBook/SantaRosa on the wiki.

This guide assumes you are using the amd 64 bit version of Ubuntu 7.10.

There is a general MacBook guide at: https://help.ubuntu.com/community/MacBook however many of the recommendations do not work with the Santa Rosa version.

How to install Ubuntu Gutsy on a MacBook

This guide will help you through all the steps necessary for installing Ubuntu on a MacBook. This guide is currently aimed at Ubuntu 7.10 (Gutsy Gibbon).

For an updated explanation of how to install wireless on Macbook Santa Rosa on Ubuntu 8.04 (Heron), please go here: https://help.ubuntu.com/community/Macbook8%2e04?highlight=%28Macbook%29

Basic instructions

  1. Update the firmware to the latest version. If you prefer, you may use the standard "Software Update".

  2. Get your Ubuntu Live CD ready.

  3. Install rEFIt] if you want a boot menu (to select between OS X/Ubuntu) to appear on every boot. You can make Ubuntu boot by default and change the menu timeout by editing the "refit.conf" file (described on the above website).

  4. If necessary, use Boot Camp to resize your OSX partition and make space for Ubuntu. Don't waste a CD creating a Windows driver disk. Reboot.
  5. Hold down "C" to boot from the CD.
  6. Install ubuntu as usual, except:
    • In the partitioner, select Manually edit partition table

    • Delete /dev/sda3 and /dev/sda4 if they exist
    • Create a new ext3 partition for your root
    • Mount the newly created ext3 partition on '/'
    • Note that Boot Camp will cause problems if you make more than two partitions in total. So don't add a swap partition. We will later add a swap file.
  7. Finish the install and reboot.
  8. If you installed rEFIt, you should have a choice between booting OS X and Linux. Use the arrow keys and Enter to select Linux.
  9. Alternatively, if you did not install rEFIt, hold down Alt/Option to choose whether to boot into OSX / Ubuntu. Ubuntu is called "Windows".
  10. Log in on your system.
  11. Follow the steps in the sections below to work around things that still not work out of the box in Gutsy.

Adding a swap file

First create the swap file with 1024MB (1024 x 1024 = 1048576)

sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576

Setup Linux swap and turn it on

sudo mkswap /swapfile1
sudo swapon /swapfile1

Edit the /etc/fstab

sudo gedit /etc/fstab

and add this line to your /etc/fstab

/swapfile1 swap swap defaults 0 0

Fix Touchpad

Backup and edit xorg.conf:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo gedit /etc/X11/xorg.conf

There is an "InputDevice" section with the following line:

Identifier      "Synaptics Touchpad"

Replace that Section 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" # set to 0 if you don't want horizontal scrolling
        
        # 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 you like

        # borders based on output from synclient
        Option          "LeftEdge"              "20"
        Option          "RightEdge"             "1200"
        Option          "TopEdge"               "20"
        Option          "BottomEdge"            "370"

        # 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"      "200"
        
        # 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

This will give you a OS X like feel. You can right click by tapping two fingers. The two finger scroll also works.

For the changes to take effect you need to log out and log in again.

You may also find the following blog post helpful: The Least Bad Synaptics Configuration for a MacBook Running Ubuntu

Disable Touchpad While Typing

To disable the touchpad while your typing read: http://ubuntuforums.org/showthread.php?t=271052 this guide uses the command

syndaemon -i 1 -d

which disables the touchpad for 1 second after you type something. This works well but if you go back and forth a lot it can be a hassle to wait that one second.

This guide http://ubuntu.wordpress.com/2006/09/20/disable-touchpad-temporarily-when-typing/ uses the command:

syndaemon -t -d

which disables tapping motions but not movement while typing.

Both work fine, and the one that works best for you will likely be determined by the type of computing you do. Try them both and decide for yourself.

Note that you have to change your xorg.conf to make this work:

Add

Option "SHMConfig" "on"

to the Section "InputDevice" and restart the xserver. If this does not work, make sure you have the following lines in your xorg.conf

Section "Module"
        # your modules ....
        Load    "synaptics"
EndSection

Type in synclient -l to ensure that the syndaemon works.

Fix Firefox Scrolling Issue

Firefox is a great browser but it has a bit of a hiccup when it comes to horizontal scrolling. By default it interprets horizontal scrolling as forward/back commands. To fix this type about:config in the address bar and change these two lines (click lines to edit). This is not a specific issue to the Santa Rosa version but its a common problem and an easy fix.

Wireless Setup

Unfortunately this revision of the macbook uses the Broadcom 4328 for wireless. This is currently completely unsupported via the bcm43xx driver, leaving Linux users with no native support. This affects many machines other than the macbook, so hopefully native support will one day exist.

To get wireless functionality, one must currently use ndiswrapper in conjunction with a Windows driver. Install ndiswrapper through aptitude

sudo aptitude install ndiswrapper-utils-1.9

For those who are using Ubuntu Hardy Heron (8.04) the above step will not work, because Heron has a newer version of ndiswrapper. Just go to "Add/Install apps" and search for ndiswrapper. Install it, and follow the rest of the steps below.

Download the driver using the Dell ftp's site that have the file we need

wget http://ftp.us.dell.com/network/R151517.EXE
mkdir driver
unzip -a R151517.EXE -d driver/
cd driver/DRIVER/

then install it

sudo ndiswrapper -i bcmwl5.inf
sudo ndiswrapper -l
sudo ndiswrapper -m
sudo modprobe ndiswrapper

For anyone typing in the above statement (bcmw15.inf), it is not fifteen but L and 5.

Then, to make ndiswrapper auto load on startup, just do that: open the startup list with that

sudo gedit /etc/modules

Then, add ndiswrapper down the list; it will look like that:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
mousedev
psmouse
ndiswrapper

Hardy 8.04 beta read this https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/197558 to get wireless working.

Wireless propietary driver installation

Download the source and propietary lib, http://www.broadcom.com/support/802.11/linux_sta.php. Make a temp dir and untar it:

mkdir hybrid_wl
tar -vxzf hybrid-portsrc-xxx.tar.gz hybrid_wl/

Now, we need to compile the module.

cd hybrid_wl/
make -C /lib/modules/`uname -r`/build M=`pwd` clean
make -C /lib/modules/`uname -r`/build M=`pwd`

The next step is remove and blacklist the b43, bcm43xx, ndiswrapper... adding that lines to /etc/modprobe.d/blacklist

blacklist bcm43xx
blacklist b43
blacklist ndiswrapper

Remove modules.

sudo rmmod bcm43xx
sudo rmmod b43
sudo rmmod ndiswrapper

In hybrid_wl dir, now we have the compiled module: wl.ko. We have to enable it.

sudo modprobe ieee80211_crypt_tkip
sudo insmod hybrid_wl/wl.ko

And copy to the correct dir:

sudo cp hybrid_wl/wl.ko /lib/modules/`uname -r`/volatile_bcmwl/wl.ko

Edit the /etc/modules file. Delete other wireless modules and add wl.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
mousedev
psmouse
#ndiswrapper
#b43
wl

Fix a Brightness bug after Suspension

If you suspend the MacBook, when you restore it, you will have a working machine with no light on the monitor. o fix that open the command line and type that:

sudo gedit /etc/default/acpi-support

then, UNCOMMENT the line that says:

DOUBLE_CONSOLE_SWITCH=true

Fix Sound

Sound is supported, but has detection trouble. This is bug 162347 on launchpad.

To resolve, add the following to /etc/modprobe.d/options:

options snd_hda_intel model=mbp3

On Hardy, after making this change you need to enable your speakers... http://zepsling.wordpress.com/2008/05/03/enable-macbook-sound-in-hardy/

Fix Function Keys

Pommed is a daemon to support extra keys on apple computers. These include brightness, eject, and others.

The current release of pommed does not support the macbook, but support exists in the svn version. You can build from svn head yourself, or use a pre-built package. If you are using the ppa from the kernel steps, an updated pommed package is available.

Install with this command:

sudo apt-get install pommed

You can check your pommed version number with this command:

pommed -v

I currently have pommed v1.13 rev:407 (The package is versioned 1.12~dfsg-svn412 so as to be superseded by an official 1.13 package). As of 2007-12-14 the 2 brightness keys, 3 volume keys, and eject key seem to be working.

Default behaviour on apple keyboards is to have the top row keys primarily function is as media keys (brightness, volume, etc), and have the expected function keys (F1, F2, etc) accessible with the fn keys. To reverse this behaviour either:

  1. edit /etc/pommed.conf by changing the value of fnmode or
  2. add the following lines to /etc/rc.local and decomment the appropriate line

 # Inverted fn key behavior for MacBooks

#echo -n 0x02 > /sys/module/hid*/parameters/*fnmode #FN off (press fn for volume/brightness/etc) 

 # Default fn key behavior for Macbooks

# echo -n 0x01 > /sys/module/hid*/parameters/*fnmode #FN on (like OSX)

Built-in iSight Webcam

https://help.ubuntu.com/community/AppleiSight

Other Informations

If you are still having problems, try the installer for the module in the forums: http://ubuntuforums.org/showthread.php?p=2957042

Apple Remote Control

http://ubuntuforums.org/showpost.php?p=3769567&postcount=2

External Monitor Connection

Virtual 2880 1200

When saved reboot the macbook or restart the X server by logging out and back in. When logged again connect your external monitor to your macbook and execute the command:

xrandr --output LVDS --output TMDS-1 --mode 1600x1200 --right-of LVDS

Et voila!

Compiz Fusion

Compiz is not available because the x3100 video card is on compiz's blacklist. By the way, I am able to use it gratefully even videos! Currently, the X3100 currently does not support the Xv extension when used in conjunction with a compositor. Xv is commonly used to play videos, but can possibly be used for other effects. After installing ubuntu, I will put infos to deactivate XV to be able to play videos using GNOME MPLAYER. ONLY GNOME MPLAYER!

To enable anyway, you must instruct compiz to skip blacklist checks. (Thanks to forum user Amaranth in this thread)

mkdir -p ~/.config/compiz/ && echo SKIP_CHECKS=yes >> ~/.config/compiz/compiz-manager

After that, install the advanced utility to control compiz with that command:

sudo apt-get install compizconfig-settings-manager

Now, let's change gstreamer to be able to reproduce videos:

gstreamer-properties

A windows will open, go to Video section, then, under "Default output", click on the plugin section and choose " X Window Server (without Xv) ". Then click on close button.

HFS+ support

I am not able to work usefully on my Mac Os partition. By the way, these kind of MacBooks comes Out with OS 10.5 Leopard and for my experience is not able to use that system without Journaling feature. I tried to de-activate it using disk utils but I had no results. I also tried changing permission on the folder that ubuntu is not able to manage but nothing changed. Its frustratin to know that ubuntu has by default the implementation of Ntfs support for windows partition but not for that. Any support will be appreciated.

You can drag and drop files to the user's drop box which is in the public folder. Any help regarding the change of permissions of Macintosh HD may let us write direcly to the drive's root.

Known Problems

Add stuff you know doesn't work here, or you you know a fix for something listed here please share. The mactel-support PPA should be a point of reference, allowing you to check and report bugs particular to intel macs.

High Temperatures

Resume from suspend sometimes fails

See: https://bugs.launchpad.net/mactel-support/+bug/205072

Headphone socket does not silence MacBook speakers

See: https://bugs.launchpad.net/mactel-support/+bug/205059

Old Info

This stuff is no longer needed, but is kept for reference.

Update Kernel

As of 2.6.24-12.18, the generic kernel in hardy seems to contain the above two patches to get both the keyboard and trackpad working without further patching. Confirmed working on a MacBook 4.1

The stock kernel in Gutsy actually works fine, but leaves a few things to be improved:

If you wish to build your own kernel, there are patches in bug 162083 for the keyboard, and bug 162090 for the trackpad. Otherwise, you could use a pre-patched kernel from the mactel-support ppa (see immediately below).

Please update the relavant bugs with any issues with the patch. A few "Works fine for me" comments would help too, but please don't overdo it if others have commented to this effect.

Installing a pre-patched macbook kernel

A pre-patched kernel has been created using the launchpad.net personal package archive feature. To use this, add the following line to the /etc/apt/sources.list:

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

Now update:

sudo apt-get update
sudo apt-get upgrade

Please report any issues with the pre-patched kernel to the ubuntuforum thread and just below this paragraph. Do not file new bugs in launchpad as this is a modified kernel. The forum username of the PPA owner is "Seq."

Note: I think you can now file bugs against the "mactel-support" project here: https://bugs.launchpad.net/mactel-support/+filebug

Installing a kernel from hardy


CategoryHardware 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_Santa_Rosa (last edited 2013-12-14 02:30:59 by knome)