# nvidia module needs unknown symbols [Solved]

## tek0

I upgraded the kernel from 2.6.16-r4 to 2.6.16-r7 yesterday, and when I re-emerged nvidia-kernel, I got this:

```
WARNING: //lib/modules/2.6.16-gentoo-r7/video/nvidia.ko needs unknown symbol remap_page_range

WARNING: //lib/modules/2.6.16-gentoo-r7/video/nvidia.ko needs unknown symbol pci_find_class 
```

When modprobing, it fails and dmesg tells the same as above.

 Solution: 

Turn off ccache during emerge.

```
FEATURES="-ccache" emerge nvidia-drivers
```

A more elegant solution would probably be using the per-package module from portage-bashrc-ng.

The following is redundant!

The version of the driver is 8756, I also tried the stable version and the 8178. I also tried installed 8174 from nvidia.com manually with a patch I got from nvnews forums issuing exactly this situation.

I tried it back with 2.6.16-r4, but suddenly, that didn't work out either, and also 2.6.15-r8.

The kernel sources symlink was always correct and the driver compiled cleanly, except for some warnings concerning that problem:

```
#warning "conftest.sh failed, assuming remap_page_range(4)!"
```

In Makefile.kbuild, I found:

```
ifeq ($(shell $(CONFTEST) pci_get_class), 1)

EXTRA_CFLAGS += -DNV_PCI_GET_CLASS_PRESENT

endif
```

and

```

ifeq ($(shell $(CONFTEST) remap_pfn_range), 1)

EXTRA_CFLAGS += -DNV_REMAP_PFN_RANGE_PRESENT

else

REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_page_range)

ifeq ($(REMAP_PAGE_RANGE), 5)

EXTRA_CFLAGS += -DNV_REMAP_PAGE_RANGE_5_PRESENT

endif

ifeq ($(REMAP_PAGE_RANGE), 4)

EXTRA_CFLAGS += -DNV_REMAP_PAGE_RANGE_4_PRESENT

endif

endif
```

where the latter is analog to the warning, and both refer to the missing symbols. What bothers me most it that neither the kernel nor this Makefile has changed since it worked last (at least when switching back to 2.6.16-r4).

Every thread I found here and on other boards was solved by using a 15-kernel or a newer driver version, which didn't work for me.Last edited by tek0 on Mon Aug 28, 2006 2:01 pm; edited 3 times in total

----------

## tek0

I finally solved it using the 8178 driver I downloaded at nvidia.com and a patch, that was posted in nvnews forums. It is the first one: NVIDIA_kernel-1.0-8178-U012206.diff.txt

----------

## tost

How do i use this patch ?

I´m a bit confused

----------

## tek0

It is explained in that thread:

 *Quote:*   

> 
> 
> # sh /path/to/NVIDIA-Linux-x86-1.0-8178-pkg1.run --extract-only
> 
> # cd NVIDIA-Linux-x86-1.0-8178-pkg1
> ...

 

the .run package can be obtained from nvidia.com. keep an eye for the version no.!

----------

## tek0

I found a better solution that made the patch redundant.  I simply added aliases for the missing symbols in /etc/modules.d/nvidia:

 *Quote:*   

> 
> 
> alias pci_find_class pci_get_class
> 
> # and maybe, dunno (I didn't need this one, oddly enough)
> ...

 

----------

## Trejkaz

I just tried the alias trick and it didn't work for me.  I ended up installing the latest unstable drivers.

Funny how the drivers which are masked, work, while the drivers which are unmasked, don't.

I guess this is just one more reason to add to the pile of reasons that NVIDIA should open source their driver. :-/

----------

## tek0

it surely is. And having one of the testing drivers was also neccessary for me - with older ones, I had even more symbols missing.

Did you run depmod and modules-update && friends (whatever)?

----------

## Naib

That "Alias" trick did not work for me either

Kernel: 2.6.16-r9

nvidia-kernel (trying) :  nvidia-kernel-1.0.8762  (same problem with nvidia-kernel-1.0.8756)

Originally I had:

Kernel 2.6.15-r1 + nvidia-kernel-1.0.8756  working fine!

new kernel comes out so I try that out and emerging the nvidia-kernel causes those missing symbols error

I carry on using working combo

New nvidia-kernel comes out (nvidia-kernel-1.0.8762) trying that against kernel-2.6.15-r1 results in the missinh symbols

so I try to go back to nvidia-kernel-1.0.8756 but that produces the same missing symbols 

WTF!!! that was a previously working combination tha tis now broken!!!!

I re-compile my kernel and try to re-emerge nvidia-kernel and it still produces that error!!!

ONLY way I am able to get a working desktop is to issue this

sh /usr/portage/distfiles/NVIDIA-Linux-x86-1.0-8762-pkg1.run

ie run the NVIDIA-script directly! now since portage uses the nvidia-script and using portage does not work, portage MUST be doing something to break the compiling of the nvidia-module

THIS has been like this now for a good couple of months, the alias was the closest thing to a working solution BUT it doesnt work

I have opened a bug

https://bugs.gentoo.org/show_bug.cgi?id=137000

[b]

----------

## tek0

 *Naib wrote:*   

> That "Alias" trick did not work for me either
> 
> Kernel: 2.6.16-r9
> 
> nvidia-kernel (trying) :  nvidia-kernel-1.0.8762  (same problem with nvidia-kernel-1.0.8756)
> ...

 

Yep, something's terribly wrong with the whole thing. I also didn't wanna accept that reverting the changes didn't make things work again. Strange though, that the alias thing did the trick for me, but I could imagine that portage b0rked these aliases *somehow*...what's even more odd is that hell lot of people are having exactly this issue, but they always fixed it by using a ~nvidia-kernel.

 *Naib wrote:*   

> 
> 
> ONLY way I am able to get a working desktop is to issue this
> 
> sh /usr/portage/distfiles/NVIDIA-Linux-x86-1.0-8762-pkg1.run
> ...

 

This is, again, curious, because I also manually installed several versions of the package. I also noticed that the second symbol problem, remap_page_range, appeared only sporadically...even on subsequent merges!

maybe the best thing to do is like `while emerge nvidia-kernel|grep 'unknown symbol'; do true; done;'  :Wink: 

----------

## kiss-o-matic

FYI, the manual script is not working for me.  I get:

/tmp/selfgz12276/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/os-agp.c:48: error: parse error before '*' token

I've got an AGP Nvidia card.  Am I missing something in the kernel?

I'm not really surprised though.  I've not had the nvidia driver work on other machine for months.

----------

## AstroTux

Hi,

I'm another nVidia and 2.6.16-gentoo-r9 kernel user with probs.  :Confused:   I'll let you know if I get it resolved and how. I'm getting the same pci_find_class error with modprobe.  :Sad: 

Best regards,

AstroTux.

----------

## Decibels

Same problem here almost exactly. Same kernels and going back doesn't help.

Haven't had them run the NVIDIA-Linux script instead of using portage, didn't find this

until too late to do that today. Hopefully maybe tomorrow.

I'm using 2.6.15-gentoo-r1 & nvidia-kernel-1.0.8174-r1 right now and after seeing their

problem and you guys, glad I haven't upgraded those two in awhile.

----------

## tek0

It may seem unrelated, but that alias thing worked for me again...When installing the 2.6.17 kernel, I remerged nvidia-kernel and, how could it be different, he complained about that page_range thing. As I didn't have that problem the last time I merged, I added that alias to modules.d/nvidia, and again, the module registered correctly. It may be some sort of placebo, but otherwise that problem would be totally random...

----------

## zxy

for newer kernels you can try the link on this page. (second post)

http://www.nvnews.net/vbulletin/showthread.php?s=bff16370a1c3dad8a2be6f2e4de3fa86&t=72488

----------

## tek0

for those who haven't noticed...In the bug opened by Naib, a solution seems to have been found:

Disable ccache while emerging.

```
FEATURES="-ccache" emerge nvidia-drivers
```

I didn't try, so post some feedback!

----------

## Tilzs

use nvidia-drivers instead of nvidia-kernel & nvidia-glx

----------

## Naib

 *Tilzs wrote:*   

> use nvidia-drivers instead of nvidia-kernel & nvidia-glx

 

That may be teh case now, but the problem still exists whether you use the nvidia-* or nvidia-drivers ebuild

ccache borks it

----------

## tek0

 *Naib wrote:*   

>  *Tilzs wrote:*   use nvidia-drivers instead of nvidia-kernel & nvidia-glx 
> 
> That may be teh case now, but the problem still exists whether you use the nvidia-* or nvidia-drivers ebuild
> 
> ccache borks it

 

true. I'll put that in the original post to avoid confusion.

----------

## rek2

I upgraded to ~x86 nvidia driver and works for me..

I vote for nvidia to free or work behind xorg instaed of xorg behind nvidia, is a pain what propietary software is doing, having all this people always waiting for them... 

and still somepeople belives that propietary is ethical...  :Sad:  they really dont care a crap about FOSS if they did they will had release a fix to the font issue and xorg 7.1 long time a go... rather they have all using xorg 7.1 downgrade to 7.0 sometimes I really think that some people is right that WE SHOULD not 

relay so much on propietary software... we always loose.

 :Sad: 

----------

