# nVidia weirdness

## Jonathan_R

I have an nVidia card (obviously since it's in the subject), but whats weird is when I do eselect nvidia set, I get a frame in 13 seconds. glxinfo | grep direct shows yes. However, when I change eselect to Xorg, I get; 1629 frames in 5.0 seconds = 325.799 FPS

1791 frames in 5.0 seconds = 358.152 FPS

1999 frames in 5.0 seconds = 399.595 FPS

1948 frames in 5.0 seconds = 389.512 FPS

My nvidia card is; 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 8400 GS Rev. 3] (rev a2)

emerge --search nvidia-drivers shows; 

*  x11-drivers/nvidia-drivers

      Latest version available: 334.16-r4

      Latest version installed: 334.16-r4

      Size of files: 65,962 kB

      Homepage:      http://www.nvidia.com/

      Description:   NVIDIA X11 driver and GLX libraries

      License:       GPL-2 NVIDIA-r1

I followed this wiki; http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers

My kernel is configured in accordance to that wiki. 

I used nvidia-xconfig to give me a working Xorg. I do get the nvidia splash screen.

So why is it, when I do eselect nvidia set, that my FPS goes way down? Whats wrong? What other info do you need?

----------

## roarinelk

use a proper benchmark tool, like one of the unigine demos.

open nvidia-settings, go to the powermizer section, and select "prefer maximum performance"

----------

## jburns

nvidia-drivers-334.16-r4 provides libEGL.so which replaces the media-libs/mesa  libEGL.so.  There is a newer version nvidia-drivers-334.16-r5 but it still has problems.

You can mask nvidia-drivers-334.16-r5 and build the older driver but media-libs/mesa should also be re-emerged.  I had to add "media-libs/mesa llvm-shared-libs" to package.use to get it to compile.

Edit

After emerging the older nvidia-drivers emerge will print a existing preserved libs message.  Instead of doing emerge @preserved-rebuild use eselect opengl to select xorg-x11 and then select nvidia.  Then delete /usr/lib32/opengl/nvidia/lib/libEGL.so.1 and /usr/lib32/opengl/nvidia/lib/libEGL.so.334.16.Last edited by jburns on Wed Feb 12, 2014 7:50 pm; edited 1 time in total

----------

## PaulBredbury

Nvidia 334.16 crashes the kernel, with firefox - buggy as usual  :Sad: 

I use Nvidia 304.119, which is stable.

----------

## ulenrich

@Paul 

in that nvidia thread they mention you have to intel_iommu=n but I don't have any issue using firefox-24.3 and nvidia-334 with

```
# zcat /proc/config.gz |grep -i iommu

CONFIG_GART_IOMMU=y

CONFIG_CALGARY_IOMMU=y

CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y

CONFIG_IOMMU_HELPER=y

CONFIG_IOMMU_API=y

CONFIG_IOMMU_SUPPORT=y

# CONFIG_AMD_IOMMU is not set

CONFIG_INTEL_IOMMU=y

# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set

CONFIG_INTEL_IOMMU_FLOPPY_WA=y

# CONFIG_IOMMU_STRESS is not set
```

Though I use the shorter Archlinux nvidia patch (without the uvm section) with kernel vanilla linux-3.13, see

https://forums.gentoo.org/viewtopic-p-7498982.html#7498982

 and mesa-10:

```
ebuild   R   #] media-libs/mesa-10.0.3  USE="-bindist classic -debug egl -gallium -gbm -gles1 gles2 -llvm -llvm-shared-libs nptl -opencl -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler (-selinux) vdpau -wayland -xa -xvmc" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="(-freedreno) -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware"
```

Can someone tell me: How is this mesa ebuild related to propr. nvidia-drivers?

Because of the new amd64 egl capability of propr. nvidia-drivers?

----------

## PaulBredbury

I think that disabling the IOMMU is a bad idea - just trying to hide the problem.

The worrying error I got was:

```
BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
```

So I went straight back to 304.119

----------

## Anon-E-moose

 *PaulBredbury wrote:*   

> I think that disabling the IOMMU is a bad idea - just trying to hide the problem.

 

The only use for IOMMU, AFAIK is for virtualization. 

In my case I do run qemu virtual systems and do passthrough various devices, which does use IOMMU.

I did have problems with some devices not working properly in normal linux not virtuals,

until I told them to passthrough (AMD) with iommu=pt, but intel motherboards have a similar flag

or may even use the same flag, they keep changing how things are passed.

Edit to add: This is not to say that the driver wasn't at fault, when I was using 

the nvidia binary drivers they would cause problems about every 2-3 new release,

though they do label them as beta (most of the time)

----------

## Jonathan_R

 *roarinelk wrote:*   

> use a proper benchmark tool, like one of the unigine demos.
> 
> open nvidia-settings, go to the powermizer section, and select "prefer maximum performance"

 

I have read every post in this thread, and followed the advise above, same weirdness I described above. I did set performance of nvidia-settings to prefer maximum performance. 

with eselect opengl set nvidia 

3 frames in 13.0 seconds =  0.230 FPS

2 frames in 13.1 seconds =  0.153 FPS

However, when I change eselect to Xorg, I get; 

1629 frames in 5.0 seconds = 325.799 FPS

1791 frames in 5.0 seconds = 358.152 FPS

1999 frames in 5.0 seconds = 399.595 FPS

1948 frames in 5.0 seconds = 389.512 FPS

Something else is amiss.

----------

## mir3x

I dont understand - how u can have only 300 fps in glxgears ??? ffs, I think i had 300 fps on Geforce 2 which was produced about 13 years ago ????

Now i have low end 430 GT which is making 7k fps,

R u guys sure u can use 3XX drivers ??? I really doubt if any supported nvidia card by 3xx driver would get below 1k fps .

anyway I tested also with xorg-x11 drivers - results was almost the same, but it looked like 10 fps, was choppy like hell ... dropped some errors ... and it wrote that its synchronized vertically ??? some crap

libGL: screen 0 does not appear to be DRI2 capable

libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so

libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so

libGL error: failed to load driver: swrast

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

34563 frames in 5.0 seconds = 6911.653 FPS

35180 frames in 5.0 seconds = 7034.373 FPS

....

maybe u have installed nvidia-drivers manually earlier ?? Then u have to uninstall it manually using original installer or find any libnvidia files in /usr/lib/libnvidia.X.Y - then locate rest *.X.Y and delete them all

----------

## kernelOfTruth

 *PaulBredbury wrote:*   

> I think that disabling the IOMMU is a bad idea - just trying to hide the problem.
> 
> The worrying error I got was:
> 
> ```
> ...

 

yeah, weird times

firefox works fine but I seem to suffer from issues with akonadi

what graphics card do you have ?

using a GTX 760, so downgrading isn't so easy 

will have to wait for new drivers ...

----------

## Jonathan_R

 *mir3x wrote:*   

> I dont understand - how u can have only 300 fps in glxgears ??? ffs, I think i had 300 fps on Geforce 2 which was produced about 13 years ago ????
> 
> Now i have low end 430 GT which is making 7k fps,
> 
> R u guys sure u can use 3XX drivers ??? I really doubt if any supported nvidia card by 3xx driver would get below 1k fps .
> ...

 

I never installed the nvidia drivers manually. It was always done with portage. 3XX FPS is the best I have seen this thing do. It certainly beast 0.230 FPS. I don't have any issues with choppiness. 

x11-drivers/nvidia-drivers-334.16-r5 is what I have installed.

----------

## PaulBredbury

Nvidia 331.49 is out, with bugfixes.

----------

## Chiitoo

Jonathan_R,

I don't know if this can bring you any closer to the solution, or if you have already solved it, but have you actually tried something else in addition to glxgears?  A game or few for example should do good in giving more perspective to the matter (or so I maybe think).

I have personally used the latest versions of nvidia-drivers available in the official tree for a long time now, and did not see this issue with the 334.16 drivers, or any incarnation of it (no firefox crashing or anything weird in dmesg).  I could just have missed it, of course.

Using a 275 GTX card.

----------

## Jonathan_R

 *Chiitoo wrote:*   

> Jonathan_R,
> 
> I don't know if this can bring you any closer to the solution, or if you have already solved it, but have you actually tried something else in addition to glxgears?  A game or few for example should do good in giving more perspective to the matter (or so I maybe think).
> 
> I have personally used the latest versions of nvidia-drivers available in the official tree for a long time now, and did not see this issue with the 334.16 drivers, or any incarnation of it (no firefox crashing or anything weird in dmesg).  I could just have missed it, of course.
> ...

 

When trying to play a game, the screen wont even render when I have eselect opengl set nvidia. If it is not set to nvidia, the the FPS  is, as you saw, a lot better. I should be getting my new laptop tomorrow, in which it's an all intel laptop. It's an Acer and comes with Linpus Linux preinstalled. I'll wipe Linpus off and put Gentoo on.

----------

## PaulBredbury

Haven't you done any googling for nvidia debugging?

dmesg

/var/log/Xorg.0.log

/var/log/messages

See what files you have installed, e.g.:

```
find /usr/lib -iname \*nvidia\*
```

Check that you don't have multiple nvidia versions installed.

Try vmalloc=384M in the kernel commandline (via e.g. grub).

See Nvidia's forum.

----------

## Jonathan_R

 *PaulBredbury wrote:*   

> Haven't you done any googling for nvidia debugging?
> 
> dmesg
> 
> /var/log/Xorg.0.log
> ...

 

Well, duh. Yeah I googled. I know what files I have installed. I only have one nvidia driver installed. I always try to exhaust google before posting in a forum. You might notice my low post count. That's because most of the time, I google it and resolve it myself. I only post a question when I have exhausted all other avenues. Sorry if I sound a bit snooty. I forget that you don't know me or my habits or my experience. 

```
find /usr/lib* -iname \*nvidia\*

/usr/lib32/libnvidia-glcore.so.1

/usr/lib32/libnvidia-ifr.so.1

/usr/lib32/libnvidia-ml.so.334.16

/usr/lib32/libnvidia-opencl.so.334.16

/usr/lib32/libvdpau_nvidia.so.334.16

/usr/lib32/libnvidia-eglcore.so

/usr/lib32/libnvidia-ifr.so.334.16

/usr/lib32/libnvidia-tls.so.1

/usr/lib32/libvdpau_nvidia.so

/usr/lib32/libvdpau_nvidia.so.1

/usr/lib32/libnvidia-ml.so.1

/usr/lib32/libnvidia-tls.so

/usr/lib32/libnvidia-glcore.so

/usr/lib32/OpenCL/vendors/nvidia

/usr/lib32/libnvidia-compiler.so.1

/usr/lib32/libnvidia-eglcore.so.334.16

/usr/lib32/libnvidia-ifr.so

/usr/lib32/libnvidia-ml.so

/usr/lib32/libnvidia-compiler.so.334.16

/usr/lib32/libnvidia-compiler.so

/usr/lib32/libnvidia-glsi.so.1

/usr/lib32/libnvidia-opencl.so

/usr/lib32/libnvidia-glcore.so.334.16

/usr/lib32/libnvidia-eglcore.so.1

/usr/lib32/libnvidia-tls.so.334.16

/usr/lib32/libnvidia-opencl.so.1

/usr/lib32/libnvidia-glsi.so

/usr/lib32/opengl/nvidia

/usr/lib32/libnvidia-glsi.so.334.16

/usr/lib64/libnvidia-glcore.so.1

/usr/lib64/libnvidia-encode.so.334.16

/usr/lib64/libnvidia-ifr.so.1

/usr/lib64/libnvidia-ml.so.334.16

/usr/lib64/libnvidia-cfg.so.1

/usr/lib64/libnvidia-opencl.so.334.16

/usr/lib64/libvdpau_nvidia.so.334.16

/usr/lib64/libnvidia-fbc.so

/usr/lib64/libnvidia-eglcore.so

/usr/lib64/libnvidia-cfg.so.334.16

/usr/lib64/libnvidia-ifr.so.334.16

/usr/lib64/libnvidia-tls.so.1

/usr/lib64/libvdpau_nvidia.so

/usr/lib64/libvdpau_nvidia.so.1

/usr/lib64/libnvidia-ml.so.1

/usr/lib64/libnvidia-tls.so

/usr/lib64/xorg/modules/drivers/nvidia_drv.so

/usr/lib64/libnvidia-encode.so

/usr/lib64/libnvidia-glcore.so

/usr/lib64/OpenCL/vendors/nvidia

/usr/lib64/libnvidia-fbc.so.1

/usr/lib64/libnvidia-compiler.so.1

/usr/lib64/libnvidia-eglcore.so.334.16

/usr/lib64/libnvidia-ifr.so

/usr/lib64/libnvidia-ml.so

/usr/lib64/libnvidia-compiler.so.334.16

/usr/lib64/libnvidia-compiler.so

/usr/lib64/va/drivers/nvidia_drv_video.so

/usr/lib64/libnvidia-fbc.so.334.16

/usr/lib64/libnvidia-glsi.so.1

/usr/lib64/libnvidia-opencl.so

/usr/lib64/libnvidia-glcore.so.334.16

/usr/lib64/pkgconfig/nvidia-cg-toolkit-gl.pc

/usr/lib64/pkgconfig/nvidia-cg-toolkit.pc

/usr/lib64/pkgconfig/nvidia-cg-toolkit-gl-32.pc

/usr/lib64/pkgconfig/nvidia-cg-toolkit-32.pc

/usr/lib64/libnvidia-encode.so.1

/usr/lib64/libnvidia-eglcore.so.1

/usr/lib64/libnvidia-cfg.so

/usr/lib64/libnvidia-tls.so.334.16

/usr/lib64/libnvidia-opencl.so.1

/usr/lib64/libnvidia-glsi.so

/usr/lib64/opengl/nvidia

/usr/lib64/libnvidia-glsi.so.334.16

```

```
emerge --search nvidia-driver

Searching...        

[ Results for search key : nvidia-driver ]

[ Applications found : 1 ]

*  x11-drivers/nvidia-drivers

      Latest version available: 334.16-r6

      Latest version installed: 334.16-r6

      Size of files: 65,962 kB

      Homepage:      http://www.nvidia.com/

      Description:   NVIDIA X11 driver and GLX libraries

      License:       GPL-2 NVIDIA-r1

```

----------

## PaulBredbury

Latest Gentoo package is 334.16-r7

----------

## kernelOfTruth

FYI:

just had 2 crashes (after reboot) of X caused by segfault of dbus (error 7), not sure if it's related to the nvidia-drivers I just had installed (331.49) - had done some system updating for maintenance,

and upgraded by to 334.16-r7 from the mentioned driver & 334.16-r5

just wanted to let you know

in case you observe some instabilities after a system (driver) update

----------

