# ATI Drivers dont load

## digitalexpl0it

I just installed gentoo 2005 from stage1 and I got X, gnome and the ati drivers compiled but when I load X the fglrx will not load but I still get into Xwindows just have no direct rendering

Error:

FATAL: Error inserting fglrx (/lib/modules/2.6.11-gentoo-r6/video/fglrx.ko): Unknown symbol in module, or unknown parameter (see dmesg)

I have tried ati-drivers 8.8.25-r3 and 8.10.19 with the same error

Kernel info:

Linux daemon 2.6.11-gentoo-r6 #1 SMP Mon Apr 25 19:42:39 UTC 2005 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

My make.conf file

CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -march=pentium4 -pipe"

CHOST="i386-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

USE="-qt -kde gtk gtk2 gnome dvd alsa cdr gtkhtml avi mpeg jpeg png gif tiff bitmap-fonts crypt cups samba gpm imlib motif ncurses ogg oggverbis opengl pdflib python sdl spell ssl svga tcpd truetype X xml2 xmms zlib java acpi directfb freetype mozilla mp3 pcmcia pnp usb vcd videos win32codecs wifi wmf x86"

ALSA_CARDS="intel8x0"

----------

## nopsled

Check your syslog after modprobe'ing the fglrx driver.

# dmesg

It should show something related to gcc-3.3 *or* gcc-3.4

You may need to switch your compiler (with gcc-config) to either 3.3 or 3.4, depending on your setup.

----------

## R4miu5

i've also got a problem with my ati-drivers.

i use 2.6.12-rc2-mm3

and modprobe says:

```

modprobe fglrx

FATAL: Module fglrx not found.

```

i used this tutorial (german):

https://forums.gentoo.org/viewtopic-t-282983.html

before it worked with my old kernel (2.6.11-r2)

any suggestions?

----------

## nopsled

If you've upgraded your kernel you'll have to re-emerge ati-drivers also.

----------

## digitalexpl0it

it says gcc 3.3.5-20050130

so do I need to change it to a lower gcc?

here is what dmesg says

 *Quote:*   

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

 

----------

## jdgill0

 *digitalexpl0it wrote:*   

> it says gcc 3.3.5-20050130
> 
> so do I need to change it to a lower gcc?
> 
> 

 

You did not read nopsled's post carefully ... nopsled said if you have changed your kernel, then you need to re-emerge the ati-drivers -- which is the correct thing to do if you have upgraded your kernel.

----------

## R4miu5

i DID recompile the ati-drivers

----------

## nopsled

digitalexpl0it - I'm thinking your problem is you compiled the ati-drivers with a different version of gcc than you compiled your kernel with. If you used 3.3, then try re-emerging after you use gcc-config to switch to gcc-3.4, or vice-versa. Worst case, you can just re-emerge with gcc-3.3, and if still gives 'invalid module format' then try it with gcc-3.4.

Try it and let us know. And when I say try it with gcc-3.4, that doesn't mean emerge gcc-3.4 if you don't have it already emerged  :Smile:  If you haven't emerged slotted gcc versions, then you'll need a different solution than the one I'm thinking of.

R4miu5 - Check /lib/modules/2.6.12-rc2-mm3/video

You should see fglrx.ko. If not, then you need to re-emerge ati-drivers. If you already did, you should check the /usr/src/linux symlink and see if it points to /usr/src/2.6.12-rc2-mm3. I'm not sure, but I think the build checks that to see which kernel version to build/link against.

----------

## R4miu5

thx for answer, but i already tried both.

there is no! module in /lib/modules/2.6.12-rc2-mm3/video

symlink is correct, and i recompiled ati-drivers about 10 times now  :Confused: 

----------

## jdgill0

Did you add support for agpgart in the kernel? -- had to ask, as you never know (yes I saw it was listed on the German howto), which brings me to asking if you added it as a module as shown in the howto?  If so, see if you even have the agpgart module loaded with lsmod ... if not, try modprobe agpgart, afterwards trying again with X. ... if this turns out to be the case, be sure to add agpgart to /etc/modules.autoload.d/kernel-2.6.

----------

## R4miu5

```
be sure to add agpgart to /etc/modules.autoload.d/kernel-2.6.
```

it is added:

```
cat /etc/modules.autoload.d/kernel-2.6

# For example:

# 3c59x

fglrx

agpgart
```

modprobe agpgart works

----------

## Wedge_

1. You should load fglrx after the kernel AGP modules if you're using the kernels AGP support.

2. On 2.6 kernels, you need to load two AGP modules; agpgart and via-agp or intel-agp or nvidia-agp etc (the second one depends on the type of motherboard you have).

3. I would be very surprised if the ATI driver compiled successfully against the kernel you're using. Check the output of the ebuild carefully - it doesn't actually fail if the driver module isn't compiled. Unless you really need to be running the latest mm-sources, an older version will be more likely to work with the driver.

----------

## digitalexpl0it

ok ill try the agpart, thing is I did compile the kernel 3 times with the same gcc version. The last time I just used genkernel -udev all

so I guess agpart is a module so ill have to load that. I always ompile the kernel manually and take everything out except what I need, but since this was a clean install I wanted to get everything done first then go back and redo the kernel

----------

## digitalexpl0it

ok I recompiled the kernel manually and I found agpart and dri was not in the kernel at all, I added them as a module then compiled now it works, why when you do a "genkernel --udev all" it doesnt compile agpart or dri?

----------

## R4miu5

my problem isn't solved by now...

i use 2.6.11-mm4 now and the outbut of emerge ati-drivers writes this passages:

```
/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:6523: warning: 'agp_check_supported_device' defined but not used

make[1]: *** [/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.o] Error 1

make: *** [_module_/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod] Error 2

make: Leaving directory `/usr/src/linux-2.6.11-mm4'

 * DRM module not built

>>> Test phase [not enabled]: media-video/ati-drivers-8.12.10

>>> Install ati-drivers-8.12.10 into /var/tmp/portage/ati-drivers-8.12.10/image/ category media-video

install: cannot stat `/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/fglrx.ko': No such file or directory

man:

making executable: /usr/lib/libfglrx_gamma.so.1.0

>>> Completed installing ati-drivers-8.12.10 into /var/tmp/portage/ati-drivers-8.12.10/image/

```

and this one

```

 * Invalid usage.

opengl-update 2.2.0

Usage: opengl-update [<options>] <GL implementation>

       Set the opengl implementation.

       Valid options:

       --use-old:          If an implementation is already set, use that one.

       --prefix=<val>:     Set the source prefix (default: /usr)

       --dst-prefix=<val>: Set the destination prefix (default: /usr)

       --impl-headers:     Use headers provided by this implementation to

                           override golbal ones provided by opengl-update.

Usage: opengl-update --get-implementation

       Print the current implementaion

Notes:

       --impl-headers was default in <opengl-update-2.2.

       This utility switches between OpenGL implementations.  There are

       2 available implementations: ati xorg-x11

```

this is the complete output:

```
 emerge ati-drivers

Calculating dependencies ...done!

>>> emerge (1 of 1) media-video/ati-drivers-8.12.10 to /

>>> md5 files   ;-) ati-drivers-8.10.19.ebuild

>>> md5 files   ;-) ati-drivers-8.12.10.ebuild

>>> md5 files   ;-) ati-drivers-8.8.25-r3.ebuild

>>> md5 files   ;-) files/09ati

>>> md5 files   ;-) files/8.8.25-smp.patch

>>> md5 files   ;-) files/8.8.25-via-amd64.patch

>>> md5 files   ;-) files/fglrx-2.6-iminor.patch

>>> md5 files   ;-) files/3.2.5-linux-2.6.0-test6-mm.patch

>>> md5 files   ;-) files/8.08-kernel-2.6.10.patch

>>> md5 files   ;-) files/digest-ati-drivers-8.10.19

>>> md5 files   ;-) files/digest-ati-drivers-8.12.10

>>> md5 files   ;-) files/digest-ati-drivers-8.8.25-r3

>>> md5 files   ;-) files/fglrx-2.6-amd-adv-spec-fix.patch

>>> md5 files   ;-) files/fglrx-2.6-fix-deprecated.patch

>>> md5 files   ;-) files/fglrx-2.6-get-page.patch

>>> md5 files   ;-) files/fglrx-2.6-makefile.patch

>>> md5 files   ;-) files/fglrx-2.6-pagetable.patch

>>> md5 files   ;-) files/fglrx-2.6-vmalloc-vmaddr.patch

>>> md5 files   ;-) files/fglrx-2.6.10-pci_get_class.patch

>>> md5 src_uri ;-) fglrx_6_8_0-8.12.10-1.i386.rpm

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.11-mm4

 * Checking for MTRR support enabled ...                                  [ ok ]

 * Checking for AGP support enabled ...                                   [ ok ]

 * Checking for DRM support disabled ...                                  [ ok ]

 * X11 implementation is xorg-x11.

>>> Unpacking source...

>>> Unpacking fglrx_6_8_0-8.12.10-1.i386.rpm

 * Applying fglrx-2.6-pagetable.patch ...                                 [ ok ]

 * Applying 8.8.25-via-amd64.patch ...                                    [ ok ]

 * Applying 8.8.25-smp.patch ...                                          [ ok ]

>>> Source unpacked.

 * Building the DRM module...make: Entering directory `/usr/src/linux-2.6.11-mm4'

  CC [M]  /var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agp3.o

  CC [M]  /var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/nvidia-agp.o

  CC [M]  /var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.o

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `agp_find_supported_device':

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7150: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7170: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7175: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7201: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7221: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7241: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7246: error: structure has no member named `slot_name'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be

.c:6542: warning: unused variable `cap_ptr'

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `__fgl_agp_init':

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7627: warning: `pm_register' is deprecated (declared at include/linux/pm.h:106)

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c: In function `__fgl_agp_cleanup':

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:7637: warning: `pm_unregister_all' is deprecated (declared at include/linux/pm.h:116)

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c: At top level:

/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.c:6523: warning: 'agp_check_supported_device' defined but not used

make[1]: *** [/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/agpgart_be.o] Error 1

make: *** [_module_/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod] Error 2

make: Leaving directory `/usr/src/linux-2. * DRM module not built

>>> Test phase [not enabled]: media-video/ati-drivers-8.12.10

>>> Install ati-drivers-8.12.10 into /var/tmp/portage/ati-drivers-8.12.10/image/ category media-video

install: cannot stat `/var/tmp/portage/ati-drivers-8.12.10/work/lib/modules/fglrx/build_mod/fglrx.ko': No such file or directory

man:

making executable: /usr/lib/libfglrx_gamma.so.1.0

>>> Completed installing ati-drivers-8.12.10 into /var/tmp/portage/ati-drivers-8.12.10/image/

6.11-mm4

<merging> * Invalid usage.

opengl-update 2.2.0

Usage: opengl-update [<options>] <GL implementation>

       Set the opengl implementation.

       Valid options:

       --use-old:          If an implementation is already set, use that one.

       --prefix=<val>:     Set the source prefix (default: /usr)

       --dst-prefix=<val>: Set the destination prefix (default: /usr)

       --impl-headers:     Use headers provided by this implementation to

                           override golbal ones provided by opengl-update.

Usage: opengl-update --get-implementation

       Print the current implementaion

Notes:

       --impl-headers was default in <opengl-update-2.2.

       This utility switches between OpenGL implementations.  There are

       2 available implementations: ati xorg-x11

Examples:

       opengl-update xorg-x11

       This will setup things to use libGL.so from X.o

       opengl-update nvidia

       This will setup things to use libGL.so from the nVidia drivers.

>>> original instance of package unmerged safely.

 * To switch to ATI OpenGL, run "opengl-update ati"

 * To change your XF86Config you can use the bundled "fglrxconfig"

 * ***

 * If you are experiencing problems with memory allocation try to add

 * this line to in your X11 configuration file:

 *              Option "KernelModuleParm"  "agplock=0" 

 * That should solve the hangups you could have with Neverwinter Nights

 * ***

>>> Regenerating /etc/ld.so.cache...

 * Caching service dependencies ...                                       [ ok ]

>>> media-video/ati-drivers-8.12.10 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 41 config files in /etc need updating.

 * Type emerge --help config to learn how to update config files.

```

any ideas, do i have to activate drm in the kernel?

----------

## jdgill0

 *Quote:*   

> ... any ideas, do i have to activate drm in the kernel?

 

You do not need to activate drm in the kernel. If you did, it would have to be as modules, but then when you emerge ati-drivers, the kernel's modules would get overwritten by those in ati-drivers.

----------

## Cuchulainn

I've got the same problem. AGP support is compiled in as a module, and drm is off. This used to work with my old kernel. Recompiled the driver, checked the symlink, everything seems to be in order, but still no drm module is being built. Output is the same as above.

----------

## Wedge_

What is happening is that the driver is failing to compile because your kernel is new and/or heavily patched. It can't be expected to work with the huge variety of different kernels out there, or to keep up with the latest patchsets. If you like to run kernels that are newly released or have been heavily patched, you need to be ready for this type of thing to happen, because it's not uncommon. The driver necessarily depends on some functions and data structures in the kernel. The kernel you're using has changed or removed these, so attempting to compile the driver produces errors because it can't find them, and you end up without a kernel module. I really wish the ebuild would abort if the kernel module fails to compile, because it would emphasise that there's a problem, and I see posts like these all the time. 

Anyway, you have two options: 

1. Find a patch for the driver that updates it to compile against newer kernels (check the forums here, the Linux forum at Rage3D.com, and Google)

2. Use an older / less patched kernel.

----------

## Cuchulainn

I tried gentoo-sources, vanilla-sources and mm-sources. All of them fail....

----------

