This describes the steps and solutions I used to install Mandriva 2009.1 (Spring) on a late 2008 MacBook Pro (also referred to as "Unibody" MBP or "Aluminium" MBP); for Mandriva 2009.0 see the old instructions. I also created a number of RPM's (mostly based on patches done by the Ubuntu folks) to handle some of this machine's features. While this page is specifically about Mandriva, users of other RPM based distros such as Fedora, PC Linux, etc should find some useful information here too, including being able to use the provided RPM's.
Distro used: I installed Mandriva Linux Free 2009.1 x86_64.
The basic setup is described is described in various places around the web. Basically it consists of the following steps:
install rEFIt (version 0.12 or later) under Mac OS X.
resize and partition your drive (also under Mac OS X), using either Bootcamp or the Disk Utility directly. Remember you'll need at least two partitions for Mandriva (one for swap, one for everything else); and make sure the partition on which /boot will reside is one of the first four (if you don't use a separate partition for /boot then than means your root partition, /, must be one of the first 4 partitions). Typically this means / or /boot will reside on partition 3 or 4 (1 being using for EFI stuff, 2 for Mac OS X).
If you plan on wiping out Mac OS X completely then you can skip this (though you still need to make sure /boot is on one of the first four partitions).
run the Mandriva installer. Use the manual disk partitioning (Expert?) to make sure the proper partitions are used. Also make sure grub is installed in the partition on which /boot resides - it must not be installed in the MBR.
Now for the post-install setup. Note that I've pulled some packages from cooker, so first add the cooker repositories to your urpmi config. Also, if you installed the Mandriva Free DVD then you'll need to make sure you add and enable the non-free repositories too.
Install the proprietary driver (the free one does not support the built-in wireless chipset yet), broadcom-wl-kernel-desktop-latest.
Install the NVidia proprietary driver, nvidia-current-kernel-desktop-latest. The easiest way to do this is via the drak configuration GUI: go to System -> Administration -> Configure Your Computer, then select Hardware and Set up the graphical server (you can also get here by running XFdrake from the command line).
Now click on "Custom" for the "Graphic Card", then "NVIDIA" (the group, not any specific card), and "Ok", and say yes to download/install the proprietary drivers.
The EDID data does not seem to be perfectly accurate, so the DPI gets set to (107, 103) by default; I therefore added the following line to the "Monitor" section of /etc/X11/xorg.conf:
DisplaySize 332 207
External VGA displays (using the mini-DisplayPort → VGA adapter) require at least driver version 190.53 or 195.22 to work properly (with previous version the output either does not show at all or is heavily distorted).
Install x11-driver-input-synaptics (I recommend version 1.1.2 from cooker, as it feels noticeably better) and gsynaptics.
Download dkms-bcm5974-1.1.1-1 and install with
rpm --install dkms-bcm5974-1.1.1-1.noarch.rpm
The bcm5974 module is the driver for the touchpad; this version here contains updates for this MacBook (Pro) 5,1 model.
To modify the default touchpad settings do the following:
cp /usr/share/hal/fdi/information/20thirdparty/11-xorg-synaptics.fdi /etc/hal/fdi/information/ vi /etc/hal/fdi/information/11-xorg-synaptics.fdi
E.g. I changed the following:
<merge key="input.x11_options.PalmDetect" type="string">1</merge> <merge key="input.x11_options.TapButton1" type="string">1</merge> <merge key="input.x11_options.TapButton2" type="string">3</merge> <merge key="input.x11_options.TapButton3" type="string">2</merge>
Other values can be controlled from System -> Preferences -> Touchpad .
Download dkms-hda_realtek-0.1-1.noarch.rpm and install with
rpm --install dkms-hda_realtek-0.1-1.noarch.rpm
This patches the ALSA realtek driver to support MB/MBP 5,1 and 5,2 (see the Ubuntu Ticket for details - the rpm was created from the patches attached there).
Next make the following changes:
options snd_hda_intel power_save=1 model=mb5Try 'rmmod snd_hda_intel ; modprobe snd_hda_intel'; otherwise reboot.
load-module module-alsa-sink channels=6 device=out channel_map=front-left,front-right,rear-left,rear-right,front-center,lfeRestart pulseaudio:
pactl --kill pactl --start --log-target=syslog(or just log out and back in again).
alsamixer -c 0go all the way to the right to "Channel" and set it to "6ch". You may also want to make sure "Front" and "LFE" are fully on.
There are a couple problems on suspend/resume, which can be fixed as follows. Download 20pulseaudio and 15alsa put them in /etc/pm/sleep.d/ . Make sure they have appropriate execute permissions:
chmod 755 /etc/pm/sleep.d/15alsa /etc/pm/sleep.d/20pulseaudio
20pulseaudio suspends and resumes pulseaudio to avoid the audio becoming stuck after a resume; note that this doesn't use the RESTORE_SOUND functionality from pm-utils because that kills and restarts the pulseaudio daemon which causes the volume hotkeys to stop functioning. The 15alsa script switches the channel mode to 2ch and back to 6ch which seems to be necessary after a resume in order for the internal speaker to work.
default-fragments = 8 default-fragment-size-msec = 5. (you may need to kill and restart the pulseaudio daemon; can also be accomplished by logging out and back in).
Video works, including picture-in-picture.
Download and install dkms-mbp_nvidia_bl-0.19.0-1, hal-applesmc-0.14-1, hal-nvidia-bl-0.1.0-1, and gnome-power-manager-2.26.1-10.1mbp1mdv2009.1.
This will enable the hotkeys (F1/F2 and F5/F6) to control the screen and keyboard backlights. The patched gnome-power-manager has some fixes to properly control the screen backlight (though not the keyboard backlight); you will also need to make the following adjustments to its settings:
gconftool-2 -t int -s /apps/gnome-power-manager/ambient/correction_factor 40 gconftool-2 -t int -s /apps/gnome-power-manager/ambient/correction_scale 5000 gconftool-2 -t int -s /apps/gnome-power-manager/ambient/poll_timeout 10 gconftool-2 -t int -s /apps/gnome-power-manager/keyboard/brightness_ac 0 gconftool-2 -t int -s /apps/gnome-power-manager/keyboard/brightness_battery 0
See also the discussion on the Ubuntu Forums.
While the kernel generates keycodes for these keys, they are not mapped to any symbols in X11. To do this run
xmodmap -e 'keycode 128 = F15' -e 'keycode 212 = F16'
(I put this into a gnome startup application). This will cause Exposé to be mapped to F15 and Dashboard to be mapped to F16, and you can for instance now use these keys when configuring compiz.
The shipped gnome-sensors-applet RPM is built to link against lib64lm_sensors3 (i.e. lm_sensors 2.10.8), but I had trouble seeing any of the applesmc sensors with that. I therefore rebuilt (no code or spec changes) the package to link against lib64lm_sensors4 (i.e. lm_sensors 3.0.3): gnome-sensors-applet .
The only temp* I'm sure of is that temp8 is the GPU; if anybody else has further info, please let me know.
Some keys are mapped in what may be a non-obvious manner:
|PC Key||MacBook Key(combination)|
Not everything is perfect yet:
Lots of thanks goes to the Ubuntu folks, as many of the problems were diagnosed and solved there. The RPM's provided here were built using the patches provided in the Ubuntu mactel repository.
Here are the source RPM's and tar-balls for the various RPM's above:
Note that I don't have any explicit source RPM for the mbp_nvidia_bl
or hda_realtek packages, as I used
dkms mkrpm to build those;
but they contains all the necessary sources.
Note for users of Fedora, PC Linux, and other RPM-based distros: you should be able to use the RPM's provided here too, or at least be able to adjust them easily for your distro.Ronald Tschalär / 6 January 2010 / firstname.lastname@example.org.