LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-19-2010, 12:09 AM   #1
sm177y
LQ Newbie
 
Registered: Oct 2010
Distribution: Gentoo, Slackware, Openbsd
Posts: 5

Rep: Reputation: 2
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.map 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)
read-only

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)
read-only

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")

#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

CONFIG_PCI_MSI=y

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:

#make
(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
read-only

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
read-only

image = /boot/vmlinuz
root = /dev/sda1
label = NewKernel
read-only

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

#lilo
(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)
read-only

And once again rewrite your lilo to your mbr:

#lilo

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: http://www.angelfire.com/games6/smit...slackdrivertut
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.
 
Old 10-19-2010, 12:11 AM   #2
sm177y
LQ Newbie
 
Registered: Oct 2010
Distribution: Gentoo, Slackware, Openbsd
Posts: 5

Original Poster
Rep: Reputation: 2
Tutorial from the bottom link.

DO ALL OF THIS AS ROOT.

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 atidriverfile.run --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.

sh atidriverfile.run

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
EndSection



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

EndSection



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"
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 32
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection

EndSection

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

Section "DRI"
Mode 0666
EndSection

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.
 
1 members found this post helpful.
Old 10-19-2010, 12:15 AM   #3
sm177y
LQ Newbie
 
Registered: Oct 2010
Distribution: Gentoo, Slackware, Openbsd
Posts: 5

Original Poster
Rep: Reputation: 2
sorry in advance for any typos you may find :P
 
Old 10-19-2010, 03:55 AM   #4
Gavin Harper
Member
 
Registered: Feb 2010
Location: Finland
Distribution: Slackware
Posts: 169

Rep: Reputation: 24
I've always gotten by with:

# sh ati-driver-file.run
# aticonfig --initial
 
Old 10-19-2010, 09:52 PM   #5
sm177y
LQ Newbie
 
Registered: Oct 2010
Distribution: Gentoo, Slackware, Openbsd
Posts: 5

Original Poster
Rep: Reputation: 2
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.
 
1 members found this post helpful.
Old 10-20-2010, 01:18 AM   #6
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Hi,

I just checked the .config for current (2.6.35.7) generic kernel

And, by default, it already has

CONFIG_PCI_MSI=y

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 2.6.35.7 (yes, I use an initrd).

HD5450

pcie card made by MSI

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

http://www.linuxquestions.org/questi...ml#post4117100

--
Alan.
 
Old 10-23-2010, 06:05 PM   #7
sm177y
LQ Newbie
 
Registered: Oct 2010
Distribution: Gentoo, Slackware, Openbsd
Posts: 5

Original Poster
Rep: Reputation: 2
good

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does fglrx not work with multiple X servers nz-intensity Linux - Software 3 01-30-2010 05:34 PM
fglrx on Vectorlinux don't work :( lostinpurdy Linux - Hardware 2 07-24-2007 03:46 PM
ok got fglrx 2d to work, now why wont 3d work? bvav22 Linux - Software 1 05-01-2005 06:25 PM
fglrx cant work under kernel 2.6.10 kira Linux - Software 1 03-31-2005 12:46 PM
fglrx can't work with the kernel 2.6.10 kira Linux - Hardware 3 03-31-2005 10:38 AM


All times are GMT -5. The time now is 03:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration