# No direct rendering for ATI AGP on nForce3 250Gb

## dahoste

Help!  I can't get 3D accel working.  I've read the following:

http://gentoo-wiki.com/HOWTO_ATI_Drivers

http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html

...along with everything I could find in the forums that looked remotely related.

Problem:  everything seems to work *except* direct rendering.  I've got two ATI cards installed, one AGP and one PCI, and when I test on the PCI card, everything works -- fglrx loads, X starts, glxinfo looks good, and fgl_glxgears runs.  If I change xorg.conf to use the AGP card (i.e. by changing the BusID) then fglrx loads (with errors!), X starts, glxinfo shows no direct rendering, and of course I can't run fgl_glxgears.

Relevent info:

```
uname -a

Linux smoke 2.6.14-gentoo-r5 #6 SMP PREEMPT Fri Jan 13 20:26:43 MST 2006 i686 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
```

```
cat /etc/make.conf | grep CFLAGS=

CFLAGS="-O2 -march=athlon-xp -msse2 -pipe"
```

```
ls -ald /usr/src/linux

lrwxrwxrwx  1 root root 22 Dec 21 08:48 /usr/src/linux -> linux-2.6.14-gentoo-r5
```

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

CONFIG_AGP=m

# CONFIG_AGP_ALI is not set

# CONFIG_AGP_ATI is not set

# CONFIG_AGP_AMD is not set

CONFIG_AGP_AMD64=m

# CONFIG_AGP_INTEL is not set

# CONFIG_AGP_NVIDIA is not set

# CONFIG_AGP_SIS is not set

# CONFIG_AGP_SWORKS is not set

# CONFIG_AGP_VIA is not set

# CONFIG_AGP_EFFICEON is not set
```

```
emerge -pv xorg-x11 

[ebuild   R   ] x11-base/xorg-x11-6.8.2-r6  -3dfx +3dnow +bitmap-fonts -cjk -debug -dlloader -dmx -doc -font-server -insecure-drivers +ipv6 -minimal +mmx +nls -nocxx +opengl +pam -sdk +sse -static +truetype-fonts +type1-fonts (-uclibc) -xprint +xv 0 kB
```

```
emerge -pv ati-drivers

[ebuild   R   ] x11-drivers/ati-drivers-8.20.8  +opengl 0 kB
```

```
 lspci | grep ATI

01:00.0 VGA compatible controller: ATI Technologies Inc R420 JI [Radeon X800PRO]

01:00.1 Display controller: ATI Technologies Inc Unknown device 4a69

02:06.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (rev 01)

02:06.1 Display controller: ATI Technologies Inc Unknown device 5940 (rev 01)
```

```
lsmod

Module                  Size  Used by

nvsound              1540792  0 

nvnet                  69732  0 

fglrx                 432288  0 

amd64_agp              10120  1 

agpgart                29712  2 fglrx,amd64_agp
```

When I try to use the AGP card, the following shows up in dmesg after starting X:

```
dmesg | grep -E "[a][g][p]|[f][g][l][r][x]"

Linux agpgart interface v0.101 (c) Dave Jones

agpgart: Detected AGP bridge 0

agpgart: Setting up Nforce3 AGP.

agpgart: AGP aperture is 256M @ 0xb0000000

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

[fglrx] Maximum main memory to use for locked dma buffers: 803 MBytes.

[fglrx] module loaded - fglrx 8.20.8 [Dec  6 2005] on minor 0

[fglrx] Kernel AGP support doesn't provide agplock functionality.

[fglrx] AGP detected, AgpState   = 0x1f00421b (hardware caps of chipset)

agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode

[fglrx:_r6x_CheckAGPCommand] *ERROR* query for AGP device capabilities failed

[fglrx:firegl_unlock] *ERROR* Process 5797 using kernel context 0
```

Of particular interest is the '_r6x_CheckAGPCommand'.

X subsequently complains:

```
cat /var/log/Xorg.0.log | grep -E "[E][E]|[W][W]"

Current Operating System: Linux smoke 2.6.14-gentoo-r5 #6 SMP PREEMPT Fri Jan 13 20:26:43 MST 2006 i686

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(WW) Open APM failed (/dev/apm_bios) (No such file or directory)

(II) Loading extension MIT-SCREEN-SAVER

(WW) fglrx: No matching Device section for instance (BusID PCI:1:0:1) found

(WW) fglrx: No matching Device section for instance (BusID PCI:2:6:0) found

(WW) fglrx: No matching Device section for instance (BusID PCI:2:6:1) found

(WW) fglrx(0): GetVBEMode failed

(WW) fglrx(0): board is an unknown third party board, chipset is supported

(EE) fglrx(0): [agp] Failed to set AGP mode!

(EE) fglrx(0): cannot init AGP

(WW) fglrx(0): ***********************************************

(WW) fglrx(0): * DRI initialization failed!                  *

(WW) fglrx(0): * (maybe driver kernel module missing or bad) *

(WW) fglrx(0): * 2D acceleraton available (MMIO)             *

(WW) fglrx(0): * no 3D acceleration available                *

(WW) fglrx(0): ********************************************* *
```

I started with a nicely complicated xorg.conf, but quickly trimmed it down to a barebones version generated by fglrxconfig.  The relevant parts are shown below:

```

Section "dri"

    Mode 0666

EndSection

Section "Module"

    Load        "dbe"   # Double buffer extension

    SubSection  "extmod"

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

    EndSubSection

    Load        "type1"

    Load        "freetype"

    Load        "glx"   # libglx.a

    Load        "dri"   # libdri.a

EndSection

Section "Device"

    Identifier                          "ATI Graphics Adapter"

    Driver                              "fglrx"

    #Option                              "NoDDC"

    Option "no_accel"                   "no"

    Option "no_dri"                     "no"

    Option "mtrr"                       "off" # disable DRI mtrr mapper, driver has its own code for mtrr

    Option "DesktopSetup"               "(null)" 

    Option "ScreenOverlap"              "0" 

    Option "GammaCorrectionI"           "0x00000000"

    Option "GammaCorrectionII"          "0x00000000"

    Option "Capabilities"               "0x00000000"

    Option "CapabilitiesEx"             "0x00000000"

    Option "VideoOverlay"               "on"

    Option "OpenGLOverlay"              "off"

    Option "CenterMode"                 "off"

    Option "PseudoColorVisuals"         "off"

    Option "Stereo"                     "off"

    Option "StereoSyncEnable"           "1"

    Option "FSAAEnable"                 "no"

    Option "FSAAScale"                  "1"

    Option "FSAADisableGamma"           "no"

    Option "FSAACustomizeMSPos"         "no"

    Option "FSAAMSPosX0"                "0.000000"

    Option "FSAAMSPosY0"                "0.000000"

    Option "FSAAMSPosX1"                "0.000000"

    Option "FSAAMSPosY1"                "0.000000"

    Option "FSAAMSPosX2"                "0.000000"

    Option "FSAAMSPosY2"                "0.000000"

    Option "FSAAMSPosX3"                "0.000000"

    Option "FSAAMSPosY3"                "0.000000"

    Option "FSAAMSPosX4"                "0.000000"

    Option "FSAAMSPosY4"                "0.000000"

    Option "FSAAMSPosX5"                "0.000000"

    Option "FSAAMSPosY5"                "0.000000"

    Option "UseFastTLS"                 "0"

    Option "BlockSignalsOnLock"         "on"

    Option "UseInternalAGPGART"         "no"

    Option "ForceGenericCPU"            "no"

#    BusID "PCI:2:6:0"    # vendor=1002, device=5960

    BusID "PCI:1:0:0"

    Screen 0

EndSection

```

Note the 'BusID' lines.  That's the only thing I change when toggling between the PCI card and the AGP card.  Again, when I run with the PCI card, *everything* works.  When I switch to the AGP card, it *mostly* works, with the exception of the errors described above.  When running the AGP card, glxinfo says:

```
glxinfo | grep direct 

direct rendering: No

OpenGL renderer string: Mesa GLX Indirect
```

It seems to make no difference setting "UseInternalAGPGART" to "no" or "yes".  It makes no difference if I'm running X as root or a user.  I've emerged libstdc++-v3 (and then re-emerged ati-drivers) and it made no difference (this was in some of the other threads).  Note that this machine is a recent clean 2005.1 install -- no upgrades, this is all 1st-time compiles.  I've also done 'eselect opengl set ati'.  Multiple times.

The part where dmesg says "*ERROR* query for AGP device capabilities failed" seems the most suspicious.  But I'm fairly new at this.

Any ideas?     Thanks in advance, guys.

----------

## dahoste

bump

-- hoping some fglrx gurus can help out.

----------

## Wedge_

Does your kernel config allow you to select the NVIDIA AGP support option? It can depend on whether you're running a 32 or 64-bit system, but if you're able to select it, compile it as a module, then try loading agpgart, amd64-agp, and nvidia-agp, then load fglrx and try running X with "UseInternalAGPGART" set to "no".

----------

## dahoste

Thanks for the reply Wedge.   Unfortunately, that didn't seem to help.  I added the nvidia-agp module, which loaded without any problems.  The same dmesg error occurs as before: "query for AGP device capabilities failed".  I tried it with "UseInternalAGPGART" set to both "yes" and "no" - same result.  FYI - I'm running 32 bit.

----------

## Wedge_

Have you checked what happens when you have just the AGP card installed? I'm surprised the PCI card works at all with the fglrx driver given what other people have experienced. I can't remember anyone else trying a dual PCI/AGP setup either, and I wouldn't be surprised if having the two cards installed was causing a problem somehow.It'd be helpful to rule that out in any case.

----------

## dahoste

Ok - the AGP card works fully when the PCI card is physically removed from the system.  (fgl_glxgears = ~1325).

Shall we call this situation 'non-ideal'?

I'll be very disappointed in ATI (even more than I already am) if their driver can't handle multiple devices in the system.  That's the whole point of the bus.  Why would the mere presence of the PCI card -- unreferenced by xorg in any way -- bugger up the correct communication between the AGP card and the driver?

Originally this was supposed to be a triple-monitor setup, hence the purchase of the PCI card in the first place.  Then I figured if I could just get things working on the primary card, I'd settle for dual-monitor and only benefit from the third when booting to windows.  Now it seems I can't even have the 2nd card plugged in.

----------

## jshanab

uname -a

Linux ghidrah 2.6.14-gentoo-r6 #1 SMP Sun Jan 15 17:54:29 PST 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux

I am using the opensource radeon drivers and the dri in the kernel and have tried alll combinations, Only removing the PCI ati card allows dri to work. 

I have AGP ATI 9000 and PCI ATI 9200

  So is this a radeon driver issue, a hardware issue? Perhaps shareing some slot signals? or a kernel issue I wonder

Mine too was suppose to be three headed, hince the hostname.  :Sad: 

----------

## dahoste

That's a real bummer.

Interesting that radeon+dri seems to have the same problem as fglrx. 

I've been combing the forums to try to get a sense of who's having success with triple-head setups, and with what HW.  So far, I've seen a lot of combos: nvidia-nvidia, nvidia-mga, nvidia-voodoo, mga-mga, etc..  But so far, no ati-ati.  Really disappointing.  I, too, would love to know where the root of this problem lies.  Should I hold out in the hopes that a new ati driver or a new kernel upgrade might fix it?  Or should I start looking for somebody to take my ati cards off my hands so I can convert to something else.  Honestly, I'm leaning towards new hardware anyway since one of the first things I discovered about the ati driver (before this issue) was that it doesn't support framebuffer rotation (i.e. portrait mode).  I've logged tickets with ATI's linux driver feedback, but for all I know that's a black hole.

----------

## Wedge_

You could also try posting a bug on the unofficial bugzilla here. Some of the ATI Linux devs do look at it from time to time, but if it affects the other driver as well it probably isn't something that's easy to fix. I wouldn't waste time hoping for things to get better, I think you'd be better off just grabbing a pair of nvidia cards or something  :Confused: 

----------

## dahoste

Good suggestion Wedge -- I'll certainly post  a bug on bugzilla if it doesn't already have a duplicate.  I don't have any ill will towards ATI and would be happy to see this get fixed eventually.  We're all better off with a healthy competitive environment for Linux 3D, and by healthy I mean robust, feature-full drivers from multiple vendors.

Thanks again for the help -- I'd have floundered around for another week or so probably, fighting with this.  At least now I know what my options are.

I'll post back if I discover anything else related to the dual-card AGP/PCI problem.

----------

## AdmiralNemo

I am having the exact same problem, but I only have one card and it is AGP.  I get the same errors and my fglrxinfo outputs this

```
dustin@alphacentauri ~ $ fglrxinfo 

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)

```

I have run eselect opengl set ati but that doesn't seem to help.  X starts with the same error dahoste got and no 3D, and my performance is very low.  I don't know what to do.  It was working until I replaced my motherboard with another nVidia nForce3 250 because my old one stopped working...don't know why though.  I am not sure what I did other than that, and it shouldn't matter should it, considering it is the same board...

If anyone finds anything, please let us know.

----------

## dahoste

AdmiralNemo -- note that the root of my problem was actually down in the fglrx driver, when X tries to initialize the device, and the driver fails to communicate correctly with the AGP card (when the PCI card is also present).  I was able to see the mesg by looking at 'dmesg | grep fglrx'.

Having no direct rendering is a common problem -- see the numerous forum threads.  Getting all the pieces lined up for kernel, agp modules, fglrx, and xorg.conf is tricky business.  That's why I noted first that I'd exhausted the two most common resources:

http://gentoo-wiki.com/HOWTO_ATI_Drivers

http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html

I would certainly recommend that you examine those carefully, if you haven't already.

However - you note that you previously had everything working.  If the mobo was really identical, and all you did was swap it out from underneath your system, then I would suspect as you did - that everything should continue working.  If there was any difference in the mobo at all, then I would repeat the configuration process that you used before to get everything working.  I.e. kernel config, build kernel, emerge ati-driver, boot kernel, verify modules are loaded, verify xorg.conf, startx.  And so forth.

Also -- a big variable here would be your bios setup.  That certainly changed when you changed motherboards.  Be sure that all the settings are the same as you can remember.  In particular, disable any integrated graphics, if the board has it.

If you still can't make any progress, post back here and include the same information that I included in my original post -- i.e. output from stuff like 'lspci', 'dmesg | grep fglrx', etc..    We'll need that to nail down what's really preventing direct rendering for you.

----------

## AdmiralNemo

Well, the motherboard isn't EXACTLY identical, it was made by a different manufacturer, but all of the chipsets are the same.  I have recompiled kernel and ati-drivers and such, before I posted, and read both of those documents.  I can try looking in the BIOS, I remember something about AGP or PCI video settings that I could check, but there is no onboard video.

Edit: I changed Init. Display Device from PCI Slot to AGP in the BIOS and no effect

Here is what you wanted me to post

```
alphacentauri ~ # dmesg | grep fglrx

[fglrx] Failed to load fglrx_agp module

[fglrx] Error code  1072375808

[fglrx] Failed to load ATI module agpgart

[fglrx] Fallback to internal agpgart module

[fglrx] Initialization of built-in AGP-support successful.

[fglrx] AGP detected, AgpState   = 0x1f00421b (hardware caps of chipset)

[fglrx:firegl_unlock] *ERROR* Process 7976 using kernel context 0
```

```
00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)

00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)

00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)

00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb AC'97 Audio Controller (rev a1)

00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)

00:0a.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)

00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)

00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: ATI Technologies Inc RV350 AP [Radeon 9600]

01:00.1 Display controller: ATI Technologies Inc RV350 AP [Radeon 9600] (Secondary)

02:06.0 Communication controller: Conexant HSF 56k HSFi Modem (rev 01)

02:07.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

```

```
alphacentauri ~ # cat /etc/make.conf | grep CFLAGS= 

CFLAGS="-O2 -march=athlon64 -pipe
```

```
alphacentauri ~ # ls -ald /usr/src/linux

lrwxrwxrwx  1 root root 19 Jan 17 22:02 /usr/src/linux -> linux-2.6.15-gentoo
```

```
alphacentauri ~ # uname -a

Linux alphacentauri 2.6.15-gentoo #2 SMP Wed Jan 18 00:02:17 CST 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
```

```
alphacentauri ~ # cat /usr/src/linux/.config | grep AGP

CONFIG_AGP=y

CONFIG_AGP_AMD64=y

# CONFIG_AGP_INTEL is not set
```

I don't know what difference it would make, but these aren't compiled as modules, simply because I cannot choose that option in make menuconfig

```
alphacentauri ~ # equery uses xorg-x11

[ Searching for packages matching xorg-x11... ]

[ Colour Code : set unset ]

[ Legend        : Left column  (U) - USE flags from make.conf                     ]

[                  : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for x11-base/xorg-x11-6.8.2-r6 ]

 U I

 - - 3dfx             : Adds support for 3dfx video cards to XFree86. See: voodoo3

 - - 3dnow            : Adds support for 3dnow multimedia processor instructions

 + + bitmap-fonts     : Builds the crappy 100 DPI and 75 DPI fonts

 - - cjk              : Adds support for Multi-byte character languages (Chinese, Japanese, Korean)

 - - debug            : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too

 - - dlloader         : Enable dynamic module loader instead of ELF loader

 - - dmx              : Build Distributed Multiheaded X

 - - doc              : Adds extra documentation (API, Javadoc, etc)

 - - font-server      : Build XFS, the X Font Server

 - - insecure-drivers : Builds insecure DRI stuff for via, mach64 and savage

 - - ipv6             : Adds support for IP version 6

 - - minimal          : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)

 - - mmx              : Adds support for optimizations for Pentium MMX and Athlon class processors

 + + nls              : Adds Native Language Support (using gettext - GNU locale utilities)

 - - nocxx            : Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)

 + + opengl           : Adds support for OpenGL

 - - pam              : Adds support PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip

 - - sdk              : Builds the software development kit

 - - sse              : fast floating point optimization for PentiumIII+ class chips

 - - static           : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

 + + truetype-fonts   : Build TrueType fonts

 + + type1-fonts      : Build Type1 fonts

 - - uclibc           : Enable uclibc specific patches and build or link uclibc

 + + xprint           : Support for xprint, http://www.mozilla.org/projects/xprint/

 + + xv               : Adds in optional support for the Xvideo extension (an X API for video playback)
```

```
alphacentauri ~ # lsmod

Module                  Size  Used by

fglrx                 477180  0 

...

```

I snipped out my snd_* modules here

----------

## dahoste

hmm....    Well, I see that you're running 64 bit, yes?  That's a can of worms that I haven't opened yet, so you'll have to take everything I suggest with a grain of salt -- all of my experience thus far is with a 32 bit install.  If you haven't already, I recommend rooting through some of the 'Gentoo on AMD64' posts relating to fglrx and direct rendering.  For example, the following:

ATI and 64bit [SOLVED] (2005.1 clean install users READ)

talks about the libstdc++-v3 issue that I tried (emerge libstdc++-v3).  Though it didn't make any difference in my situation, it might be relevant to yours.

Also - you've got agpgart compiled in instead of as a module (CONFIG_AGP=y).  This prevents you from testing with 'UseInternalAGPGART' set to either "yes" or "no" in xorg.conf.  Wedge suggests trying it both ways when things aren't working, but to do so you need to have 'CONFIG_AGP=m' and 'agpgart' in your list of modules (before fglrx).

Another difference I see is the kernel version.  When I get the chance, I'll upgrade to 2.6.15 and see if that changes anything for me.  Note that I was able to get direct rendering using exactly the configuration I described in my first post, *IF* I removed the PCI card -- so I've got a fully functional state with which to experiment further.  But all I can do is compare that state to yours.

I'd start with the module experiment.  The output you posted from dmesg makes it look like a config problem between the kernel and the driver (instead of: [fglrx] Failed to load fglrx_agp module  you should get something like: [fglrx] module loaded - fglrx 8.20.8 [Dec  6 2005] on minor 0).

Go ahead and include the device section from your xorg.conf in your next post, though.

----------

## AdmiralNemo

I guess I don't understand. I had this working before, CONFIG_AGP compiled in, libstdc++-v3 is installed, and UseInternalAGPGART left at whatever it is by default.  I just now tried with my vmlinuz.old kernel (2.6.14-r4), but still nothing.  I did a complete dmesg and got this, just in case it might help:

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

[fglrx] Maximum main memory to use for locked dma buffers: 855 MBytes.

acpi_bus-0200 [01] bus_set_power         : Device is not power manageable

ACPI: PCI Interrupt Link [APC5] enabled at IRQ 16

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

[fglrx] module loaded - fglrx 8.20.8 [Dec  6 2005] on minor 0

[fglrx] Failed to load fglrx_agp module

[fglrx] Error code  1071806464

[fglrx] Failed to load ATI module agpgart

[fglrx] Fallback to internal agpgart module

Fire GL built-in AGP-support

Based on agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 941M

agpgart: Detected NVIDIA nForce3S/K8 On-CPU GART chipset

agpgart: AGP aperture is 64M @ 0x4000000

Power management callback for AGP chipset installed

[fglrx] Initialization of built-in AGP-support successful.

[fglrx] AGP detected, AgpState   = 0x1f00421b (hardware caps of chipset)

mtrr: type mismatch for 4000000,4000000 old: write-back new: write-combining

[fglrx:firegl_unlock] *ERROR* Process 5435 using kernel context 0
```

Notice the mtrr: line?  Would that have anything to do with it?

----------

## dahoste

Is MTRR support enabled in the kernel?

Here's a snip from Wedge's FAQ:

Processor type and features -> MTRR (Memory Type Range Register) support: ENABLED

MTRR support should always be enabled - if not, the driver may run very slowly, if it runs at all

NOTE: on some AMD64 chipsets, you may have to disable MTRR in order to enable AGP support, without which the driver will usually fail to compile. Known chipsets that have this issue so far: NVIDIA nForce3 Go150.

You might try setting it to the opposite of whatever it currently is.  It says that this might keep fglrx from compiling, which isn't your problem, but since we're still just grasping around at the problem, it's worth a try.

I understand your frustration.  And even though this is the same chipset that you had in your other mobo, I wouldn't trust any of this stuff to behave that predictably.  It's worth trying everything if only to help eliminate variables.  So, I'd actually try converting both agpgart and amd64_agp to modules (CONFIG_AGP=m, CONFIG_AGP_AMD64=m, and don't forget to update /etc/modules.autoload.d/kernel-2.6).  Also, try both "yes" and "no" for the UseInternalAGPGART setting in xorg.conf.  If one of the smarter forum gurus pays us a visit, they're more likely to give us something better to try if you've already exhausted the easy stuff.

----------

## Wedge_

The rules for the kernel AGP options change when you have a 64-bit kernel, so I don't think it'll be possible for him to build them as modules. I'm not sure that UseInternalAGPGART will help either, since it seems like the error is occurring when the fglrx module is loaded, and the UseInternalAGPGART setting only becomes important once you start X. 

Have you tried changing the AGP aperture size to 128 or 256MB? It can sometimes help, although I don't know why. The latest driver version, 8.21.7, which has just been released, would also be worth trying.

----------

## dahoste

Ah - I didn't know that about the 64 bit kernel.

However -- I noticed that some of the [fglrx] messages in dmesg occur when the module itself is loaded, and some occur when the driver is leveraged by X to initialize the device -- i.e. when X starts.  If you aren't booting into X (xdm or whatever), then you can look at dmesg before X tries anything.  This will let you determine if the module is just loading without errors; valueable info, but not as interesting as what happens when X starts.  So, start X and then look at dmesg again and you'll see what happened when the fglrx driver actually tried to talk to the card according to the demands/settings in xorg.conf.

AdmiralNemo should probably do this to determine when the following occurs:

```
[fglrx] Failed to load fglrx_agp module

[fglrx] Error code  1071806464
```

Then, as you suggest, it might rule out X from the problem altogether.

FYI, I did a search on the ATI Bugzilla for '1071806464' and didn't get anything.

I'm also hoping the 8.21.7 ebuild shows up soon, though from the release notes it doesn't appear to have addressed many issues.

----------

## AdmiralNemo

How do I change the aperture size?  I might also try downgrading to a version I know worked before.  I will let you know if that helps.  By the way, MTRR support is enabled  

```
[*] MTRR (Memory Type Range Register) support
```

 I will also try starting x from a console like you said.  Thanks, and I hope we get somewhere with this.

----------

## Wedge_

 *AdmiralNemo wrote:*   

> How do I change the aperture size?

 

It'll be in your BIOS settings somewhere.

----------

## AdmiralNemo

Okay, well I can't find the AGP aperture size in my BIOS settings, I looked at them all and in my mobo manual.  I tried downgrading ati-drivers, to no effect, and the only error that starts when X starts is the one about the other pid having kernel context 0.  I am at a loss here.  I really need to get this fixed soon  because my desktop is so slow without DRI it is hardly usable.  Let me know if anyone thinks of something.

----------

## dahoste

Just a quick follow-up...   I ended up replacing my pair of ATI cards with a pair of NVIDIA cards.  Long story short -- everything works.  Mostly.  After some xorg arm-wrestling, I've got triple monitors going on one AGP card and one PCI card, with a mix of landscape and portrait modes.  I used the latest NVIDIA drivers directly from NVIDIA.  I love portage, but figured as bleeding edge as the graphics stuff seems to be, I don't want to wait for ebuilds when the drivers update.   Now I just need to iron out some performance wrinkles (probably xinerama related).

I've got another machine that I'm putting together, and still have my two ATI cards, so I'll continue to pursue the ATI solution on the back burner.

----------

## AdmiralNemo

I also migrated to an nVidia card.  Direct Rendering worked without hassle using the nvidia-glx ebuilds and the Gentoo nVidia Guide.  Thanks a lot to the authors of such wonderful documentation.

----------

