# Fglrx [solved]

## supernov

Hi guys and girls,

Yes I know, bit of a boring and repeating issue. But I seem to have a slightly different problem than most users I encounter on this forum.

I can't get my fglrx-module to load.

System: Gentoo 2.6.15-r1 with ati-drivers 8.24.8 installed using ati's graphical installer

Problem: fglrx modules refuses to load

Code, relevant dmesg notifications:

```
lp: driver loaded but no devices found

Linux agpgart interface v0.101 (c) Dave Jones

[drm] Initialized drm 1.0.0 20040925

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 5

PCI: setting IRQ 5 as level-triggered

ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 5 (level, low) -> IRQ 

5

[drm] Initialized radeon 1.19.0 20050911 on minor 0: 

...

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERM

ANY' taints kernel.

fglrx: Unknown symbol module_refcount

EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hdb3, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

eth0: Media Link On 100mbps full-duplex 

[drm:drm_unlock] *ERROR* Process 6238 using kernel context 0

```

And fglrxinfo, showing no modules loaded:

```
display: :0.0  screen: 0

OpenGL vendor string: Mesa project: www.mesa3d.org

OpenGL renderer string: Mesa GLX Indirect

OpenGL version string: 1.2 (1.5 Mesa 6.2.1)

```

xorg.conf:

```
Section "ServerLayout"

        Identifier     "Simple Layout"

        Screen      0  "aticonfig Screen 0" 0 0

        InputDevice    "Mouse1" "CorePointer"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

Section "Files"

        RgbPath      "/usr/X11R6/lib/X11/rgb"

        FontPath     "/usr/share/fonts/misc/"

        FontPath     "/usr/share/fonts/TTF/"

        FontPath     "/usr/share/fonts/Type1/"

        FontPath     "/usr/share/fonts/75dpi/"

        FontPath     "/usr/share/fonts/100dpi/"

        FontPath     "/usr/share/fonts/local/"

EndSection

Section "Module"

        Load  "dbe"     # Double buffer extension

        SubSection "extmod"

                Option      "omit xfree86-dga"   # don't initialise the DGA extension

        EndSubSection

        Load  "type1"

#    Load        "speedo"

        Load  "freetype"

#    Load        "xtt"

        Load  "dri"

# This loads the DRI module

        Load  "glx"

EndSection

Section "InputDevice"

        Identifier  "Keyboard1"

        Driver      "kbd"

        Option      "AutoRepeat" "500 30"

        Option      "XkbRules" "xorg"

        Option      "XkbModel" "pc101"

        Option      "XkbLayout" "us"

EndSection

Section "InputDevice"

        Identifier  "Mouse1"

        Driver      "mouse"

        Option      "Protocol" "Auto"

        Option      "Device" "/dev/input/mouse0"

        Option      "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

        Identifier   "Philips"

        HorizSync    31.5 - 79.0

        VertRefresh  50.0 - 70.0

EndSection

Section "Monitor"

        Identifier   "aticonfig Monitor 0"

EndSection

Section "Device"

    # Insert Clocks lines here if appropriate

        Identifier  "Ati Radeon 9600"

        Driver      "radeon"

        VideoRam    131072

EndSection

Section "Device"

        Identifier  "ATI Graphics Adapter 0"

        Driver      "fglrx"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "Screen 1"

        Device     "Ati Radeon 9600"

        Monitor    "Philips"

        DefaultDepth     16

        SubSection "Display"

                Viewport   0 0

                Depth     8

                Modes    "1280x1024" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     16

                Modes    "1280x1024" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     24

                Modes    "1280x1024" "1024x768" "800x600" "640x480"

        EndSubSection

EndSection

Section "Screen"

        Identifier "aticonfig Screen 0"

        Device     "ATI Graphics Adapter 0"

        Monitor    "aticonfig Monitor 0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

Section "DRI"

        Mode         0666

EndSection

```

Hope you can help. I followed the guides telling me what to and what not to select in my kernel-config, so that should be fine I guess.

Cheerz, VincentLast edited by supernov on Mon May 15, 2006 3:15 pm; edited 1 time in total

----------

## supernov

Yep, it's dull allright.  :Smile:  No-one who wants to explain it again?

----------

## kingnosis

What's your output from lsmod?

----------

## supernov

Nothing. I have agpgart and sis_agp in the kernel, fglrx is trying to load at start-up, but fails.

I already tried agpgart and sis_agp as modules, etc. Or using an older version of the ati-drivers.

It almost seems as if the kernel version isn't compatible??

Another thing I tried was to use the radeon-driver, but then I need to compile x11-drm...which fails! aaah  :Smile: 

----------

## gbetous

what is your Xorg version ? because I have some troubles with the new x11-base/xorg-server-1.0.99.901 ...

----------

## kingnosis

The ati-drivers are compiled against the kernel sources, so if you upgrade your kernel, you'll need to recompile the ati-drivers. That might help.

I'm also wondering about this line from your dmesg: 

```
[drm] Initialized radeon 1.19.0 20050911 on minor 0:
```

 This means you've loaded 'radeon' drivers  (instead of 'fglrx' drivers). This could be from a framebuffer or some other part of the kernel config. It seems likely that these other drivers might be blocking fglrx from loading.

----------

## bobspencer123

do you have dri enabled in your kernel? If so that might be your problem it conflicts with the direct rendering manager provided by ati's drivers. So make sure that you don't have dri section in your kernel (right under the agpgart stuff) enabled or modularized.

----------

## supernov

Not sure how to see my current Xorg version. 6.8.2 I believe...

The dri is disabled indeed, as was the suggestion on that handy ati page. And I also wondered about that drm-thingy still being loaded,

I checked the entire kernel for things like that. Though I now disabled framebuffer support completely to test that.

I'll give you the results later on. Thanks for now though! Great to have some response to this.  :Smile: 

----------

## supernov

How unfortunate, that didn't change a thing. Still that unknown module-refcount symbol problem for the fglrx module.

Almost as if I'm missing something that the module needs. Some sort of an #include file to speak in C++ terms?

Where does the kernel get that drm loaded. Hotplug/udev thing perhaps? Seeing and recognizing my card and autoloading the radeon module?

----------

## kingnosis

DRM support is in 

```
Device Drivers  --->

   Character devices  --->

      < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
```

That should be turned off, if it isn't already.

Not sure about the unknown symbol. That's what sounds like an outdated fglrx (one compiled against an older kernel, for example).

EDIT: might be worth trying the ~x86/~amd64 ati-drivers.

----------

## blotto

What does 

```
grep DRM /usr/src/linux/.config
```

show

What does 

```
grep AGP /usr/src/linux/.config
```

show

Is fglrx listed in /etc/modules.autoload.d/kernel-2.6, since it is being loaded at boot instead of when you start X

Is opengl implementation set to ati -

```
eselect opengl list
```

should tell you

----------

## supernov

All DRM settings are turned off as mentioned before. That's what confused me, drm shouldn't be in there at all.

I use the latest ati-drivers (though older ones had the same problem), so I don't think the fglrx is outdated.

grep DRM shows me that config_DRM is not set.

grep AGP show this:

```
CONFIG_AGP=y

# CONFIG_AGP_ALI is not set

# CONFIG_AGP_ATI is not set

# CONFIG_AGP_AMD is not set

# CONFIG_AGP_AMD64 is not set

# CONFIG_AGP_INTEL is not set

# CONFIG_AGP_NVIDIA is not set

CONFIG_AGP_SIS=y

# CONFIG_AGP_SWORKS is not set

# CONFIG_AGP_VIA is not set

# CONFIG_AGP_EFFICEON is not set

```

Fglrx is listed in autoload.d indeed and eselect says this:

```
Available OpenGL implementations:

  [1]   ati *

  [2]   xorg-x11

```

Looks all fine by me. Thinking of which... my motherboard is mainly SIS-controlled, but could a wrong setting there be a good explanation for my problems?

----------

## blotto

The drm thing is a bit strange shouldn't be there if its not in the kernel, you haven't made a cockup with the /usr/src/linux link have you.

As for the modules.autoload.d there should be no need to put fglrx in there as xorg will load the proper driver on startup, does for my 3 ati systems

----------

## supernov

Nope, link is pointing allright, I did make some progress in Linux understanding.  :Smile:  Though cock-ups can still happen ofcourse.

No other things in the kernel which could invoke the drm? Or perhaps when starting-up X? Because I don't think drm is there right

after the kernel booting. Or at least not that last error about the drm_unlock.

----------

## blotto

Just another thought, the drm line - have you installed drm separetly i.e. from r300.sourceforge

----------

## supernov

No, that would be an interesting cause indeed. Not being part of the kernel. It can't have anything to do with an hotplugging event?

----------

## Redson

 *supernov wrote:*   

> No, that would be an interesting cause indeed. Not being part of the kernel. It can't have anything to do with an hotplugging event?

 

Just wanted to confirm I'm having the exact same problem.  gentoo-sources-2.6.15-r1, ati-drivers-8.23.7.  I have an ATI X300 PCI express card.  

on modprobe fglrx I get:

```
hulk linux # modprobe fglrx

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

dmesg says:

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

fglrx: Unknown symbol module_refcount

fglrx: Unknown symbol module_refcount

mtrr: no more MTRRs available

mtrr: no more MTRRs available

mtrr: no more MTRRs available

mtrr: no more MTRRs available

mtrr: no more MTRRs available

Linux agpgart interface v0.101 (c) Dave Jones

fglrx: Unknown symbol module_refcount

fglrx: Unknown symbol module_refcount

fglrx: Unknown symbol module_refcount

fglrx: Unknown symbol module_refcount

fglrx: Unknown symbol module_refcount
```

----------

## supernov

Hmmmmm, interesting. I'm suspecting it to be a problem with this kernel-version more and more. I read somewhere else

that my drm IS loading the radeon driver...which is very strange. I'm going to try another kernel version within a few days.

Do you also see the drm loading in dmesg?

----------

## blotto

Hi again just a thought about kernels, I did have a little trouble with 2.6.16-gentoo on the laptop but it was sorted with 2.6.16-gentoo-r2 - that was with ati-drivers-8.23.7 also I think there might be issues with  ati-drivers-8.23.7 and earlier kernels.

Cant say for sure but I went from ati-drivers-8.20.8 which worked fine with all 2.6.15 kernels but didn't with 2.6.16

So maybe you could try ati-drivers-8.20.8 or 2.6.16-gentoo-r2

----------

## Redson

All right, got mine working with the following:

kernel:  switched to vanilla-sources 2.6.15.1

ati-drivers:  8.23.7 (~x86)

And here's the weird part.  In my kernel configuration, I added AGP as a module (even though I have a PCI express card), and added intel-agp as a module (even though I have an ATI x300.  My board's chipset is Intel though.  

```
red@hulk ~ $ fglrxinfo

display: :0.0  screen: 0

OpenGL vendor string: ATI Technologies Inc.

OpenGL renderer string: RADEON X300/X550 Series Generic

OpenGL version string: 2.0.5695 (8.23.7)
```

that's all I changed from my previous setup. Let me know if there's anything else I can do to help.

----------

## supernov

Yeah, that says enough I think. 2.6.15-r1 is probably the problem. Although, I'll first try 8.20.8 as ati-drivers (huge package btw!) and if that

works...it'll be fine by me.

Thanks all for the help so far!!

----------

## supernov

btw, one last thought. I do have the option opengl in my make.conf. Could that have something to do with the automatic initialisation of drm?

----------

## supernov

OmG!

uname gave me the fact that I was running the previous kernel! I tried so many things to explain all the behaviour I was constantly seeing,

I'm not a noob anymore, but now I really dropped my trousers.  :Smile:  For some reason, in previous gentoo installations, I didn't have to

mount boot. It was probably done automatically, but with the new one I apparently changed this (which is a good thing I believe). So here I was

compiling new kernels, copying them to /boot, checking to see if they were copied, updating my linux link... and probably was doing all

that virtually!? Mounting the boot did the trick, after that my modules loaded, eth0 was working again and even the ati-drivers with

fglrx!! Incredible, weeks I spend behind the screen for this.  :Smile: 

So, what works for me on this system is gentoo 2.6.16-r6 with ati-drivers 8.23.7, not forgetting to mount /boot when copying new kernels:

- Ati Radeon 9600

- SiS chipset controllers

- Realtek, SiS ethernet controllers

Thanks m8's!

----------

