LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-13-2007, 01:07 AM   #1
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Fglrx and Kernel 2.6.20


I see that Kernel 2.6.20 has showed up in Sid. I have installed it a couple times from Experimental but have not been successful building fglrx (8.31.5, also in Experimental) using module-assistant.

The fglrx driver in Sid is still 8.28-4. Has anyone had success with either of those modules and 2.6.20?
 
Old 04-13-2007, 03:44 PM   #2
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
ATI does not have support for the 2.6.20.x kernel yet. I hear they plan to add support for it in fglrx 8.36.x

To be honest, I cant get fglrx 8.35.X on 2.6.19.x either, but they claim its supported. I dont remember now, but I think I had SATA troubles with 2.6.19.x (but not 2.6.20.x) - so fglrx might work for you with that kernel.

So, for now, I'm stuck with a custom 2.6.18.8 kernel on my system.
 
Old 04-14-2007, 10:32 PM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
There is a patch here...

http://darcs.frugalware.org/repos/fr...x-2.6.20.patch

...which supposedly allows the module to compile. I have not however read any success stories about it.

I'd be willing to try it, but I don't know how to apply the patch. It's just source code, so I suppose it just gets added to one of the files in /usr/src/modules/fglrx

Anybody want to try it, or attempt to explain to me exactly what needs to be done?

Last edited by rickh; 04-15-2007 at 11:23 AM.
 
Old 04-14-2007, 11:36 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I'm wondering if there is a "header" issue in the path here, as I also want to use this kernel but cannot compile modem modules without arch. specific headers to which won't be available till late next week, at best, according to the current agenda.
 
Old 04-14-2007, 11:39 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
I solved the "headers" problem by adding this line to my sources.list ...

deb http://kernel-archive.buildserver.net/debian-kernel/ trunk main
 
Old 04-15-2007, 04:17 PM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
I can't try it I have not an ATI.

Quote:
--- ATi/common/lib/modules/fglrx/build_mod/firegl_public.c.old 2007-03-28 21:39:58.000000000 -0400
+++ ATi/common/lib/modules/fglrx/build_mod/firegl_public.c 2007-03-28 21:39:46.000000000 -0400
Put the patch in your ATi directory (or whatever the name is, the only condition is that there should be a directory common under this directory)
Rename the file the patch will modify:
mv common/lib/modules/fglrx/build_mod/firegl_public.c common/lib/modules/fglrx/build_mod/firegl_public.c.old
Apply the patch:
patch -p1 ./blabla.patch
p1 means it will skip the part "ATi/"
You should have the patched file firegl_public.c
 
Old 04-15-2007, 04:42 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Code:
debian64:~# ls /usr/src/modules/fglrx/
agp3.c         debian          drm_proc.h          libfglrx_ip.a.GCC4
agp_backend.h  drm_compat.h    firegl_public.c     Makefile
agpgart_be.c   drm.h           firegl_public.h     make.sh
agpgart.h      drm_os_linux.h  i7505-agp.c         Module.symvers
agp.h          drmP.h          libfglrx_ip.a.GCC3  nvidia-agp.c
This is the source directory for fglrx. As you can see, there is no "common" directory, but there is a file, firegl_public.c

Is it likely that I can just rename firegl_public.c to firegl_public.c_old, and copy the patch here as firegl_public.c, ...

...or do the instructions you gave me affect other things, as well
 
Old 04-15-2007, 05:02 PM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Originally Posted by rickh
I solved the "headers" problem by adding this line to my sources.list ...

deb http://kernel-archive.buildserver.net/debian-kernel/ trunk main
Thanks, header packets appear to be coming down the line.
 
Old 04-16-2007, 01:23 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Ah ok,
For understanding what behind patch command line syntax:

On my last example, -p1 meant that the patch command will remove the first 1 subdirectory from the patch description (because I thought you had the same tree but not in Ati but maybe in my_Ati or whatever). -p1 is common because it's the root directory of the archive and the user may have rename it.

So, to adapt to your case, you need
1) To remove the complete 6 directories:
ATi/common/lib/modules/fglrx/build_mod/
2) Be in the directory which contains this damned firegl_public.c
So:
cd /usr/src/modules/fglrx/
mv firegl_public.c firegl_public.c.old <--- xxx.old is the name used in the header of the patch file (look my previous post), I did not invent it.
patch -p6 < ~rickh/fglrx-2.6.20.patch

At this point, you are supposed to rename /usr/src/modules/fglrx/ to /usr/src/modules/fglrx-patched/ so that you remember what you did (but in your case, it might create a problem if modules are listed somewhere else)

And remember: a patch file is a list of
+++ which means add this line to the old file to make the new file
--- which means remove this line to the...
Other lines are used by patch to resynchronise itself. Some different algorithm can be used.
The header is specific and list the complete file to patch and the resulting file it will produce. It contains lots of info.

So you CAN NOT replace a source file by a patch. It's not a C file.
I mean, you can physically.. but the results won't be pretty

If patch says reject, it means that it was unable to automatically apply the patch:
You are patching the wrong file (bad name or bad version of fglrx). You have to make sure the website from where you got the patch mentions the version of fglrx to apply the patch to.
If you have a too new or too old version of fglrx, you modify yourself the patch file. For this you need to understand the underlying program, in this case fglrx.. When you have this problem with kernel patch, it gets tricky..
 
Old 04-19-2007, 07:23 PM   #10
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Read several other threads about this ... people were having mixed success ...

Anyway ati has now posted 8.36.5 drivers on their site, so it's now a moot point. I installed them and they're working fine.

Thanks for the explanation tho, nx5000 ... Between that and other threads I've been reading, I think it kernel patches are starting to sink in.
 
Old 04-20-2007, 03:55 AM   #11
h3xis
Member
 
Registered: Jan 2005
Distribution: Debian "Lenny"
Posts: 66

Rep: Reputation: 15
Quote:
Originally Posted by rickh
Read several other threads about this ... people were having mixed success ...

Anyway ati has now posted 8.36.5 drivers on their site, so it's now a moot point. I installed them and they're working fine.

Thanks for the explanation tho, nx5000 ... Between that and other threads I've been reading, I think it kernel patches are starting to sink in.
How did you do this? I'm running 2.6.20.4 and installed the 8.36.5 drivers (running Lenny) and they install fine but I do not have 3D acceleration. Could you just post some of the steps that you did?
 
Old 04-20-2007, 08:53 AM   #12
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Download the installer and put it in ~/fglrx/

$ cd ./fglrx/
$ chmod +x ati-driver-installer-8.36.5-x86.x86_64.run
$ ./ati-driver-installer-8.36.5-x86_64.run --extract fglrx-tmp
$ cd fglrx-tmp
$ su (...and enter root password)
# ./packages/Debian/ati-packager.sh --buildpkg sid
# cd ..
# dpkg -i fglrx-amdcccle_8.36.5-1_amd64.deb
# dpkg -i fglrx-driver_8.36.5-1_amd64.deb
# dpkg -i fglrx-kernel-src_8.36.5-1_amd64.deb

Then I rebooted into Single User mode and...

# m-a prepare
# m-a a-i fglrx
# modprobe -v fglrx
# dpkg-reconfigure xserver-xorg

Then I edited the newly written xorg.conf file to use driver "fglrx" instead of "ati," rebooted, and everything worked.

Note: If you're using Lenny, substitute "lenny" for "sid" in the build-packages step. Also, as should be obvious, this was on an AMD64, but the 32-bit (i386) driver should work the same.

Last edited by rickh; 04-20-2007 at 08:59 AM.
 
Old 04-20-2007, 10:41 AM   #13
h3xis
Member
 
Registered: Jan 2005
Distribution: Debian "Lenny"
Posts: 66

Rep: Reputation: 15
Alright, I did as you said (which wasn't much different than what I had done) and I'm still getting the same problem. Basically, it's not wanting to load the kernel module. After modprobe -v fglrx it gives me this error:

Code:
[fglrx:firegl_init_module] *ERROR* firegl_stub_register failed
FATAL: Error inserting fglrx (lib/modules/2.6.20.4/misc/fglrx.ko): Operation not permitted
This is, of course, done as root and fglrx.ko does exist in that directory.
 
Old 04-20-2007, 10:51 AM   #14
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Quote:
Originally Posted by h3xis
Alright, I did as you said (which wasn't much different than what I had done) and I'm still getting the same problem. Basically, it's not wanting to load the kernel module. After modprobe -v fglrx it gives me this error:

Code:
[fglrx:firegl_init_module] *ERROR* firegl_stub_register failed
FATAL: Error inserting fglrx (lib/modules/2.6.20.4/misc/fglrx.ko): Operation not permitted
This is, of course, done as root and fglrx.ko does exist in that directory.
Try doing this:
Code:
rmmod radeon drm
Then try loading your fglrx module.

This often fixes the mentioned error.
 
Old 04-20-2007, 11:01 AM   #15
h3xis
Member
 
Registered: Jan 2005
Distribution: Debian "Lenny"
Posts: 66

Rep: Reputation: 15
Well, I've been using the vesa driver, however, I went ahead and did as you said and I got

ERROR: Module radeon does not exist in /proc/modules
ERROR: Module drm does not exist in /proc/modules
 
  


Reply



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
kernel 2.6.20 and fglrx stealth_banana Linux - Hardware 3 02-16-2007 12:47 PM
kernel 2.6.12.4 + fglrx 8.14.13 xushi Slackware 7 08-12-2005 07:05 PM
fglrx can't work with the kernel 2.6.10 kira Linux - Hardware 3 03-31-2005 10:38 AM
fglrx + KT400a + Kernel 2.6.2 andreban Slackware 1 02-13-2004 06:55 AM
How do I get fglrx working under kernel 2.6? kleptophobiac Linux - Hardware 3 12-10-2003 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:19 AM.

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