Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 71009

Summary: kernel 2.6.9-gentoo-r3 cannot load ati-drivers
Product: Gentoo Linux Reporter: Ioannis Aslanidis (RETIRED) <deathwing00>
Component: [OLD] Core systemAssignee: x86-kernel (DEPRECATED) <x86-kernel>
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-12 14:00:52 UTC
I have tested this out widely. kernel 2.6.9-gentoo-r3 cannot load fglrx
Even kernel 2.6.9-gentoo-r1 and 2.6.10-rc1 load the module correctly, but this specific version fails.

Additionally I have tried switching from xorg-x11 to xfree... obviously no way.


Reproducible: Always
Steps to Reproduce:

Portage 2.0.51-r3 (gcc34-x86-2004.2, gcc-3.4.3, glibc-, 
entoo-r3 i686) 
System uname: 2.6.9-gentoo-r3 i686 AMD Athlon(tm) XP 2100+ 
Gentoo Base System version 1.6.6 
distcc 2.18 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.59-r5 
Automake: sys-devel/automake-1.8.5-r1 
Binutils: sys-devel/binutils- 
Headers:  sys-kernel/linux26-headers- 
Libtools: sys-devel/libtool-1.5.2-r7 
CFLAGS="-O3 -march=athlon-xp -ftracer -fomit-frame-pointer -ffast-math -pipe 
orce-addr -fforce-mem -falign-functions=4" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2 
/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown / 
usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/sha 
re/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/gen 
eric/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qma 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O3 -march=athlon-xp -ftracer -fomit-frame-pointer -ffast-math -pipe 
fforce-addr -fforce-mem -falign-functions=4" 
FEATURES="autoaddcvs buildpkg ccache distlocks fixpackages sandbox 
USE="3dnow 3dnowex X aalib acpi acpi4linux alsa apache2 apm arts audiofile avi 
erkdb bitmap-fonts blender-game bluetooth bootsplash bzlib c++ caps cddb 
ll cdparanoia cdr cdrom chroot clamav clanVoice codecs crypt cups curl dga dio 
irectfb divx4linux dvd dvdr dvdread encode erandom esd ethereal f77 fastcgi 
n flac flash foomaticdb fortran freetype gd gdbm ggi gif gimp gimpprint gmp 
e gphoto2 gpm gstreamer gtk gtk2 icq imagemagick imlib ipv6 java jikes jpeg 
t kde lcms ldap libg++ libwww live mad makecheck memlimit mikmod mmx mmx2 
mozilla mpeg msn mysql ncurses network nls nocd nptl nptlonly oggvorbis opengl 
ss pam pdflib perl pic png ppds python qt quicktime readline rtc samba sdl 
on slang spell sse ssl svg svga szip tcltk tcpd tetex tiff truetype ttf 
usb userlocales v4l v4l2 videos wmf x86 xml xml2 xmms xv xvid zlib linguas_es 
Comment 1 Jan Drugowitsch 2004-11-12 17:47:28 UTC
I am using 2.6.9-gentoo-r3 and have no problems with ati-drivers-3.14.1. The module loads straight away. lsmod gives:
fglrx                 228668  9
I am using xorg-x11-6.7.0-r2, my card is a FireGL 2 Mobility.

Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-, 2.6.9-gentoo-r3 i686)
System uname: 2.6.9-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1700MHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux26-headers-
Libtools: sys-devel/libtool-1.5.2-r5
CFLAGS="-O2 -mcpu=i686 -march=pentium3 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -march=pentium3 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms"
USE="X aalib acpi alsa apm arts avi berkdb bitmap-fonts bzlib cdr crypt cscope cups dga directfb divx4linux doc dvd dvdr emacs encode esd f77 fam fbcon flac foomaticdb fortran ftp gdbm gif gpm imagemagick imlib ipv6 java jpeg junit kde libg++ libwww mad maildir mbox mikmod mmx mng motif mpeg mysql ncurses nls nptl oggvorbis opengl pam pcmcia pdflib perl png python qt quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype usb x86 xine xinerama xml2 xosd xv zlib"
Comment 2 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-13 01:12:12 UTC
There are many differences between your system and my system. There is a problem indeed. I have even tried recompiling the kernel from scratch with no effects. This latest gentoo patch has got a problem in there.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2004-11-13 03:50:23 UTC
Please be more specific - what happens when you try and load the module?
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-13 04:14:54 UTC
FATAL: Error inserting fglrx (/lib/modules/2.6.9-gentoo-r3/video/fglrx.ko): Invalid module format
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2004-11-13 04:41:12 UTC
Does dmesg say anything about it?
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-13 06:39:55 UTC
It does:

fglrx: version magic '2.6.9-gentoo-r3 preempt K7 4KSTACKS gcc-3.4' should be '2.6.9-gentoo-r3 preempt K7 REGPARM 4KSTACKS gcc-3.4'
fglrx: version magic '2.6.9-gentoo-r3 preempt K7 4KSTACKS gcc-3.4' should be '2.6.9-gentoo-r3 preempt K7 REGPARM 4KSTACKS gcc-3.4'
fglrx: version magic '2.6.9-gentoo-r3 preempt K7 4KSTACKS gcc-3.4' should be '2.6.9-gentoo-r3 preempt K7 REGPARM 4KSTACKS gcc-3.4'

It asks me to compile the kernel with the Register Parameters option... 2.6.9-gentoo-r1 isn't compiled with that either and it works... anywaym I'll change it and hope it'll work.
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2004-11-13 07:04:18 UTC
Just recompiling both your kernel and ati-drivers package should do the trick. Every time you change something like this you do need to recompile to avoid problems with external modules.
Comment 8 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-13 07:11:40 UTC
I think you missunderstood me. I did recompile both the kernel and the ati-drivers every time. The problem is that in kernel 2.6.9-gentoo-r3 the EXPERIMENTAL option "Register Arguments" must be activated if you want fglrx to load. 

Let me explain:

Register Arguments Off
Compile ati-drivers
fglrx loads fine

Register Arguments Off
Compile ati-drivers

Register Arguments On
Compile ati-drivers
fglrx loads fine

I have been compiling ati-drivers each time I was doing a change to the kernel, and the bug is still there. gentoo-patches in 2.6.9-gentoo-r3 force the user to have Register Arguments enabled in order to allow fglrx to load.
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2004-11-13 08:41:08 UTC
I can fairly safely say offhand that the few changes between 2.6.9-r1 and -r3 are not major enough to influence anything like this.
I can confirm that these changes are definately not the problem with the information you have given me.

This message:
> fglrx: version magic '2.6.9-gentoo-r3 preempt K7 4KSTACKS gcc-3.4' should be '2.6.9-gentoo-r3 preempt K7 REGPARM 4KSTACKS gcc-3.4'

says that
1. the fglrx module was compiled against kernel object files with version magic "2.6.9-gentoo-r3 preempt K7 4KSTACKS gcc-3.4"
2. the current kernel image was compiled against kernel object files with version magic "2.6.9-gentoo-r3 preempt K7 REGPARM 4KSTACKS gcc-3.4"

Regardless of any changes between the two kernel versions that might have influenced anything like this, this problem occurs too early on: it won't load the module because it detects the differences in config/compiler settings.

If you had compiled fglrx against REGPARM kernel object files, the version magic strings would be identical and this conflict would not occur.

I have just run a test locally, and deduced that fglrx definately will compile with both REGPARM enabled and also REGPARM disabled:
1. /usr/src/linux contains a non-REGPARM kernel. I emerge ati-drivers-3.14.1
2. "modinfo /lib/modules/2.6.9-gentoo-r4/video/fglrx.ko" shows:
   vermagic:       2.6.9-gentoo-r4 preempt K7 gcc-3.4
3. I modify my kernel config to enable REGPARM and recompile it.
4. I re-merge ati-drivers, and run the modinfo command again. I get:
   vermagic:       2.6.9-gentoo-r4 preempt K7 REGPARM gcc-3.4

As you can see, ATI drivers definately compiles with regparm and also without regparm depending on your kernel objects. Notice that I didn't even have to reboot into the new kernel image to get this to change, it was happy to make this change by just linking against the kernel object files in /usr/src/linux.

So, as this is is just simply a vermagic conflict, it's an error at your end. You should be able to correct this relatively easily.
Comment 10 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-11-13 09:07:25 UTC
The important thing is that now it works and that I cannot waste more time on this. Elsewhere I would try recompiling everything from scratch and trying again. But anyway... VERIFIED.