# [Solved] NVIDIA graphics driver installed, but no 3D...

## chix4mat

Hi all: 

The other day, I noticed that a new NVIDIA driver was available, so I decided to install it. After I rebooted and got back into my OS, there was no real 3D acceleration to be had. KDE 4's compositing worked fine, but games and things wouldn't. I backtracked and installed the previous NVIDIA driver again, but that didn't help either. In all, I tried three different drivers and neither of them fixed the issue.

I have re-emerged many packages that I thought might be able to fix the problem, and no cigar. I've even tried back-tracking to a slightly older kernel, and that didn't help things either. I'm hoping someone out there might have had the same kind of issue and possibly knows of a fix. 

I am not sure if it help's, but here's my Xorg.0.log file. I can't see a real issue or error in there, but I could be overlooking something. If there's other information I could provide, please let me know. 

If it matters, I'm using a 2.6.33.3 vanilla kernel from the official website, not a Gentoo-patched one. The latest NVIDIA driver I tried was 195.36.24 which I downloaded straight from the company's website.

Thanks!

----------

## keenblade

Did you run?

```

eselect opengl set nvidia

```

----------

## chix4mat

Thanks for the response, keenblade. I ran that command: 

```
localhost rwilliams # eselect opengl set nvidia

!!! Error: Unrecognized option: nvidia

exiting

localhost rwilliams # eselect opengl list

Available OpenGL implementations:

  [1]   xorg-x11 *
```

This result is strange, because the NVIDIA driver is installed. Xorg.conf shows "nvidia" as being the driver, and even the NVIDIA X Server Settings tool works fine.

----------

## NeddySeagoon

chix4mat,

Check the kernel versions in 

```
uname -a
```

 and 

```
readlink /usr/src/linux
```

If they are not the same, you are building one kernel version and running another. There is nothing wrong with that as long as its what you intended.

How did you install the nVidia driver?

Please post your /var/log/Xorg.0.log file

----------

## krinn

using vanilla kernel too, but i dont use vanilla nvidia-drivers, so gentoo is able to set opengl properly.

my advise:

keep using your vanilla kernel (for me, simpler as --depclean (and -u world) always bug me by removing my kernel sources of a running kernel)

but use the gentoo nvidia kernel (well, it's just an emerge nvidia-drivers)

Generally it's true some ebuild could lack latest version, but not really for nvidia-drivers and in your case, the 195.36.24 are also the ones gentoo is offering.

```
[ebuild   R   ] x11-drivers/nvidia-drivers-195.36.24  USE="acpi gtk -custom-cflags (-multilib)" 0 kB

```

That's why your eselect opengl fail. as you didn't use the gentoo nvidia-drivers, emerge don't know it need to install it

```
equery d app-admin/eselect-opengl-1.0.9

 * These packages depend on app-admin/eselect-opengl-1.0.9:

media-libs/mesa-7.8.1 (>=app-admin/eselect-opengl-1.1.1-r2)

x11-base/xorg-server-1.8.0 (>=app-admin/eselect-opengl-1.0.8)

x11-drivers/nvidia-drivers-195.36.24 (>=app-admin/eselect-opengl-1.0.9)

```

You may just try also to emerge eselect-opengl and try keeping vanilla nvidia-drivers now that gentoo as a way to handle opengl.

----------

## chix4mat

 *NeddySeagoon wrote:*   

> Check the kernel versions in 
> 
> ```
> uname -a
> ```
> ...

 

Those match up just fine as well: 

```
rwilliams@localhost ~ $ uname -a

Linux localhost 2.6.33.3 #1 SMP Wed May 5 17:05:39 ADT 2010 x86_64 Genuine Intel(R) CPU 000 @ 3.20GHz GenuineIntel GNU/Linux

rwilliams@localhost ~ $ readlink /usr/src/linux

linux-2.6.33.3
```

Here is my Xorg.0.log file. I installed the NVIDIA driver via normal means, with the .run files from the company's website. This is the only way I've ever installed the drivers, and I've never run into this particular issue before.

 *krinn wrote:*   

> keep using your vanilla kernel (for me, simpler as --depclean (and -u world) always bug me by removing my kernel sources of a running kernel)
> 
> but use the gentoo nvidia kernel (well, it's just an emerge nvidia-drivers)

 

Wow, err, I had no idea there were ACTUALLY kernel sources called "vanilla" in Gentoo, haha. By vanilla, I mean I always compile my kernel by going to Kernel.org and downloading it. I assume that "vanilla-sources" is pretty much the exact same thing though.

That aside, I did uninstall my regular drivers and opted into letting Portage handle it instead, but once I was into the OS, I had an even worse experience than before. Compositing would just not work, no matter what I did, and the 3D acceleration was still broke. At least when I install the drivers manually, compositing does indeed work. It's just the actual 3D acceleration that fails to. I should note that the GPU still works fine in Windows, so it's not that card at fault either.

This problem is so mind-numbing, because it seems like everything's in place as it should be, but it just refuses to work. I used official kernels straight from the official source from years, and the same goes for the NVIDIA drivers. Those are two aspects that I always handle, but this is the first time I've ever had an issue. I didn't even know that eselect had an opengl selection until now, as I've never needed it in the past. 

Thanks a lot for the help guys! This one is a doozy   :Confused: 

----------

## Raptor85

Do you get any errors when you run "eselect opengl set nvidia" ?  If so or if it's just not working whatsoever, check your opengl libs directory (I'm not at my home computer, so I'm unsure of the exact path, but I believe it's under /usr/lib/opengl) and see if any of the symlinks are broken.

Because you've mixed using both the gentoo method of installing the graphics driver, and manually installing it, there's a very good chance you've broken some symlinks in the process. (eselect/portage is completely unaware of the changes to the system made by manually installing the driver)

If you want to continue handling the drivers manually (not really much point, it's far safer to just version bump the ebuild yourself if you need a newer version), the same thing basically applies, make sure the symlinks to the opengl drivers are intact and pointing to the version you want, not the stock x11 drivers, otherwise you'll get software only rendering.

----------

## keenblade

I suggest uninstalling the .bin nvidia driver and use the one in portage which is usually up to date.

Try something like this:

```

nvidia-installer --uninstall

emerge -va nvidia-drivers

eselect opengl set nvidia 

```

----------

## chix4mat

 *Raptor85 wrote:*   

> Because you've mixed using both the gentoo method of installing the graphics driver, and manually installing it, there's a very good chance you've broken some symlinks in the process. (eselect/portage is completely unaware of the changes to the system made by manually installing the driver)

 

Everything looks good there, too. The only reason I vouched for installing the drivers via Portage is just because of the issues I was running into. It wasn't what caused it. Back when I started using Gentoo, I had issues with the NVIDIA drivers from Portage, so I just opted to install my own. I didn't know things were so much better today with very up-to-date drivers. I'll start installing drivers this way since it's less time-consuming.

 *keenblade wrote:*   

> I suggest uninstalling the .bin nvidia driver and use the one in portage which is usually up to date.
> 
> Try something like this:
> 
> ```
> ...

 

So... I did this, and sure enough, things look good:

```
localhost rwilliams # eselect opengl list

Available OpenGL implementations:

  [1]   nvidia *

  [2]   xorg-x11
```

But... I still have no 3D acceleration :-/ I am stuck in the same exact place I have been. The driver looks installed, and even the NVIDIA control panel works fine (can see card temperature, monitor model, clock speeds, et cetera), but there's just no acceleration at all. Compositing as I mentioned works fine, but that must just not require much acceleration at all. If I load up something like Nexuiz or even Google Earth, I get performance of about 1 - 2 FPS.

Here's a screenshot (400KB) that helps put things into perspective. As you can see, I have NVIDIA active via eselect, and even the active clock speeds are as they should be (NVIDIA GeForce GTX 285). Yet, once I load up Nexuiz, I see 2 FPS. As I mentioned, it's not just Nexuiz, but anything 3D accelerated. 3D graphics won't work in my VMware virtual machine either, as they always have. And again, it's not a hardware issue. I played a game in Windows last night without issue.

This problem doesn't make much sense...

----------

## Anon-E-moose

What does "glxinfo |head -5" return

----------

## chix4mat

 *Anon-E-moose wrote:*   

> What does "glxinfo |head -5" return

 

Haha, I didn't even have it installed. Not sure if that's typical or not. This is the output: 

```
localhost rwilliams # glxinfo |head -5

name of display: :0.0

display: :0  screen: 0

direct rendering: Yes

server glx vendor string: NVIDIA Corporation

server glx version string: 1.4
```

----------

## Anon-E-moose

You should be seeing 2d and 3d acceleration

what does "glxgears" show, let it run until the 1st frame line show, appx 5-6 seconds

----------

## chix4mat

 *Anon-E-moose wrote:*   

> You should be seeing 2d and 3d acceleration
> 
> what does "glxgears" show, let it run until the 1st frame line show, appx 5-6 seconds

 

Yes, I should be seeing it... "should" being the operative word  :Wink: 

```
localhost rwilliams # glxgears

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

31270 frames in 5.0 seconds = 6253.437 FPS

31676 frames in 5.0 seconds = 6335.031 FPS

32894 frames in 5.0 seconds = 6578.735 FPS

36050 frames in 5.0 seconds = 7209.377 FPS

32699 frames in 5.0 seconds = 6539.770 FPS
```

These numbers should be in the tens of thousands. I haven't used glxgears on this GPU ever that I'm aware of, but the numbers should be a lot higher than this.

On the last reboot, I noticed a lot of UDEV errors, which apparently were caused by upgrading to version 149. I backtracked to 141, which got rid of the errors, but still didn't fix this issue.

----------

## krinn

```
glxgears                                            

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

33160 frames in 5.0 seconds = 6630.787 FPS

31910 frames in 5.0 seconds = 6381.837 FPS

32765 frames in 5.0 seconds = 6551.629 FPS

32485 frames in 5.0 seconds = 6496.994 FPS

32383 frames in 5.0 seconds = 6476.579 FPS

lspci | grep nVid 

02:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce GTX 260] (rev a1)

edit: just in case you doubt

killall compiz

glxgears

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

112433 frames in 5.0 seconds = 22486.559 FPS

112858 frames in 5.0 seconds = 22571.514 FPS

112784 frames in 5.0 seconds = 22556.773 FPS

112188 frames in 5.0 seconds = 22437.537 FPS

xrandr -q | grep Screen 

Screen 0: minimum 640 x 480, current 2560 x 1024, maximum 2560 x 1024

```

dunno what numbers you were expecting, but your 3D is working.

edit: as you see, compiz come with a prize. maybe you are running your game windowed, because i run etqw fullscreen and it's running fine.Last edited by krinn on Sat May 08, 2010 8:13 pm; edited 1 time in total

----------

## NeddySeagoon

chix4mat,

What CPU power savings are you using?

That affects the numbers

----------

## chix4mat

 *krinn wrote:*   

> dunno what numbers you were expecting, but your 3D is working.

 

Just out of curiosity, do you do -any- gaming in Linux at all? Because it makes no sense that both of our glxgears numbers add up, yet -nothing- 3D works beyond 1 - 2 FPS. Not Nexuiz, not Google Earth, nothing. I should also note that for some reason, performance is worse when I run glxgears as root. As non-root they're a bit higher: 

```
rwilliams@localhost ~ $ glxgears

NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

48790 frames in 5.0 seconds = 9754.915 FPS

46351 frames in 5.0 seconds = 9268.872 FPS

46087 frames in 5.0 seconds = 9215.505 FPS

45374 frames in 5.0 seconds = 9069.014 FPS

45960 frames in 5.0 seconds = 9188.591 FPS

45312 frames in 5.0 seconds = 9056.281 FPS
```

I don't ever recall seeing an error like the one there, but it's been years since I last ran glxgears.

 *NeddySeagoon wrote:*   

> What CPU power savings are you using?
> 
> That affects the numbers

 

To my knowledge, I am not doing anything special there. As I mentioned before, this is a -new- problem, not one that has simply plagued me ever since I installed Gentoo. Just days ago, I could do anything in Linux 3D-wise just fine, but as it stands now, I can't. The only thing different I did since this issue crept up was upgrade the kernel (2.6.33 > 2.6.33.3), but even since then, I've backtracked and had no further success.

----------

## NeddySeagoon

chix4mat,

You should have 

```
$ ls /dev/nvid* -l

crw-rw---- 1 root video 195,   0 May  8 11:47 /dev/nvidia0

crw-rw---- 1 root video 195, 255 May  8 11:47 /dev/nvidiactl
```

Users that will use direct rendering must be in the video group, or they have no permissions to the above file and Xorg will fall back to (software) indirect rendering.

----------

## Anon-E-moose

 *krinn wrote:*   

> 
> 
> dunno what numbers you were expecting, but your 3D is working.
> 
> edit: as you see, compiz come with a prize. maybe you are running your game windowed, because i run etqw fullscreen and it's running fine.

 

I have to agree that his 3D appears to be working fine

Edit to add: Since I'm the only user on this machine I always add my userid to all entries in /etc/group

----------

## chix4mat

 *Anon-E-moose wrote:*   

> I have to agree that his 3D appears to be working fine

 

Coming to the conclusion that 3D is "working fine" based on a glxgears output isn't how things should be done. That'll be made more clear in a moment...

 *NeddySeagoon wrote:*   

> Users that will use direct rendering must be in the video group, or they have no permissions to the above file and Xorg will fall back to (software) indirect rendering.

 

Well, this has become the second time in recent memory that a usergroup has kicked my ass. Sure enough, that was the problem. After I fixed up the permissions, even glxgears saw an instant boost:

```
rwilliams@localhost ~ $ glxgears

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

56806 frames in 5.0 seconds = 11361.144 FPS

55341 frames in 5.0 seconds = 11068.077 FPS

55103 frames in 5.0 seconds = 11020.445 FPS

57525 frames in 5.0 seconds = 11504.914 FPS

58039 frames in 5.0 seconds = 11607.754 FPS

57855 frames in 5.0 seconds = 11570.945 FPS
```

Google Earth once again works fine, and rather than seeing 2 FPS in Nexuiz, I'm now seeing 298 FPS from the same scene.

What bothers me about this though is that the video group had to have been enabled on that user before. I assume that's the case because I haven't ever had a GPU issue like this before... it just started. And I've been using this same exact Gentoo install since December 2007. I'd blame it on something emerge installed, but this issue came to light immediately after I tried installing the latest driver, and before that, I hadn't used emerge to update anything in a couple of weeks. 

Oh well, I'm glad this is finally resolved, and I'll never let a usergroup make a fool of me again  :Wink: 

Thanks a ton NeddySeagoon. You've helped me out multiple times on these forums and I appreciate it greatly.

----------

