Tuesday, March 09, 2010

nVidia and Slackware-Current

A week ago slackware-current got a huge update and one of the things that were updated was the kernel. Kernel 2.6.33 intr0duced a new nvidia driver: nouveau, which resulted by reverse-engineering the official driver I think. The problem is that out of the box, at least for now, neither nouveau, nor the official nvidia driver are runnable on the system.

For nouveau, the Xorg that is included with slackware-current does not contain the needed xf86-video-nouveau driver.
You can download and compile this, but you need to find the suitable for your nouveau kernel module and this is not the latest from the nouveau repository:

git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/

You could of course download the latest pair of kernel and xorg driver and this should work, but for now, I decided to stay with the official driver from nvidia. Two problems arise here. First the nouveau driver is loaded automatically in the boot process when the hardware is probed and it is conflicting with the official nvidia driver. Second, the latest nvidia driver 190.53 does not compile with kernel 2.6.33.

In order to overcome the first problem you'll probably need to blacklist the nouveau module, or unload it every time before starting X-Window. You cannon directly unload nouveau and it's dependencies using rmmod. You have to unbind the nouveau frame buffer first. See here for more info.

Anyway, blacklisting the modules is easier. Simply append this:
blacklist drm
blacklist ttm
blacklist nouveau
to /etc/modprobe.d/blacklist.conf and the old vga console driver will run the next time you boot the system.

For the latest nvidia driver (190.53) you need first to apply the patch found here:
nvidia-betasam-2.6.33.patch.txt

You can apply a patch like this:
sh ./NVIDIA-Linux-x86-190.53-pkg1.run --apply-patch nvidia-betasam-2.6.33.patch.txt

This will create a new file: NVIDIA-Linux-x86-190.53-pkg1-custom.run with the patched driver, which is compatiple with kernel 2.6.33.