Category Archives: Device Driver

Squashing the PITA!

Over the last couple of months, I have been nagging myself to fix several of the issues with my Linux installation, in particular I need to:

  • update my kernel (currently 2.6.27-rc9)
  • get the wacom input device working with the newest xorg-server
  • add some snaz to my desktop configuration (openbox, dmenu…bleh)

So, sparing you the `wget`ing and `tar -xf`ing, I upgraded my kernel to 2.6.29-rc2 and enabled the kernel modesetting. This enables me to switch to the console with no delay, instead of the current 2-3 second delay. Good news: the upgrade worked well.

Additionally, I upgraded my xorg-server to 1.6.1: the only problem was wacom tablet didn’t work, so I installed the development version of linuxwacom (version 8.3-3).

Everything works well so far except rendering terminals. When I try to open alsamixer with uxterm or resize it, the terminal behaves as if it has a really low refresh rate. I am looking into the issue and I will post a fix if I find one.

As for the ‘added snaz,’ I’ll deal with that another time.  Right now I’m just happy that my fps in stepmania has increased by about 20!

xf86-video-intel-2.4.3

The latest Xorg video driver for Intel chipsets will probably cause a slowdown in rendering due to a switch from TTM to GEM. GEM is only supported in kernel 2.6.28 and above so it’s recommended that you stick with drivers released before 2.4.3.

More information: http://bugs.freedesktop.org/show_bug.cgi?id=13922

http://www.x.org/wiki/ttm

Upgrading to catalyst-8.7

Choosing to run the latest kernel means choosing to deal with errors. Luckily, my mileage with 2.6.27-rc2 has been pretty good. Here are a few pointers (and an experimental patch) to use when setting up catalyst-8.7 kernel 2.6.27-rc2.

I created the patch from various components incl.:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485793

Also, note that I do not have any working knowledge of C nor do I take credit for this patch.

Changes to Kernel API (that I’m aware of, at least)

  • smp_call_function.  See commit 5e374fb62621aca9522f76c2317c9acda75a8e88 by Jens Axboe to the file arch/x86/kernel/smp.c
  • find_task_by_pid.  See commit 5cd204550b1a006f2b0c986b0e0f53220ebfd391 by Pavel Emelyanov to the file kernel/pid.c
  • NOPAGE_SIGBUS.  See commit 3c18ddd160d1fcd46d1131d9ad6c594dd8e9af99 by Nick Piggin to the file include/linux/mm.h

Other things to be aware of

  • If you have paravirtualised guest support enabled in the kernel, the compilation will fail with FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol ‘pv_lock_ops’. Disable it: PARAVIRT_GUEST=n
  • The catalyst-8.7 driver uses deprecated symbols so if they kernel does not export them (in particular init_mm) the compilation will fail.  Enable them: UNUSED_SYMBOLS=y
  • catalyst-utils-8.7 needs to be installed with this driver

The commands (to set up catalyst-8.7, I’m sure you can setup catalyst-utils by yourself).  Note: If you’re not using the kernel that will be running with the drivers, then replace `uname -r` with the correct kernel version/name.

~ %   mkdir proj/catalyst
~ %   cd proj/catalyst
catalyst %   wget www2.ati.com/drivers/linux/ati-driver-installer-8-7-x86.x86_64.run -O catalyst-8.7.run
catalyst %   wget http://antonyat.googlepages.com/firegl_public.diff
catalyst %   /bin/sh ./catalyst-8.7.run --extract archive_files
I use x86.  x86_64 users should substitute x86 with x86_64 and x710 with x710_64a respectively.
catalyst %   cp archive_files/arch/x86/* ./
catalyst %   cp archive_files/common/* ./
catalyst %   cp archive_files/x710/* ./
catalyst %   cp firegl_public.diff lib/modules/fglrx/build_mod/
catalyst %   cd lib/modules/fglrx/build_mod/
catalyst %   patch -p1 < firegl_public.diff
catalyst %   cp 2.6.x/Makefile .
catalyst %   make -C /lib/modules/`uname -r`/build SUBDIRS="`pwd`" ARCH=i386 modules
catalyst %   su
pts/3:root@GENTOO /home/antony/proj/catalyst/lib/modules/fglrx/build_mod # install -m 644 -D fglrx.ko /lib/modules/`uname -r`/video/fglrx.ko

You should also copy the licenses (in archive_files to /usr/share/licenses)

As usual, your mileage may vary.