configure slackware 13.1 for macbook pro 6,2
In this post I would like to share with you some configurations and tweaks for using our beloved Slackware Linux 13.1 (also current) with the last generation of Macbook Pro, having Intel Core i5 and Corei7 CPUs. It should also work for past Intel based generations of Macbook Pro. Maybe also on some non Pro models.
It won’t be a classical “How to install Slackware 13.1 on a Macbook Pro” since as Slackware users we already know how to install this distribution. Google around if not. In this post there will be some tips for solving annoying issues such as keyboards and monitor back-light control, Apple Magic Mouse and Multi-Touch trackpad support, Broadcom STA driver support. I also attached some useful files and drivers. Let’s start.
Pat did a wonderful job with the included 2.6.33 Linux Kernel. However, our laptop needs a more recent version because of things such as better Magic Mouse support, handling of multitouch events, solving the Load balancing tick problem for a longer battery life and many others. I personally use linux 2.6.37 Vanilla Kernel that is a bless from the sky. I also applied a nice set of patches baked and prepared by a guy from Gentoo Forums1. Feel free to adopt them, too.
I attach here my kernel configuration for linux 2.6.37. It is copied from Patrick’s config-generic-smp-188.8.131.52-smp configuration plus all the options we need for macbook pro, such as multitouch modules, PAE enabled and aggressive powersave mode for the audio chipcard. I also included a couple of compile optimizations for the CPUs. I didn’t want to bother about selecting just the options for the laptop. Maybe one day I will and update this post. [I deleted the config file because I don’t want to take any responsibility, just do that by yourself]
WARNING: be aware that - at least for me - even if using a default based configuration for the kernel, I had to generate a initrd image for booting it, otherwise it would panic. I don’t know if this was for an error when linking files etc., but preparing a initrd file is rather simple:
mkinitrd -c -k 2.6.37 -m ext4 -f ext4 -r /dev/sda3
Be sure to substitute ext4 with your chosen filesystem type and sda3 with your ROOT partition.
here is lilo.conf related section:
image = /boot/vmlinuz initrd = /boot/initrd.gz root = /dev/sda3 label = Linux read-only # Partitions should be mounted read-only for checking
You already know how to install Nvidia drivers. So go and do that after you rebooted the new kernel.
This has been a panic for me. There are not decent and recent nvidia_bl or mpb_nvidia_bl drivers available, so I had to grab Mactel Support PPA2 Ubuntu latest packages for DKMS and work them out for preparing them as “normal” modules and fully working for “normal” kernels (yes, I am quite reluctant about Ubuntu’s way of managing kernels and modules). So here is an archive containing both kernel modules ready to be compiled and installed.
in the directory will result in the creation of a file, namely mbp_nvidia_bl.ko. Copy it in the directory /lib/modules/
At this point, check that the file /etc/rc.d/rc.modules contains this four entries:
/sbin/modprobe applesmc /sbin/modprobe appletouch /sbin/modprobe nvidia /sbin/modprobe mbp_nvidia_bl
Control Display and Keyboard Backlight
I chose to use pommed for handling the Macbook Keyboard keys responsible for backlight control. Grab the latest version but follow my instructions, not the one included with the package. First, install the three packages contained in my Slackware collection of pciutils, since those included with Slackware 13.1 won’t be sufficient: pciutils-3.1.6-4-slackware13.1.tar (credits: 4). Then install confuse provided with some Slackware repository such as Slacky.eu. Unpack pommed downloaded archive and type the following:
make pommed cp pommed/pommed /usr/sbin/pommed mkdir /usr/share/pommed cp -rf pommed/data/* /usr/share/pommed/ cp pommed.conf.mactel /etc/pommed.conf cp dbus-policy.conf /etc/dbus-1/system.d/pommed.conf cp pommed.init /etc/rc.d/rc.pommed
add the following lines to the end of file /etc/rc.d/rc.local
# To disable pommed, chmod rc.pommed to 644 if [ -x /etc/rc.d/rc.pommed ]; then . /etc/rc.d/rc.pommed start fi
At this point, a reboot is needed.
Broadcom STA Driver for Wi-Fi
This also has really been painful for installing. Fortunately I stumbled accross a workaround from a Gentoo Bug5. Download the latest 32-bit driver, unpack it. Then open the file ‘src/wl/sys/wl_linux.c‘ and at line 485 you will find
Substitute that line with:
After this modification, the commands
will work fine even for a 2.6.37 kernel. A
should already load the new wireless kernel module!
This was rather easy to install. After I grabbed last version from Mactel Support team2, directly worked with their source files and a
was enough to have a working version of macfanctld.
Just copy macfanctld in /usr/bin and add a line in /etc/rc.d/rc.local to load it at every boot.
It is also fine to add coretemp, cpufreq_ondemand, cpufreq_powersave and cpufreq_performance in /etc/rc.d/rc.modules.
I hope that my notes would save some time for some of our lucky Slackware/Macbook users around the world. Feel free to comment here if there is something more to be added or something to be corrected.
I do not use a commenting system anymore, but I would be glad to read your feedback. Feel free to contact me.