Differences between revisions 106 and 107
Revision 106 as of 2010-11-28 17:44:50
Size: 15025
Editor: ?Christophe Lejeune
Comment: Ath5K mention in the Wireless section
Revision 107 as of 2010-11-28 17:46:58
Size: 15024
Editor: ?Christophe Lejeune
Comment: typo
Deletions are marked like this. Additions are marked like this.
Line 122: Line 122:
For !MacBookPro5,5, see the Debian precedure http://wiki.debian.org/wl For !MacBookPro5,5, see the Debian procedure http://wiki.debian.org/wl
Line 161: Line 161:
== !MacBookPro3? == == !MacBookPro3 ==

Translation(s): русский

(!) ?/Discussion


  • This page describes how to install Debian on a MacBook Pro.

Most points are the same like the MacBook so we point out the differences only.

Status Updates

  • Mar. 4, 2010, Debian testing on MacBookPro5,1: Installer works, but you might have to use dd to blow away the gpt tables from the BOTH the beginning and the end of your disk first, if it was once formatted by os x.

  • Feb. 10, 2010, Debian 5.0.4 on MacBookPro5,1: Default install runs error-free, but does not result in bootable installation. When machine tries to restart, screen fills partially with garbage and hangs. On manual hard restart, mac firmware shows flashing question-mark folder. -?AndrewWagner

  • July. 20, 2010, Current D-I(Debian 5.0.5 and testing) can not install on MacBookPro7,1. Because Linux kernel does not support MCP89 chipsetLinux:Bug 15923. (But this supports Linus/HEAD.) I backported this patch and made D-I. Work fine, Yay! -NobuhiroIwamatsu

  • July. 23, 2010, For MacBookPro7,1 use the Kernel since version 2.6.35-rc3.

  • Nov. 26 ,2010, 2.6.32-28 support ?MacBookPro7,1 and Macbook Air3,1.

Other Resources

Install Debian

See the MacBook Install Debian section.

If the kernel panics when you press return at the ISOLINUX prompt, enter "install noapic" at the ISOLINUX prompt (the kernel may panic while enabling the IO-APIC IRQs, bug 381719).

For Macbook Pro 13 (7,1)

Current installer can not install. But you can use Iwamatsu's D-I.

Kernel

linux-2.6 2.6.22 should work out of the box.

linux-2.6 2.6.18-3 supports MacBook Pros out of the box, but you'll need to ensure that the appletouch module is loaded before the usbhid module. You can do so by creating a file /etc/modprobe.d/local.conf that contains the following line:

install usbhid /sbin/modprobe appletouch && /sbin/modprobe --ignore-install usbhid $CMDLINE_OPTS

For some reason, this doesn't always work.

The MacBook instructions suggest that you use the kernel parameters "noapic irqpoll acpi=force". I found that on a March 2008 MacBook Pro, the irqpoll option caused the CDROM drive (HL-DT-ST DVDRW GSA-S10N, ATAPI CD/DVD-ROM drive) to give errors along the lines of

Mar 13 19:52:24 rotten kernel: hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
Mar 13 19:52:24 rotten kernel: hda: drive not ready for command

Using "noapic acpi=force" instead solved the problem.

Using stock kernel and patch from svn

You can build your own kernel using the stock Linux kernel and the patches found in the mactel-linux SVN. Here is the steps to follow:

  • download the source for the stock kernel from one of the kernel mirror,
  • get the mactel-linux patches with svn:
    svn co https://svn.sourceforge.net/svnroot/mactel-linux/trunk mactel-linux-trunk
  • apply all the mactel-linux patches:
    cd mactel-linux-trunk/kernel/mactel-patches-2.6.17
    vi version.patch   # if you are patching a kernel different than the svn one
    ./apply /where/you/have/the/kernel/sources
  • copy the config from the svn (trunk/kernel/mactel-patches-2.6.17/config-2.6.17-MBP) to your kernel dir, with name .config,

  • configure your kernel with make menuconfig, and control that CONFIG_FB_IMAC is not set,

  • build your kernel (fakeroot make-kpkg ...,

  • install your kernel (dpkg --install ...),

  • reboot.

X Window System

See MacBook page for other details.

The first MBP versions have an ATI card built in (MBP 2,2: ATI Technologies Inc M56P [Radeon Mobility X1600]). Later versions (MBP 3,1 and up) have an Nvidia card.

The installation of x.org should work out of the box with the lenny (and later) version of x.org (nv or radeonhd drivers).

ATI graphics

Lenny (and sid) contains the free radeonhd driver (package name xserver-xorg-video-radeonhd) which supports the ATI card and 3D. Squeeze defaults to the free radeon driver (xserver-xorg-video-radeon). You need to install the package firmware-linux-nonfree to use 3D acceleration.

If you wish to use the binary vendor driver on ATI cards, install the non-free fglrx-driver package and, in the Device section of /etc/X11/xorg.conf, change the driver from "ati" to "fglrx". Afterwards, to enable 3D you need to build the kernel fglrx module:

apt-get install fglrx-control fglrx-kernel-src module-assistant
m-a prepare
m-a a-i fglrx
depmod -a
modprobe fglrx

?PowerPlay does not work with the fglrx driver as of v8.42. A patched radeontool is available at http://www.g2inf.one.pl/~anszom/MBP-ATI/.

NVidia graphics

With MacBookPro5,5 under Debian Lenny (2.6.26), use the NVidia proprietary driver. Brightness adjustment can be obtained by using Ubuntu packages

echo "deb http://ppa.launchpad.net/mactel-support/ubuntu intrepid main" >> /etc/apt/sources
aptitude update
aptitude install bcm5974-dkms usbhid-dkms applesmc-dkms hid-dkms hal-applesmc
echo "nvidia_bl shift=2" >> /etc/modules

For MacBookPro7,1 download the driver from Nvidia (Geforce GT 320M) and install it manually.

Wireless

See the MacBook Wireless section.

Atheros

With the madwifi-source version in sid/lenny (1:0.9.4+r3772.20080716-1) the AR5418 802.11abgn Wireless PCI Express Adapter works.

aptitude install madwifi-source module-assistant
cd /usr/src/
tar xvfj madwifi.tar.bz2
module-assistant a-i madwifi

Because ?MadWifi is not free, you could also give a try to Ath5k (which decently works with recent kernel)

Broadcom

For the March 2008 MacBook Pro, which has a Broadcom 4328 (rev 5) chipset and PCI id 14e4:4328, ndiswrapper and the Windows driver included in boot camp work. Note that the drivers supplied with boot camp (and also found on the CDs shipped in the box) are included in an installer executable, and can be extracted into individual files from Linux using an un-RAR tool supporting SFX archives (such as the unrar tool from WinRAR).

For MacBookPro5,5, see the Debian procedure http://wiki.debian.org/wl

For MacBookPro7,1 use the Kernel 2.6.35-rc3 and apply the Broadcom patch from Ubuntu (5.60.48.36+bdcom-0ubuntu5 from https://launchpad.net/ubuntu/+source/bcmwl).

Bluetooth

For MacBookPro7,1 apply the following patch to Kernel 2.6.35-rc3:

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5d9cc53..6871d24 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -65,6 +65,9 @@ static struct usb_device_id btusb_table[] = {
        /* Bluetooth Ultraport Module from IBM */
        { USB_DEVICE(0x04bf, 0x030a) },
 
+       /* Apple MacBook Pro 7,1 */
+       { USB_DEVICE(0x05ac, 0x8213) },
+
        /* ALPS Modules with non-standard id */
        { USB_DEVICE(0x044e, 0x3001) },
        { USB_DEVICE(0x044e, 0x3002) },

Then modprobe btusb.

Sound

See the MacBook Sound section. == MacBookPro2?== With a Core 2 Duo MacBook Pro and kernel 2.6.18-3-amd64 sound only works with the headphone but no speaker output.

With a Core2 Duo MacBook Pro (built fall 06) running (unpatched) 2.6.18-3-686, sound output can be changed as follows in alsamixer:

  • PCM channel changes overall volume
  • Center and LFE channels change volume of headphones output (which is at the jack labled as line in!)
  • Line in (only toggling mute possible) enables/disables built-in speakers
  • IEC958 enables/disables optical IO on jack labled as headphones
  • line in not yet worked out

!MacBookPro3

With MBPv3 (mid 2007), sound works out-of-the-box starting with kernel 2.6.24.

!MacBookPro5,5

With Macbook Pro 5.5 (mid 2009) with kernel 2.6.26, the following little hack helps to enable sound under Lenny.

rm -rf /lib/modules/`uname -r`/kernel/sound
aptitude reinstall linux-image-2.6.26-2-686 linux-headers-2.6.26-2-686

Reboot

wget ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz
tar xf alsa-driver-unstable-snapshot.tar.gz
cd alsa-driver-unstable
sudo ./configure --enable-dynamic-minors  --without-oss --with-cards="hda-intel"
sudo make
sudo make install

Under Squeeze, with kernel 2.6.32, simply add the following line to /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=mbp55

!MacBookPro7,1

For MacBookPro7,1 with the kernel 2.6.35-rc3 and above, append the following line to /etc/modprobe.d/alsa-base

options snd-hda-intel model=mbp55

The front speaker can be unmuted with the gnome-alsamixer or with the alsamixer from console.

Touchpad

To get two finger vertical scrolling, disabled tap to click, good mouse acceleration, and speed. Use the following in /etc/X11/xorg.conf

Section "InputDevice"
    Identifier      "Synaptics Touchpad"
    Driver          "synaptics"
    Option          "SendCoreEvents"        "true"
    Option          "Device"                "/dev/input/mice"
    Option          "Protocol"              "auto-dev"
    Option          "SHMConfig"             "true"
    Option          "New AccelFactor"       "0.03"
    Option          "LeftEdge"              "100"
    Option          "RightEdge"             "1120"
    Option          "TopEdge"               "50"
    Option          "BottomEdge"            "310"
    Option          "MinSpeed"              "0.94"
    Option          "MaxSpeed"              "1"
    Option          "AccelFactor"           "0.0015"
#tapping
    Option          "FingerHigh"            "30"
    Option          "FingerLow"             "20"
    Option          "MaxTapTime"            "150"
    Option          "FastTaps"              "0"
    Option          "TapButton1"            "0"
    Option          "TapButton2"            "0"
    Option          "TapButton3"            "0"
#edge scroll
    Option          "VertEdgeScroll"        "0"
    Option          "HorizEdgeScroll"       "0"
    Option          "VertScrollDelta"       "5"
    Option          "HorizScrollDelta"      "0"
#two finger scroll
    Option          "VertTwoFingerScroll"   "1"
    Option          "HorizTwoFingerScroll"  "1"
EndSection

Hibernate

To be able to easily suspend to disk, or suspend to ram you can use the hibernate package. Note: Tested on MBP 2006

apt-get install hibernate

To use it use the command

hibernate

For MacBookPro7,1 suspend to RAM works with s2ram from package uswsusp with the command

s2ram -f -p -m

In combination with the acpi script lid.sh (I simply hacked that line into the script as last statement within the closing condition) it does exactly what you would expect on MacOS - the MBP suspends when closing the lid and awakens when it is opened. While sleeping, the LED is blinking.

Appendix: Santa Rosa/LED MBP

Mostly everything is the same with a few changes. The testing distro has enough working drivers to get you started. The stable distro, however does not have a new enough version of the ethernet drivers to work. The other caveat here is that 'apt-get install grub' seems to give you grub2 which didn't seem to work for me. If you're using rEFIt to boot to a boot loader then you should turn use Lilo or grub 1.

See also: https://cbg.dyndns.org/wiki/ReadingCorner/LinuxOnMacbookPro

Ethernet

Requires a new version of sky2 available on the testing CD, but I am unsure as to what the minimum kernel version is. However, it works out of the box with kernel 2.6.22.

Video

Since v100.14.19, the binary nvidia driver works nicely on x86 and x64, no patches needed. The OSS driver 'nv' works too, but has very limited HW support.

Touchpad

The touchpad works fine with the synaptics driver, though maybe not as smooth as with OSX. Use ?GrabEventDevice if you want misc usb mice and synaptics touchpad special functions to work simultaneously. Patches from http://www.mactel-linux.org are optional.

Suspend2RAM

For MBPv3: For some reason, suspend2ram does not work with the free nv driver from xorg (bug 453782).

Works with binary nvidia drivers. VT/X-switching is needed with old nvidia drivers. Note that usb is necessary for keyboard/mice to work. These drivers should not be reloaded, otherwise the synaptics driver will lose its grab(?GrabEventDevice, synaptics(5)) on the device. I also unload v4l, sky2 and madwifi before s2ram.

I used acpid to disable networking and echo mem > /sys/power/state on PWBTN.

Tested in debian/unstable, with vanilla linux 2.6.22/23. Alsa, uvcvideo and madwifi drivers taken from their corresponding repositories, i.e. working with various revisions of recent development drivers.

AppleIR

Patch your kernel with https://cbg.dyndns.org/store/apple-remote-quirk-hiddev.patch. Enable CONFIG_USB_HID and CONFIG_USB_HIDDEV. When loading usbhid, a device /dev/usb/hiddev0 should be created. Use lirc to configure your remote. Reported to work with other remotes, too.

For a step by step guide, including elisa setup see http://www.e-hoffman.org/wiki/pmwiki.php?n=Main.AppleMacBookProV3

Plan

Here's what needs to be done:

  • Figure out how to install ELILO.
    • elilo failed to boot my kernel, though efi-boot was enabled. Direct efi-boot is reported to work very bad, as drivers(nvidia,networking) depend on some BIOS calls. http://www.madingley.org/macmini/ provides patches and some bios emulation code, but this is old and only for mac mini.

  • Figure out how to use the remote control.