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.

Listed on TuxMobil

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.

Kernel Configuration

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 Forums[1]. 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-2.6.33.4-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:

Be sure to substitute ext4 with your chosen filesystem type and sda3 with your ROOT partition.

here is lilo.conf related section:

Nvidia Drivers

You already know how to install Nvidia drivers. So go and do that after you rebooted the new kernel.

Display Backlight

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 PPA[2] 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.

mbp_nvidia_bl.tar (thanks to [3] for the MakeFile)

Doing a  make in the directory will result in the creation of a file, namely mbp_nvidia_bl.ko. Copy it in the directory /lib/modules/uname -r/kernel/drivers/video/backlight.

At this point, check that the file /etc/rc.d/rc.modules contains this four entries:

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: [5]).
Then install confuse provided with some Slackware repository such as Slacky.eu.
Unpack pommed downloaded archive and type the following:

add the following lines to the end of file /etc/rc.d/rc.local

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 Bug[6].
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 [cci_bash]make[/cci_bash] and [cci_bash]make install[/cci_bash] will work fine even for a 2.6.37 kernel.
A [cci_bash]modprobe wl[/cci_bash] should already load the new wireless kernel module!

Macfanctld

This was rather easy to install. After I grabbed last version from Mactel Support team[2], directly worked with their source files and a [cci_bash]make[/cci_bash] was enough to have a working version of macfanctld.

macfanctld.tar.gz

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.

References

[1http://forums.gentoo.org/viewtopic-p-6560160.html?sid=f22f718e73d206c76214e5d67c7dfd36
[2https://launchpad.net/~mactel-support/+archive/ppa
[3http://aur.archlinux.org/packages.php?ID=40457
[4http://aur.archlinux.org/packages.php?ID=25467
[5http://www.linuxquestions.org/questions/linux-software-2/errors-when-compiling-pommed-812616/#post3998949
[6http://bugs.gentoo.org/350196

 

8 Comments

  1. Thanks for tutorial!
    Also, display backlight control works only in console for me, not in X. Where can be possible issue?

    Reply
  2. New nvidia_bl from mactel team worked for me, but needed to edit pommed.conf too to make it adjust the brightness correctly.

    Reply
    • Glad to hear that you solved your problems! And thank you for your comments, you are the first one to comment after the disaster recovery of my blog

      Reply
  3. Very useful. Thanks. Still strange to see Slax on MacBook, but very comfortable.

    Reply
  4. I was just wondering if you know of a way some of us can get 64 bit packages for 13.37.

    I am working with my MacBook Air (3,2), and so far it boots just fine when doing a Linux only setup. I switch to MBR instead of GPT, rebless EFI using an OSX boot USB. Video is messed up until the NVIDIA driver is installed. After that, the touchpad, wireless, display, and fan control are all wunky. The Ubuntu PPA is confusing, and I cannot figure out how to get source. Then again, I have never used Ubuntu. There are also some issues with powering off and restarting. I haven’t tested sleep.

    Reply
    • Unfortunately I don’t. I hope that somebody may help you then!

      Reply
  5. also in lilo.conf add: append=”reboot=e,a,f”
    Nn the 64bit version of Slackware 13.37, I found that slackbuilds.org had a working wireless driver. Fan control and backlight were working well with same sources. On resume, I had some issues with the backlight and found that the Mactel Support Team for Ubuntu had working instructions. I also had to disable sensors 8 and 14 for the fan. It’s also worth noting that the wireless card gets assigned to eth0, so if you are using wicd, be sure to make that the default device. I am still having issues with hotkeys though.

    Reply
    • Thank you very much for your comment. Let’s hope that someone may help you with the 64 bit version

      Reply

Trackbacks/Pingbacks

  1. Macbook pro6 | Cgbill - [...] Configure Slackware 13.1 for Macbook Pro 6,2 | dgraziotinApr 9, 2011 … In this post I would like to …

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">