-   Slackware (
-   -   Making FGLRX actually work. (

sm177y 10-19-2010 12:09 AM

Making FGLRX actually work.
I've seen lots of questions about this. I'm not sure if this has changed recently as I wrote this tutorial back on 12.2 I believe. But here you go.

Compiling linux kernel on slackware for making ATI fglrx drivers actually work.

(You need kernel sources to compile a kernel, as long as you did the Full install of slackware you should have them)
Lines that start with # are just so that you can recognize which lines are actual terminal commands, the #'s don't need to be typed)

(I made this tutorial so that it can be used on pretty much any version of slackware with any linux kernel version)
Ok, first things first, it's always good practice to make your old kernel bootable as a backup, just in case something goes wrong
so that you can get back into your system without having to boot a disc.

Alright, your going to need to be root to do pretty much all of this so you might as well get a root terminal ready.

First off, cd into /boot like so:

#cd /boot

(were gonna start getting ur old kernel backup up and ready to boot just in case)

#mv System.old

#mv vmlinuz vmlinuzold

(this next step isnt necessary but I always do it because it's helpful in the later steps.)

#rm config

Now that we've backed up the old kernel, we need to set lilo to boot it. So open up your /etc/lilo.conf in your preferred text
editor, as root (everything in this tutorial needs to be done as root)

Ok scroll down until you find a section like this

image = /boot/vmlinuz (this is what we are looking for)
root = /dev/sda1 (your root partition may be different than mine)
label = Slackware (your label may be different than mine also, this doesn't matter)

Now change it to boot your backed up kernel, vmlinuzold, like this:

image = /boot/vmlinuzold
root = /dev/sda1
label = Backup (This isn't necessary but it's for simplicity so you know which one is your back up)

Now save and close your lilo.conf
Now rewrite your lilo config to your mbr by running lilo as root (yes the command is just "lilo")


If you did it right, then it will finish and not error out and freak out on you.
(you may see warnings, but ignore those as long as you don't have errors)

Ok, now your system is set up to boot your old kernel in case you fuck something up.
(Don't just skip this part because you think you won't fuck anything up, I even do this myself, it's good practice and
compiling can always freak out for stupid ass reasons, especially for something as finicky as the kernel)

Now we can start getting your new kernel ready to compile.

#cd /usr/src/linux

(We don't want the default kernel config because then we would need to make an initrd which would be another whole tutorial)
(we are just going to mod the huge-smp kernel to work with fglrx module)

#mv .config config.old

Now we grab the huge-smp config and move it to /usr/src/linux so we can use it.

#cp /boot/config-huge-smp-*-smp ./.config

Now we need to make the modifications to the config so open .config in your preferred editor (note that it starts with . so it is a hidden file)
(It would be easier to open it by running #kwrite .config as root than to open kwrite and try to find it)
(I use nano for all of this but that's just me, also nano allows you to do this entire tutorial at runlevel 3 command line without needing an X server at all)

Now search through the .config for this line (kwrite has a ctrl+f, nano you can use F6 to search for PCI_MSI)

Change this line

# CONFIG_PCI_MSI is not set

To read like this


Save the .config and close it. (Yes that's all that we need to modify in the config, it's really lame, whoever made this kernel for slackware 12.0 and newer is a fucktard because it's needed for all ATI cards that use fglrx and doesn't hurt anything being enabled)

Now run:

#make menuconfig

And just goto Exit.

Now run:

#make depend
(If it says it's unnecessary, that's fine, I just do this by habbit, not sure if it's actually needed)

Now run:

#make clean
(This may take a lil bit but shouldn't take more than a minute or two depending on your system)

Now run:

#make bzImage
(This part takes a while, so sit back and let it run, If you have a multicore processor you can make this much faster by specifying more threads, like this, the number being how many cores you have, #make -j4 bzImage)

Once that is finished, run:

(This takes a while also, and once again you can use -j# for multicore cpus)

Once that is all done, we install the kernel by running:

#make install

Now we just configure our lilo to be able to boot our new kernel.

So, go ahead and open your /etc/lilo.conf once again in your preferred text editor.

Now just copy the section that now looks like this (from the earlier steps)

image = /boot/vmlinuzold
root = /dev/sda1
label = Backup

And make another section like this so that you have two sections that look similar to this:

image = /boot/vmlinuzold
root = /dev/sda1
label = Backup

image = /boot/vmlinuz
root = /dev/sda1
label = NewKernel

Save and close your lilo config and rewrite to your mbr by running lilo again:

(once again, warnings are fine as long as you don't have errors)

Now go ahead and reboot and try to boot your New Kernel. If it boots fine then you did everything right and you can go ahead and remove the backup kernel section from /etc/lilo.conf so that you just have a section like this:

image = /boot/vmlinuz
root = /dev/sda1
label = Linux (you can set the label to read however you want it to show at your boot screen)

And once again rewrite your lilo to your mbr:


That's it, you've just compiled your new kernel to be able to run fglrx ATI drivers on slackware. You can find my tutorial on installing the ATI drivers here:
The driver tutorial isn't as thorough as this one because I wrote it for a friend that already has a basic knowledge of the drivers and Slackware itself.

sm177y 10-19-2010 12:11 AM

Tutorial from the bottom link.

first remove your fglrx and fglrx module packages using pkgtool, there is two of them.

then run your ati .run driver file like this.

sh --buildpkg Slackware/All

once it's done making the slackware packages, fglrx and fglrx-module, then install both of them with installpkg like this.

installpkg fglrxpackage.tgz
installpkg fglrx-modulepackage.tgz

once that is done, run the ati .run driver file again, except this time without the parameters like this.


any options that it asks just pick the defaults, its like basic or something, you dont need to use the expert install or whatever.

once that is done, start with a fresh xorg.conf, back your old one or whatever, doesnt matter. run these commands

rm /etc/X11/xorg.conf

xorgconfig (you should kno how to run thru xorgconfig, when u get to the driver just pick option 0, which is vesa)

once you have your new xorg.conf, go ahead and run aticonfig like this.

aticonfig --initial -f

once that is done, open up your /etc/X11/xorg.conf in whatever editor u like best and (if they exist, which they probably do) remove
the device section that has the vesa driver in it. it should look kinda like this

Section "Device"
Identifier "VGA card whatever this doesnt matter"
Driver "vesa" <---this is the giveaway (cut out this whole section)
# unsupported card
#VideoRam 32768
# Insert Clocks lines here if appropriate

Also, remove the Monitor section that looks somewhat like this

Section "Monitor"

Identifier "My Monitor"

# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.

HorizSync 30-96

# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.

VertRefresh 50-160


Then Lastly remove the Screen section that looks somewhat like this

Section "Screen"
Identifier "Screen 1"
Device "VESA Framebuffer"
Monitor "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

DefaultDepth 16

# "1024x768" is also a conservative usable default resolution. If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

Subsection "Display"
Depth 8
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
Subsection "Display"
Depth 16
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
Subsection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
Subsection "Display"
Depth 32
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"


After you cut out those 3 sections, then make sure you have this at the bottom of your xorg.conf

Section "DRI"
Mode 0666

And also make sure the lines kinda towards the top that are like this

# This loads the GLX module
Load "glx"
# This loads the DRI module
Load "dri"

have the two Load lines there uncommented. if they look like this,

# This loads the GLX module
# Load "glx"
# This loads the DRI module
# Load "dri"

thats no good.

once your all done with that, save your xorg.conf and try starting X.
if it dont work, check your Busid and make sure it matches with lspci | grep ATI
and then if that dont work, check your /var/log/Xorg.0.log to see if fglrx is actually being loaded.

sm177y 10-19-2010 12:15 AM

sorry in advance for any typos you may find :P

Gavin Harper 10-19-2010 03:55 AM

I've always gotten by with:

# sh
# aticonfig --initial

sm177y 10-19-2010 09:52 PM

well back in like 12.2 i remember the default kernel had the PCI_MSI option disabled by default so u had to recompile just to even use them. they may have changed it since then, or the ati drivers may not require that option anymore. which is good because there was no real reason to change it from 11.x releases. like i said though, i have no idea what has changed since then, but i happened to run across these tutorials so i just figured i would share them.

acummings 10-20-2010 01:18 AM


I just checked the .config for current ( generic kernel

And, by default, it already has


BTW, radeon kms (open source driver) just got it going a few days ago. So far, so good.

Slack 13.1

I grabbed the above .config from a mirror. I used it to compile (yes, I use an initrd).


pcie card made by MSI

"I don't have make module build"???????


sm177y 10-23-2010 06:05 PM

well thats good that they fixed it. i remember a lot of fuss about this back when it was defaulted off and people had to rebuild kernels in slack just to use fglrx.

All times are GMT -5. The time now is 08:00 AM.