# Nvidia proprietary driver glx problem

## est921

Hi, i'm new to gentoo, and simply can't get X to work. I'm trying to use the proprietary Nvidia drivers along with a gnome setup. When I start gdm I instantly get the "something went wrong screen", no login screen. I found these lines

 *Quote:*   

> "  1592.314] (II) Module "ramdac" already built-in
> 
> [  1592.314] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
> 
> [  1592.314] (==) NVIDIA(0): RGB weight 888
> ...

 [/code]

 in my Xorg.0.log, but haven't figured out how to solve it. Reinstalling the driverd did not help. Any suggestions?

----------

## NeddySeagoon

est921,

Welcome to gentoo.

You need to select the nvidia opengl.  Play with 

```
eselect opengl
```

Also make friends with wgetpaste.  Whole logs are much easier to work with that just the error message.

----------

## est921

 *NeddySeagoon wrote:*   

> est921,
> 
> Welcome to gentoo.
> 
> You need to select the nvidia opengl.  Play with 
> ...

 

Hey, and thanks for your reply. I had already set opengl and opencl to nvidia with eselect.

Here's my entire Xorg.0.log:

https://bpaste.net/show/2deae1778883

----------

## NeddySeagoon

est921,

```
Linux localhost 4.1.12-gentoo #4 SMP Sun Dec 20 15:32:05 2015 x86_64
```

Tells that you have had four goes at building the kernel and the runnitg kernel was built today.

```
[     9.952] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
```

The Xorg part loaded.

I was expecting to see a section like

```
[    42.651] (II) LoadModule: "glx"

[    42.653] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so

[    42.663] (II) Module glx: vendor="X.Org Foundation"

[    42.663]    compiled for 1.17.4, module version = 1.0.0

[    42.663]    ABI class: X.Org Server Extension, version 9.0

[    42.663] (==) AIGLX enabled
```

You have 

```
[     9.775] (**) ModulePath set to "/usr/lib64/opengl/nvidia,/usr/lib64/xorg/modules"
```

The nvidia glx module should be there.

It gets worse.

```
[    51.403] (EE) Segmentation fault at address 0x0
```

Something tried to access memory it doesn't own.

There's several causes. The same gcc not being used for the kernel and its modules - including the nvidia binary blob.

Some major kernel config change and the kernel not being rebuilt starting with make clean.

The /usr/src/linux symlink not pointing to the kernel you are running, here 4.1.12-gentoo.

Get all your ducks in a row. Check that  /usr/src/linux points to the right place.

Rebuild and reinstall the kernel starting with 

```
cd   /usr/src/linux

make clean
```

so there are no binaries to be reused.

```
emerge -1 nvidia-drivers
```

Reboot to test.

Now we know its a clean build, all made with the same gcc.  It will be #5.

----------

## est921

I have now rebuilt the kernel (again), and the nvidia driver, which got rid of the segmentation fault. My original problem persists, though. 

Thank you for trying to help!

Xorg.0.log: https://bpaste.net/show/a8966c5a877a

----------

## NeddySeagoon

est921,

The nvidia glx module should be in on of these dir,

```
[    10.133] (**) ModulePath set to "/usr/lib64/opengl/nvidia,/usr/lib64/xorg/modules"
```

is it?

It should be loaded automatically but if not, add 

```
Section "Module"

# This loads the GLX module

    Load       "glx"

EndSection
```

to your xorg.conf.

If you already have a Section "Module",  check that it does not contain 

```
Disable "glx"
```

and add in the Load statement.

----------

## est921

 *Quote:*   

> 
> 
> It should be loaded automatically but if not, add 
> 
> ```
> ...

 

That did it, Thank you!

----------

