Finally getting everything to work on Gutsy

I had everything working quite well on my Macbook Pro (Core 2 Duo) with Ubuntu Feisty, but due to some badness from the shitty, shitty ATI fglrx driver, I couldn’t use Gutsy with everything working.

The new kernel in Gutsy moved from the SLAB allocator to the SLUB allocator. (Btw, I have no idea what that actually is..). So, this meant that I couldn’t put the machine into Suspend mode while using the ATI drivers. Although the RadeonHD driver works quite well, it means that I can’t actually play BZFlag.

To solve this, I ended up compiling my own custom kernel for Ubuntu, and switching it to use the SLAB allocator. I thought it would be appropriate to blog it here in case anyone else is interested.

I followed much of the instructions from the Macbook Pro page on the Ubuntu Wiki, but I built a deb package for my kernel. So have a look at the Unofficial ATI linux driver wiki page for installing on Ubuntu Gutsy.

Here we go:

Symlink the firmware directory. This is usually needed for the initrd.
sudo ln -sf /lib/firmware/2.6.22-14-generic /lib/firmware/2.6.22.9

Install all the required packages
sudo apt-get install linux-source libncurses5-dev build-essential kernel-package fakeroot module-assistant build-essential dh-make debhelper debconf libstdc++5 linux-headers-generic

Extract the kernel source, import the old config and start the make config
cd /usr/src/
sudo tar -xvjpf linux-source-2.6.22.tar.bz2
sudo ln -sf linux-source-2.6.22 linux
cd linux
sudo cp /boot/config-2.6.22-14-generic .config
sudo make menuconfig

In the menu, browse to ‘General setup‘, then select ‘Choose SLAB allocator‘ at the last entry. Change this from ‘SLUB’ to ‘SLAB‘, then exit ‘General setup’.

Select ‘Processor type …‘ and ‘Processor family‘ and change the CPU from ‘Generic-x86-64’ to ‘Intel Core2 / newer Xeon‘, exit ‘Proccessor type …’.

Go to ‘Device Drivers‘ > ‘Sound‘ > ‘Advanced Linux Sound Architecture‘ > ‘PCI devices‘ and Hit the M key to enable the ‘Intel HD Audio‘ module.

I think that Ubuntu packages this driver as part of an extra modules package, but the in-kernel one works fine

Save the new config and exit.

UPDATE: Edit the file /etc/kernel-pkg.conf, and add the line:
CONCURRENCY_LEVEL = 3

This should make sure of both cores when compiling your new kernel. This will take it down from about 1 hour to still timing it, please update

Build your new kernel package
time make-kpkg --rootcmd fakeroot --uc --us --initrd binary

I think it’s a good idea to boot into your new kernel here. Make sure everything’s working before you move on.

Download the ATI driver installer ati-driver-installer-7-11-x86.x86_64.run

Build Ubuntu fglrx packages from the ATI driver script
sudo bash ati-driver-installer-7-11-x86.x86_64.run --buildpkg Ubuntu/gutsy

Install the fglrx packages
sudo dpkg -i xorg-driver-fglrx_8.433-1*.deb fglrx-kernel-source_8.433-1*.deb fglrx-amdcccle_8.433-1*.deb

Build the fglrx kernel module package.
sudo module-assistant prepare,update
sudo module-assistant build,install fglrx -f
sudo depmod -a

Install the fglrx kernel module
sudo dpkg -i fglrx-kernel-2.6.22.9_8.433-1+2.6.22.9-10.00.Custom_i386.deb

Make sure you’ve got fglrx set in the device section of your xorg.conf.

That should do it.

Posted in Geek, Linux, Ubuntu at December 21st, 2007. 2 Comments.