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
Update the firmware to the latest version. If you prefer, you may use the standard "Software Update".
Get your Ubuntu Live CD ready.
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).
- 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.
- Hold down "C" to boot from the CD.
- 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.
- Finish the install and reboot.
- If you installed rEFIt, you should have a choice between booting OS X and Linux. Use the arrow keys and Enter to select Linux.
- Alternatively, if you did not install rEFIt, hold down Alt/Option to choose whether to boot into OSX / Ubuntu. Ubuntu is called "Windows".
- Log in on your system.
- 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.
- mousewheel.horizscroll.withnokey.action (change it to 1 to allow scrolling or 0 to turn it off) mousewheel.horizscroll.withnokey.sysnumlines (change it to “true”)
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
- Seq/ChrisIrwin: I had stability issues I believe were related to wireless and ndiswrapper. Is anybody else able to confirm?
Panda88: My indicator of WiFi connection is olways on. I had only some issues copying files from another pc with windows instead. I don't know if they were wifi problems or else, but nautilus informed me few times the couldn't copy a lot of files, and if i click on retry button, it doesn't work... What are in particular these issues that you talk about?
- Panda88: I tried both method but only Dell's one works for me. Please Vincenzo, check it better. (Sono italiano se vuoi contattami enry_pandolfo at hotmail dot com)
Deng11: For me, the ndiswrapper -m command seems to be enough. Actually, putting ndiswrapper into /etc/modules made things worse for me (I couldn't get an IP address anymore via my WPA-secured connection after reboot - as usual, you mileage may vary, so just try what works best for you).
Hardy 8.04 beta read this https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/197558 to get wireless working.
Cisco#2(José Pagola)..it seems that broadcom launch a propietary driver that support the BCM-4328, http://www.broadcom.com/support/802.11/linux_sta.php, BTW bcm4328 is the PCI ID not the chip ID the real chip ID for this wifi card is bcm-4321(you can see this on this link http://linuxwireless.org/en/users/Drivers/b43#unsupported, unsupported for bcm43xx linux-driver but not for the propietary), and bcm4321 based chip are suppoted for the propietary broadcom's linux-driver.
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
- Bozzochet: On Kubuntu 7.10 I have the brightness problem (since few time, before was working correctly) with the line uncommented. Light screen is off but if you look carefully you see the desktop normally.
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:
- edit /etc/pommed.conf by changing the value of fnmode or
- 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
- Bozzochet: Also on Skype is working right.
Apple Remote Control
http://ubuntuforums.org/showpost.php?p=3769567&postcount=2
- SiNiESTrO: I follow this guide with success! It can be necessary to blacklist usbhid module in /etc/modprobe.d/blackist and load manually in /etc/modules to prevent load before apple modules.
External Monitor Connection
- Panda88: The external monitor, connected by the adapter mini DVI to DVI, doesn't want to work. I tried to make it work but i had stability issues and bugs. I couldn' set the right resolution and the extarnal monitor was only a duplicate of the first one. After the use of it, i wouldn't be more able to make my integrated monitor working, either than connect the external one again and from the recovery mode frome GRUB, recovery the xorg.conf file that i made times ago. I hope that someone will be more helpful. Remember to made a backup copy of xorg.conf file before trying to make that working.
Pascal24: By default randr does not seem to be capable of creating a virtual screen bigger than the one specified in xorg.conf. The virtual screen resolution in xorg.conf must be at least as big as the resolution of your monitors. Example: For a macbook with a resolution of 1280x800 and an external DVI monitor of 1600x1200 a virtual screen resolution of 2880x1200 is required. So you need to add the following line in the SubSection “Display” in xorg.conf (do a backup first):
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!
- Jim Blandy: Immediately after upgrading to Intrepid Ibex, the desktop worked normally on the laptop lid panel, but occupied only the upper left of the external 1920x1200 monitor, leaving black areas at the right and bottom. Using Synaptic, I made sure metacity was installed, uninstalled compiz and its related packages, logged out and back in, and all was peachy. Compiz is nice, but not necessary; metacity is quite workable.
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.
Seq/ChrisIrwin: I am experiencing full freezes when using OpenGL (some games, etc). bug 120834 in launchpad seems to explain the issue.
- Panda88: I got the same problem. I saw it using some screensavers. the only solution for me to go over the problem is change compiz cube's face and restart X server.
gutsy08: See this thread for a possible fix to get Compiz working: link
- Bozzochet: not only gnome player, any program able to produce not-Xv output (X11 output for example...) like VLC is working. Skype gives not choice and so you cannot see the phone-cam without turning off Compiz.
- Gate: This doesn't appear to be a problem in Hardy. Video playback worked fine in VLC by default.
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.
- shawnw: I have successfully been able to mount, read, and write to the macbook hfs+ partition. I accomplished this by turning off journaling within osx.
open Disk Utility, select the mac partition and while holding the option key, click File and choose the "Disable Journaling" option.
That is all you need within osx. Now in Ubuntu, mount the mac hard drive and in order to make any changes to the mac partition, one needs to use sudo for everything. This allowed to me create any file/directory anywhere on my mac partition. If you are not able to access a directory or read/write to a certain file, simply chmod that file while using sudo command:ie,sudo chmod a+rwx test.txt
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
- Seq/ChrisIrwin: I am experiencing high temperatures when using the macbook. I have turned the minimum fan speed up via the following command. It must be done when resuming from suspend as well.
echo 2500 > /sys/devices/platform/applesmc.768/fan1_min
Deng11: Note that you have to include the applesmc module into /etc/modules before you can do this.
Resume from suspend sometimes fails
See: https://bugs.launchpad.net/mactel-support/+bug/205072
- mun3kh/munk3h/IanOhr: Upon resuming from suspend, sometimes the screen does not display anything. This is not the suspend bug which causes the backlight not to come on. I have applied that fix. The system is also unresponsive, so I have to hold the power button just above the eject key, for 6 seconds, then power the system on again.
Headphone socket does not silence MacBook speakers
See: https://bugs.launchpad.net/mactel-support/+bug/205059
- mun3kh/munk3h/IanOhr: Pretty simple. If you plug in some headphones before booting the laptop audio comes out of the headphones and the laptop's internal speakers. Removing and replacing the headphones restores normal operation.
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:
- Extra keyboard functions, accessed using the "fn" key, are inaccessible.
- The trackpad only has basic functions (and is not configurable via xorg.conf)
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
On my MacBook the update manager reminds me about this update even after its been installed. I am working on the fix for this. Apparently you can do a manual compile of the kernel. If you know how to do that please add instructions for it here.
- Seq/ChrisIrwin: I am noticing this too, but only with the PPA. I have built the package locally and have my own custom repository with the package in it and do not experience this behaviour until the PPA builds the package. Also, the pommed package from the PPA does not do this, so I am at a loss. Furthermore, the PPA-built package differs from my local package. I have no explanation for either of these issues currently. If anybody else has any leads, please update this and/or contact me.
- Panda88: I am noticing this too, but I don't know what PPA is. I put on my sources.list the chris irwin site so, the question i have, is that if a new kernel comes out by default from ubuntu, I have to update or no my computer. Thanks
SiNiESTrO: ChrisIrwin, your PPA needs a new version of prepatched kernel for newbies. If updates or security repositories are enabled, update manager will install the last version instead your patched version.
Installing a kernel from hardy
|