# Can't get nvidia driver to work [SOLVED but not understood]

## feminista

Whenever I try to startx using the nvidia driver, I get no screens found, after an error about the versions of my kernel module and x module not matching.

glxinfo | grep direct gives me

 *Quote:*   

> Xlib:  extension "GLX" missing on display ":0.0".
> 
> Xlib:  extension "GLX" missing on display ":0.0".
> 
> Xlib:  extension "GLX" missing on display ":0.0".
> ...

 

If I try to run glxgears, I get this:

 *Quote:*   

> Xlib:  extension "GLX" missing on display ":0.0".
> 
> glxgears: Error: couldn't get an RGB, Double-buffered visual.

 

The relevant part of my xorg.conf is thus:

 *Quote:*   

> Section "Device"
> 
>     Identifier  "Geforce 6600"
> 
>     Driver      "nv"
> ...

 

X won't start when I change it to Driver "nvidia".

I've emerged nvidia-kernel and nvidia-glx numerous times, and even updated to the unstable versions.  They are, however, both the same version.  I'm also running opengl-update nvidia every time.

The nvidia module will load (modprobe nvidia returns no errors, and lsmod shows nvidia).  It's just that none of the GLX stuff will work, and neither will the nvidia driver.

HELP!Last edited by feminista on Sun Sep 11, 2005 1:22 am; edited 2 times in total

----------

## frostschutz

You probably should leave the VideoRam setting out. It's not required - at least the RAM of my nvidia card gets detected correctly - and I've seen this option causing unnecessary problems numerous times.

For GLX to work, you also need to load glx in the Modules section of your xorg.conf. However, the "nv" driver does not support that anyway (at least not to my knowledge), so it's nothing out of the ordinary that it doesn't work for you with "nv".

So we should focus on the problem why your Xorg does not start using the binary nvidia driver. I suggest you comment out the VideoRam setting first - just in case. Then it would be helpful if you could provide more information about your nvidia problem, for example:

any warnings when you do rmmod/insmod nvidia? (not modprobe)

full startup log of X.Org when it fails? (I'm kind of expecting some error messages before the 'no screens found')

Do you have DRM (Rendering Manager) enabled in the kernel? (disable it)

----------

## radoslawc

Hello

it looks like glx extension isn't loaded do:

```

cat /etc/X11/xorg.conf | grep glx

```

if you see smoething like this:

# Load  "glx"

remove hash should work. [/code]

----------

## feminista

I already uncommented Load "glx".  I'll try re-commenting out the video RAM though.

----------

## feminista

Commenting out the video RAM line didn't help at all.

----------

## feminista

A restart randomly fixed the problem.  Between my last post and then, I had emerged VLC, tried very hard to emerge museek, and not done anything else that I can remember (although I messed with my /usr/src/linux and remerged nvidia-kernel several times without any apparent effect.

Thanks for those who offered suggestions, and a whole mess of swearwords at nvidia.

----------

## maverick256

just curious.... what nvidia-kernel and nvidia-glx versions are you using?

----------

## feminista

I'm using 1.0.7676 for both.  They were masked for amd64, but I had heard that updating to them helped some people.  Personally, I don't think that was what solved my problem, but they work fine.

----------

## apberzerk

I seem to be having the exact same problem.

Everything was working fine until I upgraded to xorg-x11-6.8.2-r3.  Then all of a sudden X won't start.  I get errors like this in /var/log/Xorg.0.log:

```

(II) LoadModule: "nvidia"

(WW) Warning, couldn't open module nvidia

(II) UnloadModule: "nvidia"

(EE) Failed to load module "nvidia" (module does not exist, 0)

```

along with

```

(II) LoadModule: "speedo"

(WW) Warning, couldn't open module speedo

(II) UnloadModule: "speedo"

(EE) Failed to load module "speedo" (module does not exist, 0)

(II) LoadModule: "xtt"

(WW) Warning, couldn't open module xtt

(II) UnloadModule: "xtt"

(EE) Failed to load module "xtt" (module does not exist, 0)

```

Dunno about the last two errors, but the nvidia error is ridiculous cause lsmod says it's there:

```

nvidia               3704456  0 

```

I have tried different versions of nvidia-kernl and nvidia-glx:

1.0.7676

1.0.7667

1.0.6629-r4

And so far, nothing.

X will only start if I use nv instead of nvidia, but then of course glx is broken, and glxgears gives:

```

Xlib:  extension "GLX" missing on display ":0.0".

glxgears: Error: couldn't get an RGB, Double-buffered visual.

```

This is getting very frustrating because I didn't even change any configuration files.

----------

## frostschutz

Did you make sure to reload the kernel module after re-emerge nvidia-glx and -kernel? Did you run the something or other switch to nvidia command that (newer versions of) nvidia-glx or -kernel asks you to do?

I actually had this problem too after switching to 2.6.13.1, but it went away after a simple and clean re-emerge of the nvidia ~x86 packages. running xorg-x11 6.8.2-r3, nvidia-glx 1.0.7676-r1, and nvidia-kernel 1.0.7676.

----------

## apberzerk

Yes yes yes, I did all the usual stuff.

After numerous re-emerged of various nvidia-kernel and nvidia-glx versions, I somehow managed to get X to boot with the nvidia module.  But then it didn't work next time I booted.

- Phil

----------

## apberzerk

By the way, what are the xtt and speedo modules, and should I be concerned that they also fail to load?

I am really starting to believe that this is an X proglem, not an nvidia module problem.

- Phil

----------

## groover

In this thread too...

I have the same problem; X.Org does not start using the nvidia driver nvidia_drv.o.

Fresh installed Gentoo System, merged gcc-3.4.4-r1, compiled the kernel (exactly the same kernel which ran before reinstalling gentoo, compiled with the same compiler), emerged nvidia-kernel, modprobe the module, emerged nvidia-glx and ran eselect opengl set nvidia: everything is fine up to here. 

The only thing which has changed is X.Org. Former I used 6.8.2-r2, after reinstalling it's 6.8.2-r3 and r4, but the same problem as mentioned above.

X.Org will only start using the nv driver which has no glx extensions.

X.Org congig:

```
<... truncated ...>

Section "Module"

        Load            "glx"

        Load            "freetype"

        Load            "extmod"

        SubSection "extmod"

                Option      "omit xfree86-dga"

        EndSubSection

EndSection

<... truncated ...>

Section "Device"

        Identifier      "nVidia GeForce 6600 GT"

#      Driver          "nvidia"

        Driver          "nv"

        BusID          "1:0:0"

        <... truncated some nvidia based optimization options ...>

EndSection

```

Okay, nothing new here. This is absolutely correct.

Starting X commenting out nv and using nvidia complains about not finding the nvidia module.

```
(II) LoadModule: "nvidia"

(WW) Warning, couldn't open module nvidia

(II) UnloadModule: "nvidia"

(EE) Failed to load module "nvidia" (module does not exist, 0)

...

(EE) No drivers available.

Fatal server error:

no screens found
```

Linking the nvidia module into X.Org's module path

```
ln -s /usr/lib/xorg/modules/drivers/nvidia_drv.o /usr/lib/modules/drivers/
```

results in X.Org starting up using the nvidia module but then complains about missing glx extensions and shuts down.

In fact it shouldn't be necessary to link this driver manually!

eselect opengl set nvidia sets the environment files correctly according to the pathes from the nvidia-glx extension, env-update, but no success at all.

I wonder if it would be possible to link the glx- directories into the X.Org pathes or anything similar, but it looks like the X.Org libs stay in the same subdirectory as the nvidia ones...  I don't know so much about all this and so I hope that anyone has an idea left about this. 

I'll test around and in case of success inform you here.

If you need some more info, code, configuration or anything else just drop me a line.

Thanks in advance, 

groover

----------

## oedipus

i have the same problem mentioned above.  About a week ago i fiddled with my .xorg.conf and i actually got everything to work, my glxgears were at around a humble (usual  :Sad:  ) 1100 fps, however i emerged world and even tho the the .xorg.conf was not changed whatsoever, i got the same problem again starting X.

----------

## apberzerk

Has anyone tried downgrading to 6.8.2-r2?

I did this

```

emerge =x11-base/xorg-x11-6.8.2-r2

```

but portage doesn't think that version exists anymore:

```

emerge: there are no ebuilds to satisfy "=x11-base/xorg-x11-6.8.2-r2"

```

... anyone know how to make it use that version?  Do I need to manually download the ebuild?

- Phil

----------

## groover

In my case Przemeks (see here: https://forums.gentoo.org/viewtopic-t-381372-highlight-xorg+nvidia.html) work didn't solve the problem. I compared all my entries in /etc/env.d again, did an env-update, checked everthing in /etc/ld.so.conf; here it is:

```
# ld.so.conf autogenerated by env-update; make all changes to

# contents of /etc/env.d directory

/usr/local/lib

/usr/lib/opengl/nvidia/lib

/usr/lib/opengl/nvidia/tls

/usr/i686-pc-linux-gnu/lib

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130

/usr/lib/mozilla-firefox

/usr/lib

/usr/lib/openmotif-2.2

/opt/blackdown-jdk-1.4.2.02/jre/lib/i386/

/opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/

/opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/

/opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/

/usr/qt/3/lib

```

X.Org still shuts down at the point it is trying to initialize glx.

```
(II) Loading extension NV-GLX

(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized

(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture

(==) NVIDIA(0): Backing store disabled

(==) NVIDIA(0): Silken mouse enabled

(II) Loading extension NV-CONTROL

(EE) NVIDIA(0): Failed to load GLX

...

Fatal server error:

Caught signal 11.  Server aborting
```

 *Quote:*   

> Has anyone tried downgrading to 6.8.2-r2?

 

I tried, but no success.

Yes, there is no ebuild anymore, but r2, r3 or r4 has nothing in Changelog which has to do with nvidia or graphics, or so.

I used a binary package for that. Senseless.

I'm not sure if I am right, but I think installing nvidia-glx produces a wrong line in /etc/env.d/03opengl:

```
//usr/lib/opengl/nvidia/lib
```

Fixing this did not help me out :(

Again, helpless,

groover

PS: Instead of linking nvidia_drv.o just write ModulePath- lines to xorg.conf:

```
Section "Files"

    ModulePath "/usr/lib/modules"

    ModulePath "/usr/lib/xorg/modules"

    ...

EndSection
```

X.Org now finds the module. This is definitely more beautiful than linking.

----------

## apberzerk

The following worked for me, too!  Thanks.

```

Section "Files"

    ModulePath "/usr/lib/modules"

    ModulePath "/usr/lib/xorg/modules"

    ...

EndSection

```

Truly a fine example of people coming together to help each other when a software is RETARDED  :Smile: 

----------

## legine

Hihi.

you guys checked opengl-update?

Maybe it did not switch from the software rendering of X to the nvidia glx libaries...

If you have problems with the Nvidia ceck opengl-update first  :Very Happy: !

feminista, that could have been your problem, too. Maybe after an update or restart or whatever it got switched to the glx extension.

my 2 cents

Legine

----------

## apberzerk

No, opengl-update is not the problem.  Besides, it's eselect set opengl nvidia (or something like that) on the newer versions.

- Phil

----------

## legine

It does not hurt to check it anyways does it?

----------

## apberzerk

Heh, nope  :Smile: 

Keep in mind, though, we seem to have found a fix.  Whether this works for everyone I do not know.

- Phil

----------

## groover

Hey there again.

I fixed all problems now by correcting symlinks in /usr/lib...

```
ls -alhF /usr/lib/modules/extensions/libglx.a

lrwxrwxrwx  1 root root 42 Sep 18 08:38 /usr/lib/modules/extensions/libglx.a -> //usr/lib/xorg/modules/extensions/libglx.so*
```

Fixed this:

```
ln -snf /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/modules/extensions/libglx.a
```

And:

```
ls -alhF /usr/lib/xorg/modules/extensions/libglx.so

lrwxrwxrwx  1 root root 43 Sep 19 06:06 /usr/lib/xorg/modules/extensions/libglx.so -> //usr/lib/opengl/nvidia/extensions/libglx.so*
```

Fixed this:

```
ln -snf /usr/lib/opengl/nvidia/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so
```

I absolute don't know for sure if this is correct. In my case X.Org now permanently starts up using the nvidia module without any GLX specific warnings in X.Org log.

```
glxinfo | grep direct

direct rendering: Yes
```

```
glxgears -info

GL_MAX_VIEWPORT_DIMS=4096/4096

GL_RENDERER   = GeForce 6600 GT/AGP/SSE/3DNOW!

GL_VERSION    = 2.0.0 NVIDIA 76.76

GL_VENDOR     = NVIDIA Corporation

...
```

(Currently emerging stuff so I do not post my benchmarks from glxgears now!)

It seems that everything is fine now :)

Regards, 

groover

PS: I am really fine that I was able to help you solving your problems, too

----------

## oedipus

I fixed my problem by downgrading my nvidia kernal to the same version as my glx-settings. i know they're supposed to be the same, but i needed to uncomment a line in a conf to enable nvidia downgrading.  i don't know the exact conf or anything off the top of my head, but all my problems went away once everything was the same version.

----------

