LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices



Reply
 
Search this Thread
Old 09-08-2005, 12:42 PM   #1
why2jjj
Member
 
Registered: Jan 2005
Location: Oregon
Distribution: Mandrake
Posts: 47

Rep: Reputation: 15
Howto install the ATI proprietary drivers for Mandrake 10.2


Sorry I said I would post this solution yesterday; however, I was in the ER room dealing with multiple wasp stings (mmmmmm...steriods good ).

There really needs to be a HOWTO section for each Distro, as each Linux distro has their own little quirks, than just one, generic 'Linux Tutorials' section.

As of this writing, the latest ATI proprietary drivers are 8.16.20. ati.com offers a *.run auto-installer program as well as the *.rpm for the drivers for both XFree and xorg. Mandrake 10.2 (Limited Edition), uses the xorg *.rpm.

A couple of DO NOT's before I begin:
1. DO NOT use the *.run program provided by ATI. I expected the program to install the driver and set it up in your linux distro to automatically load the driver at each boot. This did not happen, and all it caused me were problems. After running the *.run file, my boot now does an 'init 3' instead of an 'init 5' and I get some sort of weird feedback problem with my audio driver that I both need to fix. Actually, I have seen people report issues with the *.run whether they use Mandrake/Mandriva, Redhat (see http://www.linuxquestions.org/questions/history/359933), SuSE (see http://www.linuxquestions.org/questions/history/337678), or debian.

2. You do not necessarily need to necessarily need to run fglrxconfig to get it configured right. This is especially true if you own a wide-screen laptop like me (Dell 8600). fglrxconfig does not configure a widescreen LCD right. So for now I am still using the xorg.conf file the Mandrake installation gave me which works fine (however, if someone knows a feature I should turn on or add in my xorg.conf file that fglrxconfig would configure, please tell and show me ).

3. The dkms thingy Mandrake has to control your ATI driver is junk. The ATI driver code that came with the distro is never compiled or loaded right on my distro. When you try and install ATI's latest driver package, the Mandrake kernel will try to update the dkms daemon thingy and may not get it right.

fglrxinfo is useful in telling if your kernel is actually using the ATI driver. For anyone that reports they are only getting 200, 500 FPS, I bet your kernel is still using the Mesa SW library. If you type 'fglrxinfo' (need to be root to do this) and you do not see 'ATI' anywhere from the output of that command, your ATI driver is not loaded.

Ok, so here are my steps. BTW, I got a lot of my ideas from http://www.linuxquestions.org/questions/history/354985, which is over a Redhat Fedora 64 bit configuration:

1. download ATI's latest driver *rpm package.
2. get into root (ie 'su')
3. do "rpm -ivh --force fglrx*.rpm"

Now you want to be in 'init 3' for steps 4-11:

4. cd to /usr/src/fglrx-8.16.20/. This is where the code was installed under Mandrake.
(there is no true /lib/modules/ directory in Mandrake distros, unfortunately).

5. EXPERIMENTAL: in the weblink I referenced, for their 64 bit system (Fedora) they went into 'firegl_public.c' and changed:
#include "asm/ioctl32.h"
to
#include "linux/ioctl32.h"
anyone that has a 64 bit Mandrake system may want to look into this and experiment. I have a 32 bit system.

6. run 'make.sh' (you may have to do a 'chmod +w make.sh' first)

7. load driver. "modprobe fglrx.ko" did NOT work for me. I actually had to do a "insmod fglrx.ko"

8. do a 'fglrxinfo' and 'lsmod | grep fglrx' to see that the driver loaded properly.

9. Only execute 'fglrxconfig' if you know what you are doing. There are a lot of options I did not understand the benefits and drawbacks of activating them, and I have not found any documentation here or on ATI's website for this.

10. Execute 'init 5'.

11. Once you are in your graphical environment, open a terminal, goto root, and enter 'glxgears' to see your FPS. My latest run I get:
11615 frames in 5.0 seconds = 2323.000 FPS
11507 frames in 5.0 seconds = 2301.400 FPS
11587 frames in 5.0 seconds = 2317.400 FPS
for my system which is a 2.0GHz Pentium M with 128MB 9600 ATI card. I have been told by an ATI engineer that it is possible on some systems to push this FPS up to 7000.

What is left for me to FIX so that I have a normal running system again is to get Mandrake to automatically load my fglrx driver, do an 'init 5' instead of an 'init 3', and most likely re-install my sound driver. I also need to get dkms to quit trying to load the old ati drivers that are part of the Mandrake distro. I'm a little green in these areas so any advice is appreciated.


Oh, now FYI, for anyone that would like to look more into dkms, this is what I discovered:

a. when you do a first install and Mandrake trys to install the old ATI drivers that are a part of the distro, a directory is created called /var/lib/dkms/ati. If you nose around, you will discover the directory structure something like:

[root@204 fglrx-8.16.20]# cd /var/lib/dkms
[root@204 dkms]# ls
ati/ dkms_dbversion* fglrx/
[root@204 dkms]# cd ati
[root@204 ati]# ls
8.10.19/ kernel-2.6.11-6mdk-i686-up-4GB-i586@
[root@204 ati]# cd 8.10.19/
[root@204 8.10.19]# ls
2.6.11-6mdk-i686-up-4GB/ source@
[root@204 8.10.19]# ls 2.6.11-6mdk-i686-up-4GB/
dkms.conf* i586/

Note that when you install the fglrx*.rpm file from the ATI website, Mandrake trys to install the drivers with the same directory structure in mind. However, it fails miserably. After /var/lib/dkms/fglrx is created, it will only create a 8.16.20/ underneath fglrx/ and then the source@ underneath 8.16.20/. None of the other files or directories that you see listed above are not created, including that dkms.conf file you see that was created for the ATI driver distro package. If you are really serious in getting dkms working and controlling your graphics drivers, I'm just providing you with an FYI that Mandrake does not do the 'right thing' when installing the *.rpm ATI package from the ATI website. You will probably want to manually construct the missing directories and files underneath /var/lib/dkms/fglrx.

Hope this helps everyone!
 
Old 09-09-2005, 08:30 AM   #2
cuiq
Member
 
Registered: Aug 2004
Location: Philly
Distribution: Debian Lenny, FreeBSD
Posts: 577

Rep: Reputation: 30
This should be posted in the tutorial section. Hopefully one of the moderators will move it for the benefit of everyone, because it never hurts to have more tuts.

thanks



peace V
 
Old 09-14-2005, 11:03 AM   #3
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Thanks for the detailed instructions for ATI driver installations.

I used to have an ATI card with Mandriva 10.1. It was such a pain figuring out how to install the drivers. I have now switched over to Nvidia and the process has really been simplified. I keep hearing that ATI's Linux support is bad. I guess this is why.
 
Old 09-16-2005, 10:16 PM   #4
nuxor
LQ Newbie
 
Registered: Apr 2005
Posts: 9

Rep: Reputation: 0
Gravitated tward your thread as I am trying to embark on my very first Linux project so to speak. Installing a driver. Just installed LE2005. Read your thread and Im sure it will come in handy if i can get past the basics sometime this millenium. So might I ask a couple questions here, and hope im not being rude and doing a hijack a thread thing.

So here are a few questions I will address in this thread instead of clogging up the boards with another, "How to question". Plus the fact that I am so green at this Linux thing and my questions are so basic, Im sure it will be easier on my ego to bury it in an active thread then face the wrath of a flame fest with its own thread lol.

Why2jjj Said:

"my boot now does an 'init 3' instead of an 'init 5'"
"do an 'init 5' instead of an 'init 3"

You talked about init 3, 5 etc, Not sure what that is.

Also tried to fire up check.sh. But I get a "not run from command line or no ownership of console" reply. I open up Konsole, type su for root then type "sh check.sh" and get that result. So am I clueless on that one Anyone care to clue me in?
 
Old 09-16-2005, 11:39 PM   #5
why2jjj
Member
 
Registered: Jan 2005
Location: Oregon
Distribution: Mandrake
Posts: 47

Original Poster
Rep: Reputation: 15
init defs

'init 3' means Linux will boot up in terminal mode, without calling your graphical x manager. So in this mode, I have to manually type in 'gdm' after I log in as root to start up the graphical X manager. 'init 5' means Linux will boot up autmatically calling your graphical X manager, which is pretty much what you always want. If you try and do these commands yourself, you must be root. There is a whole list of init numbers, 1-6 found in lots of Linux literature. I think if you do a 'man init' it may tell you more about these numbers (I am not currently on a linux system as I type this unfortunately).

When an 'init 5' is called automatically or by you, Linux will attempt to load your graphics driver. When an 'init 3' happens, like in my boot-up situation, Linux does not try and load your graphics driver. If you have/had an issue like what I had for a while, you have to manually type in the correct graphics loader command (insmod or modprobe) to have the right graphics card loaded before doing a 'gdm' or init 5 command. I recommened 'insmod' in my ATI howto startup because you exactly know what is going on and 'insmod' does not rely on any dependency database files to load your driver. 'modprobe' looks at modules.dep dependency file for information of all the drivers that are on the system and trys to match the driver name you typed to what it sees in its database (at least for the fglrx ATI driver). It may not necessarily take into consideration the driver you want to load in your current working directory if it is not specified in the modules.dep dependency file. 'insmod' will just look in your current directory for the driver file you typed in (in my case, fglrx.ko).

I am not sure what program you are talking about when you do a 'sh check.sh'...I have yet to use such a command in Mandrake LE. I am currently running in a GNOME environment, not KDE, but I will manually install KDE from www.kde.org eventually. I never liked the modifications Mandrake did with KDE in its distro.
 
Old 09-17-2005, 02:08 PM   #6
nuxor
LQ Newbie
 
Registered: Apr 2005
Posts: 9

Rep: Reputation: 0
Check.sh is for finding out what your running for free or Xorg. Although I did solve that one last night through perseverance. And I follow you now on the init 3 etc. Thanks for the reply, very grateful. Just wish ATI drivers wernt such a bear to get installed.
 
Old 11-01-2005, 03:03 PM   #7
43r05p4c3
Member
 
Registered: Mar 2005
Location: Ontario, Canada
Distribution: Mandrake 10.0/XP Dual Boot Desktop & Gentoo 2005.1 Laptop
Posts: 79

Rep: Reputation: 15
On the matter of check.sh, that's unneccesary anyways, as the commands:
XFree86 -version
or
Xorg -version
will give you the same information and more.

Steve
 
Old 11-03-2005, 03:20 PM   #8
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
I get a "insmod: error inserting fglrx.ko' : -1 Operation not permitted"

Error when trying to run insmod. Modprobe won't work either, I get this "FATAL: Module fglrx.ko not found."

I don't know much about these commands so is there a way to force the install?

edit: tried -f to force it, and it says the same error except "-1 Unknown symbol in module"

Last edited by purelithium; 11-03-2005 at 03:21 PM.
 
Old 11-03-2005, 03:46 PM   #9
why2jjj
Member
 
Registered: Jan 2005
Location: Oregon
Distribution: Mandrake
Posts: 47

Original Poster
Rep: Reputation: 15
That looks like an error message such that you forgot to login as root before running that command. See step 2:

2. get into root (ie 'su')
 
Old 11-03-2005, 03:50 PM   #10
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
nope, I'm root, I made sure of that when I got that error. I didn't think 2006 was that big of a change from 10.2/2005LE... maybe that's why...
 
Old 11-03-2005, 04:17 PM   #11
why2jjj
Member
 
Registered: Jan 2005
Location: Oregon
Distribution: Mandrake
Posts: 47

Original Poster
Rep: Reputation: 15
<quote>Modprobe won't work either, I get this "FATAL: Module fglrx.ko not found."</quote>

This error makes sense. Modprobe depends on a file which tells it all the modules on the system. if the module is not in that file, then modprobe cannot find it. That is why you need insmod.

What is this "-l" I am seeing in your command-line/error-messages?

Are you in init 3? If you are graphical, you cannot load or unload the ATI module because your session needs it and a fglrx.ko-like module has already been loaded by the kernel (it uses the MESA library only so that is why graphics will run slow). I gave an explanation of init 3 if you are unsure. Do an 'lsmod | grep fglrx' to see if fglrx is already loaded before trying an 'insmod'.

Are you performing the insmod in the same directory the fglrx.ko is located?

That are the only other things I can think of.

Mandrake 2006 should not be that different? I just got everything to work to where I am very happy with Mandrake 10.2/LE. I won't be upgrading for a long time (where I work they are still using a 2.4.7 kernel!!).
 
Old 11-03-2005, 06:19 PM   #12
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
Quote:
Originally posted by why2jjj
What is this "-l" I am seeing in your command-line/error-messages?
it's a minus and the number one. I don't know, I was just copying verbatim the error.

Quote:
Are you in init 3? If you are graphical, you cannot load or unload the ATI module because your session needs it and a fglrx.ko-like module has already been loaded by the kernel (it uses the MESA library only so that is why graphics will run slow). I gave an explanation of init 3 if you are unsure. Do an 'lsmod | grep fglrx' to see if fglrx is already loaded before trying an 'insmod'.
Yep, i'm in init 3. I tried grepping the fglrx and I didn't see it loaded. I did notice that My fglrxinfo command lists Mesa SW as being loaded. You mentioned this being a bad thing and I guess it is, as I'm only getting about 100 fps with glxgears.

Quote:
Are you performing the insmod in the same directory the fglrx.ko is located?
Yep.


oh and by the way, I got the version 8.18.8(the only version I could see) on the ati site. Possibly that could be the problem?
 
Old 11-03-2005, 09:25 PM   #13
why2jjj
Member
 
Registered: Jan 2005
Location: Oregon
Distribution: Mandrake
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by purelithium
I did notice that My fglrxinfo command lists Mesa SW as being loaded.

oh and by the way, I got the version 8.18.8(the only version I could see) on the ati site. Possibly that could be the problem?

Doing an fglrxinfo is showing the the status of your current fglrx being loaded. So you cannot do an insmod because you do in fact have the 'fake' fglrx, the one using the MESA Library instead of your graphics card, being loaded. You need to unload that module. Try a rmmod fglrx.o (that's right, no 'k' there). Then try a rmmod fglrx.ko if the fglrx.o does not work. Or another idea is the dkms daemon I reported saying it was 'junk' in Mandrake could be loading the MESA fglrx.o ATI driver and you will need to prevent that daemon from doing it. After my Mandrake 2005 LE installation, the only thing dkms did was loading, unloading, and maintaining the fglrx driver (which was failing miserably in its tasks).

INTERESTING! ati.com DOES currently have 8.18.8 listed there. I cannot see this being a problem because the version number is more recent than what I listed, 8.16.20. If anything, that driver should be better equipped with the later Mandrake 2006 kernel than 8.16.20 and the Mandrake LE 2005 kernel.
 
Old 11-04-2005, 12:09 AM   #14
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
Well, it seems that i need to learn much more about how linux uses drivers and manages hardware before I attempt this, as I couldn't rmmod fglrx in any form.

Thanks for the replies though!
 
Old 11-20-2005, 03:24 AM   #15
apeculiaz
LQ Newbie
 
Registered: Nov 2005
Distribution: Previously red hat,fedora,gentoo,debian; Currently,ubuntu,cygwin,mandriva
Posts: 14

Rep: Reputation: 0
Thanks a lot to why2jjj.
I've followed your document closely in building my ATI Radeon 9200SE driver for Mandriva 2006.0 x86_64 on Intel P4- 630 EM64T. Except solving a few dependency problems such as missing kernel source, everything goes ok.

For the experimental step 5, I don't need to change #include "asm/ioctl32.h" in "/lib/modules/fglrx/build_mod/firgl_public.c", since there is a macro guard for that in this version:
#ifdef __x86_64__
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
#include "linux/ioctl32.h"
#else
#include "asm/ioctl32.h"
#endif

Maybe it's because my rpm fglrx64_6_8_0-8.19.10-1.x86_64.rpm (Xorg version) is newer than the one you mentioned.
 
  


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
DISCUSSION: How To: Install X.Org 6.8 and ATI Proprietary drivers in Mandrake 10.1 tjmax LinuxAnswers Discussion 15 01-13-2006 12:54 PM
ATI 9600Pro & ATI Proprietary Drivers problem Hyakutake Slackware 6 12-04-2005 11:08 AM
installing ATI Proprietary drivers in Slacware 10 nickbird Slackware 5 11-25-2004 12:26 PM
ATI Proprietary Drivers 3.14 anomaly Keithjr Linux - Software 8 10-07-2004 12:22 AM
ATI proprietary video drivers and 2.6 kernel vasudevadas Linux - Hardware 3 05-24-2004 07:55 AM


All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
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