Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 112356

Summary: Nvidia module won't load.
Product: Gentoo Linux Reporter: Daniel <dude_gottap>
Component: [OLD] UnspecifiedAssignee: X11 External Driver Maintainers <x11-drivers>
Status: RESOLVED WORKSFORME    
Severity: major CC: gb_about_gnu, jon.roadleybattin, krallkrall, sharpshopter
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Daniel 2005-11-12 18:07:02 UTC
I'm using gentoo-sources 2.6.13-r5, i emerge'd nvidia-glx and nvidia-kernel as
per the tutorial. When i try to modprobe nvidia i get the following message: 

FATAL: Error inserting nvidia (/lib/modules/2.6.13-gentoo-r5/video/nvidia.ko):
Cannot allocate memory

I've followed the nvidia tutorial exactly (enabled the right things in the
kernel) and have updated my entire system, including gcc and portage re-emerged,
tried everything and still get this error.

Reproducible: Always
Steps to Reproduce:
1.emerge nvidia-glx
2.modprobe nvidia
3.

Actual Results:  
FATAL: Error inserting nvidia (/lib/modules/2.6.13-gentoo-r5/video/nvidia.ko):
Cannot allocate memory

Expected Results:  
successful loding of nvidia module

Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2,
2.6.13-gentoo-r5 i686)
=================================================================
System uname: 2.6.13-gentoo-r5 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo
http://mirror.isp.net.au/pub/gentoo/ ftp://ftp.swin.edu.au/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="x86 X alsa apm audiofile avi berkdb bitmap-fonts bzip2 cdr crypt cups dvd
eds emboss encode exif expat fam ffmpeg foomaticdb fortran gif glut gpm
gstreamer gtk2 hal idn imlib ipv6 jpeg kde lcms libg++ libwww mad mikmod mng
motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pcre pdflib perl png
python qt quicktime readline samba sdl spell ssl tcpd tiff truetype
truetype-fonts type1-fonts udev vorbis xml2 xmms xv xvid zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Kris Kersey (RETIRED) gentoo-dev 2006-01-11 13:49:39 UTC
Try emerging the latest version of nvidia-glx/nvidia-kernel.  Please tell me which version kernel you are using now and the version of the nvidia ebuilds get emerged.
Comment 2 Guenther Brunthaler 2006-04-25 16:27:59 UTC
The problem is even worse!

I re-emerged the closed-source nvidia-kernel, and it compiled OK (GCC 3.4.5).

But when I ran

$ modprobe nvidia

the following message appears:

FATAL: Error inserting nvidia (/lib/modules/2.6.16-gentoo-r3/video/nvidia.ko): Unknown symbol in module, or unknown parameter (see dmesg)

And the kernel log says:
2006-04-26 01:20:14 kern-warning kernel: nvidia: Unknown symbol remap_page_range
2006-04-26 01:20:14 kern-warning kernel: nvidia: Unknown symbol pci_find_class

It seems the new 2.6.16-gentoo-r3 does not export those symbols.

At least I could not find the symbola in "System.map".

However, there is a symbol "ioremap_page_range" there. Maybe it was just renamed?

Hoewever, I was not able to find any symbol name similar to "pci_find_class".
Comment 3 Kris Kersey (RETIRED) gentoo-dev 2006-04-26 06:51:01 UTC
Are you running 2.6.13 or 2.6.16?  You have conflicting reports.
Comment 4 Guenther Brunthaler 2006-04-26 08:04:43 UTC
I (G
Comment 5 Guenther Brunthaler 2006-04-26 08:04:43 UTC
I (Günther Brunthaler) am running 2.6.16-gentoo-r3; the original poster used a different kernel.

(I wanted to open a new bug first, but then found this open bug whose title perfectly matched the problem an chose to also use it.)

That said, the issue is definitivele a 2.6.15 problem, because the last official Gentoo kernel (2.6.15-r1) had no such problems.

Also, this is a runtime-only problem: Building the NVIDIA kernel module works like a charm. But then a "modprobe nvida" fails with the "symbol not found" error messages.
Comment 6 Guenther Brunthaler 2006-04-26 08:08:07 UTC
Sorry for the spelling errors in my last post!

Of course I meant "the issue is definitivele a 2.6.16 problem..."

If Bugzilla only allowed re-editing of posted comments... ;-)
Comment 7 jon R-B 2006-05-06 08:30:08 UTC
I have the same problem

Kernel: Gentoo 2.6.16-r6 latest (~86) nvidia-kernel
It will compile but once new kernel boots the nvidia module cannot be modprobed get an error: 

May  6 17:00:44 [kernel] nvidia: Unknown symbol pci_find_class

My 2nd kernel (2.6.15-r1) boots fine
Comment 8 J Schlotterer 2006-05-09 22:19:11 UTC
Well, I'm having problems with the nVidia module also.  I just did my first install of Gentoo 2006.0, and have been following the handbook.  I edited my kernel options according to the nVidia specific comments, using kernel 2.6.15-r7.  I emerge'd nvidia-glx, which went fine.  I then attempted to modprobe nvidia, to which I got "Invalid module format".  I checked all of my modules, the nvidia naming convention seems to be normal.  I will do some double-checking via Google, but I still can't get the module to load.
Comment 9 jon R-B 2006-05-27 13:52:11 UTC
Ok just thought I would add to this. 
I to am getting:

WARNING: //lib/modules/2.6.15-gentoo-r1/video/nvidia.ko needs unknown symbol remap_page_range
WARNING: //lib/modules/2.6.15-gentoo-r1/video/nvidia.ko needs unknown symbol pci_find_class 

When compiling nvidia-kernel (but it does compile) and it will not modprobe (with FATAL log in /var/log/messages).


However, this seems more a Gentoo::Portage problem rather then kernel and/or nvidia problem. Why? I will try to draw a timeline


kernel-2.6.15-r1 with nvidia-kernel-8756 [fine]
...
Kernel-2.6.16 (well 2.6.16-r6) is out so I try compiling that with  nvidia-kernel-8756 [produces those errors]
...
...
New nvidia kernel comes out (nvidia-kernel-8762)
so I try updating kernel-2.6.15-r1 first [produces errors]
I try it with kernel 2.6.16-r7 [produces errors]

I decide to downgrade back to the "working" nvidia-kernel-8756 and also stick with kernel-2.6.15-r1 produces those errors !!!!

THIS was a previously working combination bit it now does not work!!!
Using the source tree for 2.6.15-r1 and no configuration/re-compiling changes (only possible changes are portage,toolchain over the months).

Anyway as you can see using the latest nvidia drivers and there is a situation now where an emerge that use to work no longer works


HOWEVER, by using the Nvidia script NVIDIA-Linux-x86-1.0-8762-pkg1.run from my /usr/portage/distfiles I can compile a kernel module against both kernels and get a fully functional desktop

So as you can see two kernels, two nvidia-drivers and a situation where one day the driver would compile fully and another it wont with the only difference in the couple of months being some new portage and some new toolchain components.


On the topic of the toolchain I did concider this (the kernel-2.6.15-r1 was comiled a while ago and now trying to compile a nvidia-module with a new GCC/GLIBC) so I re-compiled my toolchain & recompiled the kernels & tried emerging nvidia-kernel - same problem
I even did a "emerge -e system && emerge -e system)and recompile the kernels and then tired emerging the nvidia-kernel (changing the /usr/src/linux link each time) and still not working.


As I said  running the NVIDIA script directly works

here is my emerge --info 
Fluid jrb # emerge --info
Portage 2.1_rc2-r3 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.0
ccache version 2.3 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fforce-addr -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fforce-addr -pipe -fomit-frame-pointer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirrors.blueyonder.co.uk/sites/gentoo  ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo  ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirror.switch.ch/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo http://www.mirror.ac.uk/mirror/www.ibiblio.org/"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentopia /usr/local/xgl-coffee"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi aim alsa avi berkdb bitmap-fonts bluetooth bonobo browserplugin bzip2 cairo canvas cdr cli crypt cups directfb dri dvd dvdread eds emboss encode esd extensions fbcon firefox flac foomaticdb fortran gdbm geoip gif gimpprint glitz gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal imlib inkjar insecure-savers ipv6 isdnlog java joystick jpeg jpg kqemu ldap libg++ libwww mad mikmod mme mme2 mmx mmx2 mono motif mozsvg mp3 mpeg mplayer msn nautilus ncurses nls nntp nomotif nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre pdf pdflib perl pic plotutils plugin png ppds pppd python quicktime readline real reflection samba sdl session softmmu spell spl sse sse2 ssl svg swat tcpd truetype truetype-fonts type1-fonts udev unicode usb vim-with-x vorbis win32codecs xinerama xml xml2 xorg xprint xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB userland_GNU video_cards_nv video_cards_nvidia video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS 
Comment 10 Amit Kotlovski 2006-12-24 17:07:16 UTC
I had the same situation, but solved it according to http://gentoo-wiki.com/HOWTO_nVidia_Drivers#dmesg_returns_unknown_symbol_errors
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-09-04 01:02:14 UTC
If you have issues w/ uptodate drivers, file a new bug. Thanks, closing.