LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-21-2004, 07:13 PM   #1
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Rep: Reputation: 0
ati fglrx driver fedora core 2 with recompiled kernel


When i first install fc2, i came across this problem and saw many threads about fixing it via google, and it worked. fglrx compiled/installed fine.

However, upon recompiling the stock 2.6.5 kernel that comes with fc2, the module does not compile, and it appears as though I didn't patch the build_mod dir... I even did: rpm -e fglrx and started over, with no luck... here's what i've done since removing/reinstalling the fglrx driver rpm:

[root@fields fglrx]# cd /lib/modules/fglrx/build_mod/
[root@fields build_mod]# ls
2.6.x agpgart_be.c fglrx.ko i7505-agp.c libfglrx_ip.a.GCC3 nvidia-agp.c
agp3.c agpgart.h firegl_public.c libfglrx_ip.a make.log patch
agp_backend.h agp.h firegl_public.h libfglrx_ip.a.GCC2 make.sh
[root@fields build_mod]# patch -p1 < /var/tmp/fglrx/fglrx-3.7.6-fedora.patch
patching file 2.6.x/Makefile
patching file make.sh
[root@fields build_mod]# patch -p1 < /var/tmp/fglrx/fglrx-3.7.6-regparm.patch
patching file firegl_public.c
patching file firegl_public.h
patching file make.sh
[root@fields build_mod]# sh make.sh
ATI module generator V 2.0
==========================
initializing...
Error:
XFree86 drm includes at /usr/src/linux-2.6.5-1.358_abulletforeveryenemy/drivers/char/drm do not fit this driver.
This driver is designed to only work with X4.1.0 or higher.
You can match this by getting Linux kernel 2.4.8 or higher.
[root@fields build_mod]#

As you can see, I've patched it like normal with both of the patches, and yet, the result is the same. It did this in the old build_mod dir which I had sucessfully patched and built the module in for the last kernel. So i doubt it is a problem with patching. I didn't modify anything in the 'graphics' device driver section in the kernel config, but who knows what else is related to this.

Everything else on the system appears to be working just fine with my new kernel, however. Yes, this is a stock fc2 kernel source recompiled with a few .config modifications. Im not trying to use a kernel from kernel.org here

Any clues, hints, suggestions?
 
Old 05-21-2004, 11:27 PM   #2
feend
Member
 
Registered: Nov 2003
Location: williamsburgland
Distribution: Slackware
Posts: 61

Rep: Reputation: 16
You may want to try the 3.2.8 drivers. (Better FPS in games but harder to get running.) I run on Slack but I know a bit about the drivers. I don't use RPM. You can try to cd to /lib/modules/fglrx/build_mod and (as root) sh make.sh. Then cd to /lib/modules/fglrx and sh make_install.sh If you have problems post back and I will give ya a hand. We are doing it this way so we can get errors on the problem.
l8tr
Feend

Last edited by feend; 05-21-2004 at 11:38 PM.
 
Old 05-21-2004, 11:48 PM   #3
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
where can i pick up the 3.2.8 driver? thanks for the info
 
Old 05-22-2004, 04:36 PM   #4
feend
Member
 
Registered: Nov 2003
Location: williamsburgland
Distribution: Slackware
Posts: 61

Rep: Reputation: 16
http://www.opendrivers.com/driver/24...sh-Driver.html
Try google then try this. I have not downloaded from here but there is also a german site w/ the drivers.
L8tr
Feend
 
Old 05-23-2004, 01:20 AM   #5
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
ok, i downloaded that driver, and attempted to install it.

[root@fields build_mod]# sh make.sh
ATI module generator V 2.0
==========================
initializing...
probing for VMA API version...
cleaning...
patching 'highmem.h'...
skipping patch for 'drmP.h', not needed
skipping patch for 'drm_os_linux.h', not needed
doing Makefile based build for kernel 2.6.x and higher
make -C /lib/modules/2.6.5-1.358__9-athlon-preempt-4kb/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.5-1.358'
Building modules, stage 2.
MODPOST
*** Warning: "VMALLOC_VMADDR" [/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko] undefined!
make[1]: Leaving directory `/usr/src/linux-2.6.5-1.358'
build succeeded with return value 0
duplicating results into driver repository...
done.
==============================
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
==============================
[root@fields build_mod]# cd ..
[root@fields fglrx]# sh make_install.sh
- creating symlink
- recreating module dependency list
- trying a sample load of the kernel module
FATAL: Error inserting fglrx (/lib/modules/2.6.5-1.358__9-athlon-preempt-4kb/kernel/drivers/char/drm/fglrx.ko): Unknown symbol in module, or unknown parameter (see dmesg)
failed.


... in dmesg:

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
fglrx: Unknown symbol VMALLOC_VMADDR

fixable?
 
Old 05-23-2004, 03:53 AM   #6
arnyswart
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
I have the same problem, on ati's website it basically says that their drivers do not work with the 2.6 kernel. It is in development and will be released shortly?

Can anyone help us?

Arny!
 
Old 05-23-2004, 04:17 AM   #7
esears
Member
 
Registered: Mar 2004
Location: Iraq, Baghdad
Posts: 32

Rep: Reputation: 15
vmalloc path

You need to apply the vmalloc patch. It is as follows:

diff -ruN build_mod.orig/firegl_public.c build_mod/firegl_public.c
--- build_mod.orig/firegl_public.c 2003-09-05 00:45:33.539384168 +0200
+++ build_mod/firegl_public.c 2003-09-05 00:47:13.193234480 +0200
@@ -129,7 +129,9 @@
#define pte_offset pte_offset_map
#endif
#endif
-
+#ifndef VMALLOC_VMADDR
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#endif
// ============================================================
#ifndef TRUE
#define TRUE 1

Just copy and paste it into a file. (vmalloc.patch works well)

cd /lib/modules/fglrx/build_mod

patch -p1 < vmalloc.patch

This will patch the files (mainly firegl_public.c). Works fine on my system. Running 2.6.6 kernel with X.org 6.70 and it all works fine.

What I had to do though to get it working was to compile agpgart, intel865 agp drivers and the DRM ati radeon all as modules. Then I rpm2tgz the driver packages and unpacked in in the root directory. Did fglrxconfig and answered with the appropriate answers and it worked on the first try. Most of the above information however was off this board and I'm thankful

If you are running an AMD processor there is another patch for it and you can find it if you search here. But since I run intel I don't have it offhand.
 
Old 05-23-2004, 04:46 AM   #8
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
[root@fields fglrx]# cd /lib/modules/fglrx/build_mod/
[root@fields build_mod]# patch -p1 < /var/tmp/fglrx/vmalloc.patc
patching file firegl_public.c
patch: **** malformed patch at line 5: #define pte_offset pte_offset_map

tried removing the rpm, deleting /lib/modules/fglrx, and installing again, doing the vmalloc patch first... same thing.

any idea? and yes, i am using an AMD processor (xp2400+).
 
Old 05-23-2004, 04:04 PM   #9
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Actually, I went ahead and compiled a 2.6.6 kernel from kernel.org, and all is well everything works system-wide, and the ati fglrx driver installs ITSELF with the rpm! A first!!!! I couldnt believe it when it did all the make.sh and it actually worked (yes, for 3d). So quake3 runs as good as it can run on such a weak driver and glxgears gives me about 4580 fps.

But I'm interested in how many more fps the older driver provides? Does it have the same tearing/checkerboarding problem as the newer fglrx drivers? i would assume so. Thanks for the help!!!!
 
Old 05-23-2004, 10:20 PM   #10
arnyswart
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
That sounds incredible. Now I am stuck. I have a newbie question. How do you recompile the Kernel 2.6.6 driver since I have never compiled it before and which driver did you end up installing and how do you do that.

I know how to install the driver normally in init 3 mode. can someone help me?

Arny!
 
Old 05-24-2004, 01:04 AM   #11
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
well, im not sure what you mean by "2.6.6 driver".. but here's what I did to get it all working, and i must say, my system is running better than ever ...

1. download the 2.6.6 kernel source from www.kernel.org --
su
[enter pass]
cd /usr/src
wget http://www.kernel.org/pub/linux/kern...-2.6.6.tar.bz2

2. decompress the kernel source tree --
bzip2 -cd linux-2.6.6.tar.bz2 | tar xf -

3. grab a fc2 config.. you can use the one in /boot --
cd linux-2.6.6/
cp /boot/config-2.6.5-1.358 .config

4. normal kernel compilation process --
make menuconfig
(in here, i chose to use 4k stacks under the KERNEL HACKING section.
this is a new feature in 2.6.6 that fc2 'patches' for, but its not in the menuconfig
for 2.6.5.)
vi Makefile
(i add some stuff to the EXTRA VERSION line, line 4. you dont have to.)
make all && make modules_install && make install

5. reboot, and be sure to select the new (top) kernel. you can change the default in /etc/grub.conf.

6. be sure everything starts ok (no kernel panics :P). it should.

7. ATI driver time. If you've attempted to install the 3.7.6 (latest) fglrx rpm before, remove it --
su
[enter pass]
rpm -e fglrx

8. Install the fglrx rpm like normal --
rpm -ivh --replacefiles /path/to/fglrx-4.3.0-3.7.6.i386.rpm

9. it should say "failed to find precompiled kernel module for your kernel", which is fine. It should then run the make.sh and attempt to build the module, and it should succeed. You should not see any "failed, go to /lib/modules/fglrx/build_mod blah blah". It should install ok.

10. Verify it really did make the module ok by modprobing it youself --
/sbin/modprobe fglrx

no errors should occur, it should just go to the next line in the terminal. if errors occured, check dmesg... but you're gonna need more help than this little guide provides hehehe

11. do all the xorg.conf editing (at the least, change the driver from 'radeon' to 'fglrx'. )

That's basically what i did. all is well with 2.6.6, im very very happy with its performance & stability Yes, i am using the latest ati fglrx driver, 3.7.6. thanks for everyones help!!!

-smthmlk
 
Old 05-24-2004, 01:28 AM   #12
arnyswart
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
ok sorry newbie question but in step 2 what is a fc2 config...? I use Grub bootloader for a dual boot system.

Quote:
3. grab a fc2 config.. you can use the one in /boot --
cd linux-2.6.6/
cp /boot/config-2.6.5-1.358 .config
The only other step is step 11 which I am not sure how to do, hopefully I am not sounding too much like a n00b but rather a newbie.

Arny!
 
Old 05-24-2004, 04:35 AM   #13
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
just do the commands given there...

the config file for the kernel that comes with fc2 is in /boot, it's called config-2.6.5-1.358. basically all that command does is copies it to /usr/src/linux-2.6.6, and at the same time renames it to ".config". This way you don't have to do anything really to configure the kernel in "make menuconfig". i guess i should have added that... hehe oh well.

as for 'step 11', once you install the rpm, it will run some scripts and compile/install the fglrx module. it will then say "now run fglrxconfig" or something like that. Just do what it says.. or, just do this as root:

cd /etc/X11 ; mv xorg.conf xorg.conf_old
sed "s/radeon/fglrx/" xorg.conf_old > xorg.conf

... and then restart x (cntrl+alt+backspace, or just reboot). Be sure to do those commands EXACTLY as they are, or things will get messed up


however, i seem to be experiencing some xorg/fglrx problems with hard locking in quake3 after playing for about 15-20 minutes. I'm going to install ut2k3 and see if the problem persists there and see what else i can figure out about it.

you might want to hold off doing that whole procedure with a new kernel until i come up with a theory on this hard-locking problem :P
 
Old 05-24-2004, 06:46 AM   #14
arnyswart
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
Thanks

I got the drivers and the new kernel installed but seem to be back at square one. My initial problem was with the latest drivers and the 3.2.8 drivers UT would crash without warning after 20-30 min. Now UT will not load at all but I am going to try reinstalling it. I am getting about 328 fps from glxgears which I am lead to believe is rather slow for an ATI radeon 9700 Pro.

And here I though an operating system based around the 2.6 kernel would fix my problems since only 2.6 seems to be able to handle the bandwidth that I need in gaming.

Arny!

Last edited by arnyswart; 05-24-2004 at 06:47 AM.
 
Old 05-24-2004, 01:44 PM   #15
smthmlk
LQ Newbie
 
Registered: May 2004
Posts: 15

Original Poster
Rep: Reputation: 0
you should get around ~4000-4500 fps in glxgears in the normal size window it comes up in.

do this command: fglrxinfo

[smthmlk@fields smthmlk]$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9800 Pro Generic
OpenGL version string: 1.3 (X4.3.0-3.7.6)


I would assume yours says "Mesa GL" in there somewhere, version 1.2, meaning you're not using the fglrx driver.
 
  


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
ATI Driver and Fedora Core 3 CircuitSix Linux - Software 1 03-30-2005 02:13 PM
ati fglrx 8.10.19 driver help please micker Linux - Software 7 03-13-2005 09:44 PM
fedora core 1 ATI driver woes nuk3 Linux - Hardware 12 11-02-2004 03:21 PM
Fedora core 2 vs. ATI's Radeon fglrx driver IgD Red Hat 0 03-14-2004 05:17 AM
Fedora Core 2 test and ATI driver problems IgD Linux - Hardware 1 03-14-2004 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:04 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
Open Source Consulting | Domain Registration