MandrivaOnMacBookPro
From Mactel-Linux
This page is meant to gather people's experiences with (and advice for) running Mandriva Linux on MacBook Pro laptops.
There are still many incomplete bits, please improve what you can. Also, a lot of useful advice is given in the other howtos. If something is missing from here, have a look at the HOWTO page and the links it provides.
Contents |
Install
I am giving here some instructions to get a dual boot with OSX and Mandriva (2007, 2007 Spring or 2008 - i686 version, not 64-bit), using rEFIt and either LILO or GRUB.
Executive summary: caveats
- The installer only sees the MBR disk label. You have to do all modifications on the GPT label, and then synchronize the MBR using rEFIt (or directly gptsync.efi).
Firmware Updates
Under MacOS X, install all available firmware updates (these may contain battery firmware and EFI updates). In particular, EFI update 1.4 apparently fixes a problem that randomly broke keyboard interaction with the bootloader.
Partitioning
The Mandriva installer, DrakX, cannot deal properly with GPT disk labels. Neither can LILO, so we need an MBR-style disk label mirroring the GPT.
- shrink the MacOS partition using diskutil
- create linux partitions (no more than 2 of them, including swap if desired). Since I am more comfortable with parted, I chose to boot with Knoppix and download a static binary of parted 1.8.1 (e.g. from here)
rEFIt
- install rEFIt
- if you have a 1st generation MacBook or MacBook Pro, you may need to install BootCamp for BIOS emulation. If you have a MBP C2D, you don't need it.
- on the next boot, use the partition tool of rEFIt to synchronize the MBR disk label with the GPT
Mandriva install
- boot from the install CD. Trick: You may need an external USB keyboard to interact with LILO. edit: this issue seems to be solved when firmware update 1.4 is installed.
- install as usual; do not modify the partition table.
- installing LILO will probably fail, that's not a big problem. Update: 2007 Spring uses Grub by default, and everything seems to work okay.
Post-install configuration
Bootloader
- If LILO could not be installed during the Mandriva install, that can be done booting from a LiveCD like Knoppix or the Mactel-Linux LiveCD. (I only tried Knoppix for that though).
- mount the root partition, mv /boot /boot.orig, symlink /boot from the root partition to /boot
- copy lilo.conf to /root
- edit lilo.conf, comment out "message=/boot/message". A line in the first section should say "boot=/dev/sda3" (or whatever your linux root partition is).
- run lilo -C lilo.conf
- reboot from the hard disk (should work...)
- Add the kernel options "noapic acpi=force irqpoll" to prevent issues with the SATA controller and other problems. edit: this does not seem necessary anymore
Package repositories and update
- setup either urpmi or smart (or both) using [1]
- run an update (urpmi --auto-select)
Kernel
- download a recent, stable kernel (last tested and working: 2.6.22.9)
- download the appropriate Mactel-Linux patchset and kernel config
- use the "apply" script to apply all patches.
- make bzImage, make modules
- as root: make modules_install, make install.
- edit /etc/modprobe.preload and add a line saying: applesmc
Graphics driver
- you need the C++ shared libraries
- download from ATI, follow regular installation instructions
- xorg.conf : disable the Composite extension
- test hardware 3D acceleration with fgl_glxgears. I get about 780 frames per second. edit: with the 8.42.3 driver, performance has been improved (~900 fps).
Keyboard
- pommed handles the special hotkeys and optionally the Apple Remote. Just follow the instructions given in the INSTALL file, and copy the daemon to /usr/sbin/pommed. It is convenient to install it as a system service using this sysvinit script: copy the file to /etc/init.d and run (as root) chkconfig --add pommed. Here is my config file for pommed (/etc/pommed.conf).
- Pbbuttons provides a daemon (pbbuttonsd), a graphical notification system (gtkpbbuttons), and a graphical config utility (powerprefs). It is more sophisticated than pommed.
Wireless Networking
- download, compile and install ndiswrapper
- download the driver from Lenovo (Thinkpad T60 drivers)
- if the driver is in a self-extracting .exe archive, wine can probably run it!
- install the driver (ndiswrapper -i net5416.inf)
- setup the network using Drakconnect
Apple IR Remote
- handled by appleir module, but should be setup with Xmodmap to do useful things
Mount point for MacOS partition
- use diskdrake to set a mount point and mount the HFS+ partition
Built-in iSight webcam
Update: the instructions below don't seem to work with more recent kernels - the way to go is probably this driver, although I have ssen problems with it too...
- download Ronald Bultje's latest specially patched uvcvideo driver from here
- make, install
- copy firmware from MacOS partition (the path is System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport)
- extract firmware
- modprobe uvcvideo
- test with Gstreamer - don't forget to install package gstreamer0.10-plugins-bad for the v4l2 plugin
- test with ekiga
Power management
Suspend to RAM
Mandriva 2008.0 on MBP "Santa Rosa" with NVIDIA graphics, proprietary driver version 169.09, kernel 2.6.24: works out-of-the-box.
ATI PowerPlay
The Radeon Mobility X1600 boasts its super-duper power-saving features, but the Linux driver fails to recognize it. The bug is being tracked there. The best one can do is use this hack to put the graphics chip in a low-power-state as needed.
NVIDIA PowerMizer
Works fine with latest proprietary driver. I get 2:30 hours of battery life without particular optimizations. Not great but better than before.
DVD drive
Like most recent optical drives, Matshita DVD drives have that annoying hardware-enforced DVD region thing. If you dislike that behavior, you might be able to find help on this page.

