# Nvidia Direct Rendering problem

## mahashaman

Hi,

```

gentoo konuralp # glxinfo | grep direct

direct rendering: No

```

I've

```

emerge =sys-kernel/gentoo-sources-2.6.22-r1  

cd /usr/src/

rm linux ; ln -s linux-2.6.22-gentoo-r1   linux 

cd linux

make menuconfig ; make && make install && make modules_install

```

 grub config.. bla bla bla

 echo "nvidia" >> /etc/modules.autoload.d/kernel-2.6

reboot.. in init 1

```

emerge =x11-drivers/nvidia-drivers-1.0.9755-r1   

eselect opengl set nvidia

modprobe -r nvidia

```

after  :Smile: 

```

gentoo konuralp # gunzip -c /proc/config.gz | grep AGP

CONFIG_AGP=y

CONFIG_AGP_AMD64=y

gentoo konuralp # gunzip -c /proc/config.gz | grep NVI

# CONFIG_FB_NVIDIA is not set

gentoo konuralp # gunzip -c /proc/config.gz | grep FB_RIVA

# CONFIG_FB_RIVA is not set

```

```

/etc/X11/xorg.conf:

....

   Load  "glx"

# Load  "dri"

....

        Identifier  "Card0"

        Driver      "nvidia"

        Card        ""

....

```

```

gentoo konuralp # glxinfo | grep direct

direct rendering: No

```

Now, why "direct renderig: NO" ?

----------

## NeddySeagoon

mahashaman,

Welcome to Gentoo.

Please post your /var/log/Xorg.0.log so we can see what Xorg actually did when it started.

It need not be the same as it was asked to do in your xorg.conf

----------

## mahashaman

 *NeddySeagoon wrote:*   

> 
> 
> Welcome to Gentoo.
> 
> 

 

 :Smile: 

I am using two years..

cat /etc/X11/xorg.conf

```

Section "ServerLayout"

        Identifier     "Layout0"

        Screen      0  "Screen0" 0 0

        InputDevice    "Keyboard0" "CoreKeyboard"

        InputDevice    "Mouse0" "CorePointer"

EndSection

Section "Files"

EndSection

Section "Module"

        Load "freetype"

        # Load "xtt"

        Load  "extmod"

        Load  "glx"

#       Load  "dri"

        Load  "dbe"

        Load  "record"

        Load  "xtrap"

        Load  "type1"

#       Load  "speedo"

EndSection

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "ImPS/2"

        Option      "Device" "/dev/input/mice"

EndSection

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "kbd"

        Option      "XkbModel" "pc105"

        Option      "XkbLayout" "tr"

EndSection

Section "Monitor"

        Identifier   "Monitor0"

 ### Comment all HorizSync and VertSync values to use DDC:

        HorizSync    30 - 86

        VertRefresh  50 - 160

EndSection

Section "Device"

        Identifier  "Card0"

        Driver      "nvidia"

        Card        ""

        Option      "AddARGBGLXVisuals" "true"

        # This option must be either undeclared or

        # false, in order to avoid periodic short-term

        # freezes on beryl and other OpenGL intensive

        # programs

        Option      "UseEvents"         "false"

        Option      "RenderAccel"       "true"

EndSection

Section "Extensions"

        Option      "Composite"   "enable"

EndSection

Section "Screen"

        Identifier "Screen0"

        Device     "Card0"

        Monitor    "Monitor0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

                Modes    "1024x768"

        EndSubSection

EndSection

```

and /var/log/Xorg.0.log :    http://rafb.net/p/0APLYC63.html

----------

## NeddySeagoon

mahashaman,

Your log says

```
(**) NVIDIA(0): Option "AddARGBGLXVisuals" "true"

(**) NVIDIA(0): Enabling RENDER acceleration

(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is

(II) NVIDIA(0):     enabled.
```

So that loogs good.

Compare the frame rates for opengl nvidia  and opengl  xorg-x11 using glxgears.

What answers do you get ?

----------

## mahashaman

```

# eselect opengl list

Available OpenGL implementations:

  [1]   nvidia *

  [2]   xorg-x11

# glxgears 

4368 frames in 5.1 seconds = 854.604 FPS

4340 frames in 5.2 seconds = 839.147 FPS

4340 frames in 5.1 seconds = 855.211 FPS

4340 frames in 5.0 seconds = 860.047 FPS

4340 frames in 5.1 seconds = 858.488 FPS

4340 frames in 5.0 seconds = 860.496 FPS

```

```

# eselect opengl list

Available OpenGL implementations:

  [1]   nvidia 

  [2]   xorg-x11 *

# glxgears 

5347 frames in 5.1 seconds = 1041.592 FPS

5320 frames in 5.1 seconds = 1037.243 FPS

5040 frames in 5.1 seconds = 983.525 FPS

4340 frames in 5.1 seconds = 857.117 FPS

4340 frames in 5.1 seconds = 844.853 FPS

```

I can play games like ut2004, with nvidia and xorg-x11 but unlike before, some places are so dark and in some places the graphics are so bad.

----------

## mahashaman

# cat /proc/driver/nvidia/cards/0 | nopaste 

http://rafb.net/p/I7UpjT19.html

# cat /etc/X11/xorg.conf | nopaste 

http://rafb.net/p/DYKlUC23.html

# cat /proc/cpuinfo | nopaste 

http://rafb.net/p/zz8ij333.html

# lspci -v | nopaste 

http://rafb.net/p/dsDOlO16.html

# gunzip -c /proc/config.gz | nopaste 

http://rafb.net/p/tSimbY97.html

# eselect opengl list

Available OpenGL implementations:

  [1]   nvidia *

  [2]   xorg-x11 

# glxinfo | nopaste 

http://rafb.net/p/T4C6we64.html

# cat /var/log/Xorg.0.log | nopaste 

http://rafb.net/p/u2vnuG37.html

# eix nvidia-drivers

[I] x11-drivers/nvidia-drivers

     Available versions:  {M}(~)1.0.7185 1.0.8776-r1 (~)1.0.9631-r1 {M}(~)1.0.9639 (~)1.0.9746-r1 (~)1.0.9755-r1 {M}(~)100.14.11 {gtk kernel_linux multilib}

     Installed versions:  100.14.11(22:56:43 21-07-2007)(gtk kernel_linux -multilib)

# eix nvidia-settings

[I] media-video/nvidia-settings

     Available versions:  1.0.20051122-r3 ~1.0.20061102 (~)1.0.20070302

     Installed versions:  1.0.20070302(22:57:21 21-07-2007)

# glxgears

4368 frames in 5.1 seconds = 854.604 FPS

4340 frames in 5.2 seconds = 839.147 FPS

4340 frames in 5.1 seconds = 855.211 FPS

4340 frames in 5.0 seconds = 860.047 FPS

4340 frames in 5.1 seconds = 858.488 FPS

4340 frames in 5.0 seconds = 860.496 FPS 

# dmesg | grep NVIDIA

ACPI: DSDT 3DEF3180, 8019 (r1 NVIDIA AWRDACPI     1000 MSFT  100000E)

nvidia: module license 'NVIDIA' taints kernel.

NVRM: loading NVIDIA UNIX x86_64 Kernel Module  100.14.11  Wed Jun 13 16:33:22 PDT 2007

# glxinfo | grep vendor

server glx vendor string: SGI            //  ??? why SGI ???

client glx vendor string: NVIDIA Corporation

OpenGL vendor string: NVIDIA Corporation

UT2004 ss 1 :  http://ul.gcg.gen.tr/x/9b32ee1.jpg

UT2004 ss 2 :  http://ul.gcg.gen.tr/x/9ec1994.jpg

Why why why why Direct Rendering : NO ???

and why why  I can play games like ut2004, with nvidia but unlike before, some places are so dark and in some places the graphics are so bad. ???

----------

## mahashaman

this is BERYL problem  :Smile: 

/etc/X11/gdm/custom.conf 

OLD:

```

[servers]

#0=Standard

0=Xgl

# Definition of the xgl X server.

[server-Xgl]

name=Xgl

command=/usr/bin/Xgl -br -ac -accel glx:pbuffer -accel xv

flexible=true

chooser=false

handled=true

priority=0 

```

NEW:

```

[servers]

0=Standard

```

```

# glxinfo | grep direct

direct rendering: Yes

 # glxinfo | grep vendor

server glx vendor string: NVIDIA Corporation

client glx vendor string: NVIDIA Corporation

OpenGL vendor string: NVIDIA Corporation

```

----------

## dmead

mahashaman:

in my experience if you configure X to use opengl on the desktop theres really 

no way to make it play nice with a game because X will always be taking up

some large amount of video memory

for instance, i play guildwars on cedega. 

when X is configured to run beryl etc I get less than 1 fps in

guildwars and less than 50 in opengl games in regular wine

when X is not configured to run beryl, that is no backingstore

RGBvisuals etc the 2d is much much snappier and the games run better.

ie 30-50 fps in guildwars and over 200 in quake3

So I would expect SOME problems to crop up when all that shit is running

when you try and play a game

you might consider scripting a quick change between xorg configurations

(running a seperate X will not solve this)

one for beryl and one for games

Also have you replaced NVRAM with NVAGP  and configured it to use side 

band addressing and agp fastwrites? this made ut2004 very smooth for 

me at decent graphics settings

----------

## cdstealer

Hi,

I had a similar issue.  I resolved it by unmerging mesa and any nvidia packages and uninstalling the nvidia drivers that I usually used from Nvidia's site, then just emerge -av nvidia-drivers (if you have an older nvidia card then you may need to emerge nividia-legacy-drivers).  This automatically re-merged mesa.  After a reboot direct rendering was back.

Hope this hels.

CD

----------

