Compiz on Slackware with VIA Chrome9!!!

7 10 2008

Hey peeps, long time no see, and yes, you did read that right…

With Via’s release a short while ago of OSS drivers for chrome9 cards, it’s now possible to have chrome9-powered Compiz-fusion on whichever distro you like! Officially they only support Ubuntu 8.04, but the source is readily available, so as long as you’re not scared of the command prompt (would you be using linux if you were? :P) you can compile your way to compiz-enabled beauty. This guide will outline the basics for compilation on Slackware 12.0, but it shouldn’t be too hard to port it to any other distro. Anyway… On with the guide…

To start with, you will need:

  • Kernel source for a 2.6.24 variant. In this case I used from I tried it with 2.6.26, but wasn’t able to get the via_chrome9 kernel module to compile, although it’s probably possible.
  • The xf86 VIA vga driver source from here.
  • The chrome9 patch package from here.
  • A basic knowledge of how to compile and install a customised kernel.

Step 1: Unpack and patch your kernel

On a console in the folder you’ve downloaded the kernel source to:
tar xvjf linux-
cd linux-

Now unpack the chrome9 patch tarball (GUI is easiest with this one, as the folder and file names are a pain to deal with in the console). Copy these files to the linux source folder and run the following commands:
patch -p0 < via-agp.patch-2.6.24
patch -p0 < via-chrome9-drm.patch-2.6.24

Step 2: Configure, compile and install your kernel

Now you’re ready to configure your kernel. In Slackware, you’ll want to use the following (as root):
cp /proc/config.gz .
gunzip config.gz
mv config .config
make xconfig

Now make sure that these items are compiled as modules (a little blob in the checkbox)

  • Device Drivers –> Graphics Support –> /dev/agpgart (AGP Support) –> VIA Chipset support
  • Device Drivers –> Graphics Support –> Direct Rendering Manager –> Via unichrome9 video cards

Now compile the kernel as follows:
make modules modules_install bzImage
When this finishes (it’ll take a good hour and a half), install the kernel with these commands (as root):
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-
cp /boot/
cp .config /boot/config-custom-

If you need an initrd you should create it now. As long as you’ve compiled support for your main filesystem (e.g. ext3, reiserfs) into your kernel, you don’t really need one though.

Something to note is that the kernel installed the via_chrome9_dri to the wrong location for Slackware for some reason. I had to find where it was installed and move it to /usr/lib/modules/dri. requires to be installed, so if you can’t find it, just rip the file from the “chrome9.83-242-u804.tar.gz”, downloadable from here. On Slackware, this file needs to be in /usr/lib/modules/dri, and in Ubuntu (I have subsequently learned) in /usr/lib/dri. Also, I have seen reports of the modules having the wrong read-permissions. Reset these with the chmod command.

Now set up your bootloader to boot from this kernel. In lilo, add these lines to your /etc/lilo.conf…
image = /boot/vmlinuz-custom-
root = /dev/sda1 # Replace sda1 with your main HDD device node
label = NewKernel

Also, it is essential that you have your current kernel as an entry in there as well… If anything goes wrong and you haven’t, you’ll be in for a world of hurt, er, fun… Yes, fun.

To install lilio use the following command (as root):
lilo -v # I always use the -c flag as well to speed up booting, but I can't guarantee it'll work for you.

Now reboot, select NewKernel from the boot loader, and cross your fingers!

Step 3: Compile the VIA xf86 driver

First up, in a console, navigate to the folder in which you’ve got the driver tarball. Now… (as root)
cd xf86-video-via-83.1.0/X11R7
chmod +x config_x11r7 configure
make install

Step 4: Configure

Now you can get to editing your xorg.conf. This bit was the most time consuming for me, as there were an unholy number of problems I experienced trying to get the configuration right… Insert the following lines under the section named (if they’re not already there). I always switch to runlevel 3 (text mode) before messing with my xorg.conf, as it makes it a lot easier to fix it if you screw up.

Load "dbe"
Load "dri"
Load "glx"
Load "extmod"

Device (modify the Driver line, don’t add a new one):
Driver "via"
Option "LCDPort" "DFP_HIGHLOW" # This line is necessary to avoid the 'black screen' problem

Option "XAANoOffscreenPixmaps"

Option "AIGLX" "on"

You’ll have to add in the following two sections to the end of the file…

Section "DRI"
Mode 0666

Section "Extensions"
Option "Composite" "enable"

Now restart your X-server (ctrl-alt-backspace), open up a console, and type the following:

glxinfo | grep render

It should come back with “direct rendering: Yes”. If it does then we’re nearly there! If not, then check your Xorg log files for anything which looks broken, and google the problem.

Section 5 (almost there!): Install Compiz-Fusion/Emerald

I’m not going to go into details about this section, as you may well suffer dependency hell trying to get them to install. I used the slackbuilds and instructions from

The problem I next faced was whenever I started compiz with “compiz –replace kconfig”, the window decorator died with the error “glx_ext_texture_from_pixmap is missing”. I spent a long while trying to get this to work, and ultimately did not find an answer… However, when I installed and ran the fusion-icon package, it just worked first time.

One of the most valuable things to take to heart if it all goes wrong is – “If at first you don’t succeed, try and try (and try) again”. It took me many hours to work through all of the problems I encountered along the way, but it was ultimately worth it for all the compiz-enabled gooey glory!

Until next time (whenever that may be!)… Enjoy!





5 responses

20 10 2008

I’ve been trying to get the vie chrome9 drivers to work on Gentoo for two weeks. Had no idea I had to install xf86-video-via. A million times, thank you!

21 11 2008

Fantastic. It’s great to see that my posts have been useful to somebody. Thanks muchly for your gratitude.


23 11 2008

Actually, My praise was a bit premature :\ it seems that via_chrome9_dri isn’t being created anywhere. Though, installing the via 2-d drivers per your instructions do allow me to lower the screen resolution at least, unlike openchrome (and get slightly faster software 3d)

3 12 2008

Hi John,

I think you may have spotted an error in my guide… It’s been a while since I did it, and my memory’s like swiss cheese, so I can’t remember exactly what I did around that section, but you can find a copy of in the package “chrome9.83-242-u804.tar.gz” (download from here) which will work perfectly ok. In Slackware, you’d put this file in /usr/lib/dri.

I’ve modified my guide to reflect this update.

Were the via_agp.ko and via_chrome9.ko files created ok?

Hope this helps!


6 07 2009

Hi! I’m compiling the kernel right now!
I was wondering whether you could post the full output of your
glxinfo | grep render
could you, please?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: