# nvidia-drivers emerges / NVRM: API mismatch [SOLVED]

## PSzalapski

After searching, I can't find anything on this.

I'm using my gentoo box exclusively for mythtv high-def frontend and backend, with HD-3000 (no problems there), as well as an nVidia 6200 card with its DVI out.  I'm using kernel 2.6.12 with a Pentium 4 2.4 GHz.  

Ijust emerged the new non-monolithic xorg-x11-7.0-r1, following the directions at http://www.gentoo.org/proj/en/desktop/x/x11/modular-x-howto.xml . Everything seemed to go okay, and I eventually was able to start xorg with the fluxbox window manager just fine.  However, it seems to be using vesa graphics, rather than nvidia-drivers.

So I unmerged the old nvidia-glx and nvidia-kernel, and emerge nvidia-drivers, thinking it wouldn't be a big deal to upgrade my drivers.  I followed the directions at http://www.gentoo.org/doc/en/nvidia-guide.xml .  Everything seems to work through loading the driver, and X.org starts fine.  dmesg shows no errors.  

However, when I go to watch a video using mythfrontend and xvmc, the high-def video tries to play without xvmc and is thus really choppy as the CPU is pegged.  I then get this in my dmesg:

```
ACPI: PCI Interrupt 0000:01:05.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-8774  Tue Aug  1 20:54:08 PDT 2006

spurious 8259A interrupt: IRQ7.

NVRM: API mismatch: the client has the version 1.0-7664, but

NVRM: this kernel module has the version 1.0-8774.  Please

NVRM: make sure that this kernel module and all NVIDIA driver

NVRM: components have the same version.

spurious 8259A interrupt: IRQ15.
```

Does this mean I have some vestige of nvidia-glx 7664 somewhere?  I don't get it--I can't imagine what else to do.

Here's part of xorg.conf:

```

Section "Module"

    Load        "dbe"

    SubSection  "extmod"

        Option  "omit xfree86-dga"

    EndSubSection

    Load        "type1"

    Load        "freetype"

    Load        "glx"

EndSection

Section "Monitor"

   Identifier   "Sanyo HDTV"

   DisplaySize 480 270 # in mm # actually is 664 373

   ModeLine "1280x720" 74.250 1280 1360 1400 1648 720 725 730 750 -hsync -vsync

EndSection

Section "Device"

    Identifier  "GF6200"

    Driver      "nvidia"

    Option      "RenderAccel" "true"

    Option      "NvAGP" "3"

EndSection

Section "Screen"

    Identifier  "Screen 1"

    Device      "GF6200"

    Monitor      "Sanyo HDTV"

    Option      "ConnectedMonitor" "DFP-0"

    DefaultDepth 24

    DefaultFbBpp 32

    SubSection "Display"

        Depth           24

        Modes           "1280x720" "960x540" "720x480"

    EndSubsection

EndSection

```

I'm not sure what to do!  I've tried reinstalling nvidia-drivers and xorg, but same result.  I've tried looking for an earlier version of nvidia-drivers, but they're all gone.  Please, any advice would be greatly appreciated.  Let me know what other files/commands you want to see.

P-SzLast edited by PSzalapski on Sat Oct 21, 2006 2:51 pm; edited 1 time in total

----------

## Hagar

 *PSzalapski wrote:*   

> After searching, I can't find anything on this.
> 
> However, when I go to watch a video using mythfrontend and xvmc, the high-def video tries to play without xvmc and is thus really choppy as the CPU is pegged.  I then get this in my dmesg:
> 
> ```
> ...

 

Yes, your kernel still has the old nvidia module in it's memory.

Either reboot or `rmmod nvidia && modprobe nvidia`

You have to kill X before you can do the latter.

----------

## PSzalapski

 *Hagar wrote:*   

> 
> 
> Yes, your kernel still has the old nvidia module in it's memory.
> 
> Either reboot or `rmmod nvidia && modprobe nvidia`
> ...

  I did that many times.  Stopped X and xdm, rmmod nvidia && modprobe nvidia, then start xdm, then start mythfrontend, then watch a video--no change.  I get another message in dmesg like the above.  Where could it be getting the old nvidia module?  I unmerged it and rebooted since then.

Thanks, I really appreciate it.

----------

## Hagar

You are correct, it's not the kernel module but the X driver.

I'm not sure how that's possible, afaik the xorg driver component has always used the same filename and thus is overwritten every update.

What's the output of `ls /usr/lib/xorg/modules/drivers/` ?

----------

## PSzalapski

 *Hagar wrote:*   

> You are correct, it's not the kernel module but the X driver.
> 
> I'm not sure how that's possible, afaik the xorg driver component has always used the same filename and thus is overwritten every update.
> 
> What's the output of `ls /usr/lib/xorg/modules/drivers/` ?

 

```
nv_drv.so  nvidia_drv.so  riva128.so  vesa_drv.so
```

I installed xorg before nvidia-drivers, but I reemerged xorg after that.  How can I proceed?

----------

## Hagar

The only thing you can do is look for that stray nvidia glx driver  :Smile: 

Did you by any chance install that version with nvidia's installer?

Just for fun you could try to run `find /usr -name nvidia_drv.so`

If it finds more then one you know what to do  :Wink: 

----------

## pteppic

Have you ever used the installer from the nvidia site, as opposed to the ebuild, and have you run eselect opengl set nvidia?

----------

## PSzalapski

 *pteppic wrote:*   

> Have you ever used the installer from the nvidia site, as opposed to the ebuild, and have you run eselect opengl set nvidia?

 

 *Hagar wrote:*   

> The only thing you can do is look for that stray nvidia glx driver 
> 
> Did you by any chance install that version with nvidia's installer?
> 
> Just for fun you could try to run `find /usr -name nvidia_drv.so`
> ...

 

I've always used the ebuild, and I've run the eselect command above to use nvidia for acceleration.

"find /usr -name nvidia_drv.so" finds only one file.

Any other ideas?

----------

## PSzalapski

One more thing--the notice in dmesg above doesn't appear until I start watching a video in mythfrontend .19 using xvmc.  It doesn't appear when I start X.  Could it be that X is using the proper driver but mythfrontend/xvmc isn't?  How would I find out what driver X is using?  Can I try using some other application to test the nvidia-drivers?

----------

## dleverton

Have you tried rebuilding mythtv?  It's possible that it has the old version of the XvMC library statically linked in.

----------

## PSzalapski

 *dleverton wrote:*   

> Have you tried rebuilding mythtv?  It's possible that it has the old version of the XvMC library statically linked in.

 Yes, I just did a new emerge of the new mythtv .20.  The new version seems to work great, except that the video is still choppy and the message above still appears in dmesg.  Any other ideas?  Should I unmerge some things and reemerge them?  In what order?

----------

## pteppic

```
emerge --oneshot media-libs/mesa
```

 will rebuild the xorg glx stuff, so at a push use them until your nv glx stuff is sorted.

```
equery list nvidia
```

 Will tell you all the nvidia related packages installed, which should now include x11-drivers/nvidia-drivers-1.0.8774, and no nvidia-kernel or nvidia-glx packages.

Finally 

```
 equery belongs /usr/lib/opengl/nvidia/extensions/libglx.so
```

 will tell you where your nvidia glx is coming from, and 

```
 equery belongs /usr/lib/xorg/modules/drivers/nvidia_drv.so
```

 should point to the same package.

----------

## mtoups

The thread https://forums.gentoo.org/viewtopic-t-440599-highlight-.html might be of some help.  Evidently, the old libraries do not get deleted sometimes and some files/links point to the wrong version.

----------

## PSzalapski

The equery lines that pteppic recommended showed only the new drivers.  Nevertheless, I went through the steps in https://forums.gentoo.org/viewtopic-t-440599-highlight-.html to delete all remnants of all nvidia drivers, then I reemerged nvidia-drivers, and I no longer get the error message.

However, that wasn't my problem with MythTV, as I just found out.  My problem was that I didn't have a /etc/X11/XvMCConfig file, so I created one with just one line:

```
libXvMCNVIDIA_dynamic.so.1
```

Then XvMC kicked in.  I now have dozens of pauses every second, but I guess that will be another thread.

Thanks all for your help.

----------

