# fglrx and direct rendering

## dmsnell

Howdy all - I have modular xorg installed and use the cvs r300 driver for my radeon 9550.  I have dri enabled and get ~2000fps on glxgears.  On this install of gentoo, I have never had monolithic Xorg installed.  I installed the ati-drivers package to try and get XGL working, but I couldn't even get Direct Rendering.

Here are some stats of my install...

gentoo-sources-2.6.15

no in-kernel drm support

amd64 with athlon64/opteron agp built in

xorg.conf with option to use kernel agp driver

xorg.log shows direct rendering enabled, but glxinfo shows otherwise

Composite is turned off

eselect opengl set ati ; modules-update; env-update; source /etc/profile

latest ati-drivers ( 8.21.7 )

fglrx module loads successfully

hard masked xorg-x11-7.0-r1

radeonfb

any ideas on what could be wrong?  I appreciate the help[/list]

----------

## mars-red

My gut says to check your xorg.conf - I'm running a mobility 9700 (should be same settings to yours, I think), so here are the relevent pieces of my xorg.conf:

```

# **********************************************************************

# DRI Section

# **********************************************************************

Section "dri"

# Access to OpenGL ICD is allowed for all users:

    Mode 0666

# Access to OpenGL ICD is restricted to a specific user group:

#    Group 100    # users

#    Mode 0660

EndSection

```

```

# **********************************************************************

# Module section -- this  section  is used to specify

# which dynamically loadable modules to load.

# **********************************************************************

#

Section "Module"

# This loads the DBE extension module.

    Load        "dbe"   # Double buffer extension

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection  "extmod"

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

    EndSubSection

# This loads the Type1 and FreeType font modules

    Load        "type1"

    Load        "freetype"

# This loads the GLX module

    Load        "glx"   # libglx.a

    Load        "dri"   # libdri.a

EndSection

```

```

# === ATI device section ===

Section "Device"

    Identifier                          "ATI Graphics Adapter"

    Driver                              "fglrx"

# ### generic DRI settings ###

# === disable PnP Monitor  ===

    #Option                              "NoDDC"

# === disable/enable XAA/DRI ===

    Option "no_accel"                   "no"

    Option "no_dri"                     "no"

# === misc DRI settings ===

    Option "mtrr"                       "off" # disable DRI mtrr mapper, driver has its ow$

# ### FireGL DDX driver module specific settings ###

# === Screen Management ===

    Option "DesktopSetup"               "0x00000100"

    Option "MonitorLayout"              "AUTO, NONE"

    Option "IgnoreEDID"                 "off"

    Option "HSync2"                     "unspecified"

    Option "VRefresh2"                  "unspecified"

    Option "ScreenOverlap"              "0"

# === TV-out Management ===

    Option "NoTV"                       "no"

    Option "TVStandard"                 "NTSC-M"

    Option "TVHSizeAdj"                 "0"

    Option "TVVSizeAdj"                 "0"

    Option "TVHPosAdj"                  "0"

    Option "TVVPosAdj"                  "0"

    Option "TVHStartAdj"                "0"

    Option "TVColorAdj"                 "0"

    Option "GammaCorrectionI"           "0x06419064"

    Option "GammaCorrectionII"          "0x00000000"

# === OpenGL specific profiles/settings ===

    Option "Capabilities"               "0x00000800"

# === Video Overlay for the Xv extension ===

    Option "VideoOverlay"               "on"

    Option "RenderAccel"                "true"

    #Option "AllowGLXWithComposite"     "true"

# === OpenGL Overlay ===

# Note: When OpenGL Overlay is enabled, Video Overlay

#       will be disabled automatically

    Option "OpenGLOverlay"              "off"

# === Center Mode (Laptops only) ===

    Option "CenterMode"                 "off"

# === Pseudo Color Visuals (8-bit visuals) ===

    Option "PseudoColorVisuals"         "off"

# === QBS Management ===

    Option "Stereo"                     "off"

    Option "StereoSyncEnable"           "1"

# === FSAA Management ===

    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"

# === Misc Options ===

    Option "UseFastTLS"                 "0"

    Option "BlockSignalsOnLock"         "on"

    Option "UseInternalAGPGART"         "yes"

    Option "ForceGenericCPU"            "no"

    Option "AGPMode"                    "8"

    Option "KernelModuleParm"           "agplock=0" # AGP locked user pages: disabled

    BusID "PCI:1:0:0"    # vendor=1002, device=4e50

    Screen 0

EndSection

```

I hope there's something in there that helps you out.

----------

## dmsnell

unfortunately, my xorg looks similar....

```

Section "Module"

   Load  "record"

   Load  "extmod"

   Load  "dbe"

   Load  "dri"

   Load  "glx"

   Load  "xtrap"

   Load  "freetype"

   Load  "type1"

EndSection

```

```

Section "Device"

   Identifier  "ATI Graphics Adapter 0"

   Driver      "fglrx"

   Option       "backingstore" "true"

   BusID       "PCI:1:0:0"

EndSection

```

```

Section "DRI"

   Mode         0666

EndSection

```

this is from "egrep "(DRI|dri|Direct Rendering|direct rendering)" /var/log/Xorg.0.log

```

 X.Org XInput driver : 0.5

(II) LoadModule: "dri"

(II) Loading /usr/lib/xorg/modules/extensions/libdri.so

(II) Module dri: vendor="X.Org Foundation"

(II) Loading extension XFree86-DRI

(II) Loading /usr/lib/xorg/modules/drivers/fglrx_drv.so

        ABI class: X.Org XInput driver, version 0.5

        ABI class: X.Org XInput driver, version 0.5

(II) ATI Proprietary Linux Driver Build Information: autobuild-rel-r6-8.21.1-driver-lnx-238868

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card0

(==) fglrx(0): NoDRI = NO

(==) fglrx(0): OpenGL ClientDriverName: "fglrx_dri.so"

(II) fglrx(0): driver needs X.org 6.8.x.y with x.y >= 99.8

(II) Loading extension ATIFGLRXDRI

(II) fglrx(0): doing DRIScreenInit

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card1

drmOpenDevice: node name is /dev/dri/card2

drmOpenDevice: node name is /dev/dri/card3

drmOpenDevice: node name is /dev/dri/card4

drmOpenDevice: node name is /dev/dri/card5

drmOpenDevice: node name is /dev/dri/card6

drmOpenDevice: node name is /dev/dri/card7

drmOpenDevice: node name is /dev/dri/card8

drmOpenDevice: node name is /dev/dri/card9

drmOpenDevice: node name is /dev/dri/card10

drmOpenDevice: node name is /dev/dri/card11

drmOpenDevice: node name is /dev/dri/card12

drmOpenDevice: node name is /dev/dri/card13

drmOpenDevice: node name is /dev/dri/card14

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: node name is /dev/dri/card0

(II) fglrx(0): [drm] created "fglrx" driver at busid "PCI:1:0:0"

(II) fglrx(0): DRIScreenInit done

(II) fglrx(0): Kernel Module version matches driver.

(II) fglrx(0): DRI initialization successfull!

(II) fglrx(0): [DRI] installation complete

```

I tried removing the radeonfb and framebuffer in general, but no avail[/code]

----------

## dmsnell

New info, I Just installed libstdc++-v3, still no DRI, though

LIBGL_DEBUG=verbose fglrxinfo

```

libGL: XF86DRIGetClientDriverName: 8.21.7 fglrx (screen 0)

libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/fglrx_dri.so

libGL error: dlopen /usr/lib/xorg/modules/dri/fglrx_dri.so failed (/usr/lib/xorg/modules/dri/fglrx_dri.so: undefined symbol: __glXFindDRIScreen)

libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/fglrx_dri.so

libGL error: dlopen /usr/lib/xorg/modules/dri/fglrx_dri.so failed (/usr/lib/xorg/modules/dri/fglrx_dri.so: undefined symbol: __glXFindDRIScreen)

libGL error: unable to find driver: fglrx_dri.so

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.4.1)

```

LIBGL_DRIVERS_PATH=":/usr/lib/xorg/modules/dri"

ldd -u fglrx_dri.so

```

     16770:     ./fglrx_dri.so: error: symbol lookup error: undefined symbol: __glXFindDRIScreen (continued)

undefined symbol: __glXFindDRIScreen    (./fglrx_dri.so)

     16770:     ./fglrx_dri.so: error: symbol lookup error: undefined symbol: _glapi_add_entrypoint (continued)

undefined symbol: _glapi_add_entrypoint (./fglrx_dri.so)

Unused direct dependencies:

        /lib/libdl.so.2

```

I also get these errors in compiling...

```

QA Notice: the following files contain runtime text relocations

 Text relocations force the dynamic linker to perform extra

 work at startup, waste system resources, and may pose a security

 risk.  On some architectures, the code may not even function

 properly, if at all.

 Please include this file in your report:

 /var/tmp/portage/ati-drivers-8.21.7/temp/scanelf-textrel.log

TEXTREL usr/lib/xorg/modules/dri/atiogl_a_dri.so

TEXTREL usr/lib/xorg/modules/dri/fglrx_dri.so

TEXTREL usr/lib/opengl/ati/lib/libGL.so.1.2

QA Notice: the following files contain executable stacks

 Files with executable stacks will not work properly (or at all!)

 on some architectures/operating systems.  A bug should be filed

 at http://bugs.gentoo.org/ to make sure the file is fixed.

 Please include this file in your report:

 /var/tmp/portage/ati-drivers-8.21.7/temp/scanelf-exec.log

!WX --- --- lib/modules/2.6.15-gentoo-r2/video/fglrx.ko

RWX --- --- usr/lib/xorg/modules/dri/fglrx_dri.so

RWX --- --- usr/lib/opengl/ati/lib/libGL.so.1.2

```

----------

## Aggamemnon

bump

----------

## Vininim

try reinstalling mesa, xorg-xserver, since you probably have those from cvs(as recommended in the dri guide)

----------

## Aggamemnon

I have solved my problems in the end, it was some time ago but involved lots of symlinking of libGL.la and associated files.

----------

