Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-22-04, 03:49 AM   #1
Tristania
Registered User
 
Join Date: Aug 2004
Posts: 3
Default nvidia.ko problems in kernel 2.6.7

I compiled Linux 2.6.7 (I'm a kernel n00b, and this was the first one I ever got working), and everything seemed to be working fine, until I tried to install Nvidia. First, it would build, then tell me that the nvidia.ko could not be loaded, possibly because I used the wrong kernel source, which I know I didn't. I used --kernel-source-path="/usr/src/linux-2.6.7"... The exact source for the kernel I built.

After that, I used the --kernel-source-path, along with --kernel-name="linux-2.6.7", in which the Nvidia installer didn't give me the nvidia.ko error. However, when I tried to startx, it would give me an Nvidia error. I tried to locate nvidia.ko, and it couldn't be found. One person I talked to was completely baffled at this, and said it wasn't building right. So I came here for help.

If you've got any suggestions, they would be much appreciated. I am using Slackware 10.0.
Tristania is offline   Reply With Quote
Old 08-22-04, 03:32 PM   #2
Ernest0x
Registered User
 
Join Date: Aug 2004
Posts: 4
Default Re: nvidia.ko problems in kernel 2.6.7

I have exactly the same problem and it seems to have to do with Slackware 10 since it occured after the upgrade from slack 9.1
Ernest0x is offline   Reply With Quote
Old 08-22-04, 03:49 PM   #3
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: nvidia.ko problems in kernel 2.6.7

What error messages do you receive, exactly?
zander is offline   Reply With Quote
Old 08-22-04, 03:56 PM   #4
Ernest0x
Registered User
 
Join Date: Aug 2004
Posts: 4
Default Re: nvidia.ko problems in kernel 2.6.7

I get the following error:

ERROR: Unable to load the kernel module 'nvidia.ko'. This is most likely
because the kernel module was built using the wrong kernel source files.
Please make sure you have installed the kernel source files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
'kernel-source' rpm installed. If you know the correct kernel source
files are installed, you may specify the kernel source path with the
'--kernel-source-path' commandline option.

It seems nonesense since both the running kernel and the kernel sources are the same (2.6.7)
Ernest0x is offline   Reply With Quote
Old 08-22-04, 04:08 PM   #5
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: nvidia.ko problems in kernel 2.6.7

Please check the output of dmesg for error messages after the failed installation attempt (chances are there's a module version magic conflict).
zander is offline   Reply With Quote
Old 08-22-04, 04:20 PM   #6
Ernest0x
Registered User
 
Join Date: Aug 2004
Posts: 4
Default Re: nvidia.ko problems in kernel 2.6.7

You are right. I get the following:
nvidia: version magic '2.6.7 SMP preempt K7 4KSTACKS gcc-3.3' should be '2.6.7 SMP preempt K7 4KSTACKS gcc-3.2'

It looks to me as if the nvidia module is built with gcc-3.3 while the kernel has been built with gcc-3.2 or something like that, but I' m not that sure. Could you please explain me what does it mean and how I can fix it (by recompiling the kernel maybe?)?
Ernest0x is offline   Reply With Quote
Old 08-22-04, 04:32 PM   #7
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: nvidia.ko problems in kernel 2.6.7

The error message (generated by the module loader based on version magic stamped onto the binaries) indicates that the kernel was built with gcc 3.2, whereas the NVIDIA kernel module was built with gcc 3.3; you'll need to rebuild either of the two with the respective other compiler to solve this problem (rebuilding the NVIDIA kernel module is probably less time consuming, provided you can easily (re-)install gcc 3.2).
zander is offline   Reply With Quote
Old 08-22-04, 09:51 PM   #8
Tristania
Registered User
 
Join Date: Aug 2004
Posts: 3
Default Re: nvidia.ko problems in kernel 2.6.7

Those are the error messages I got as well.

Sorry I couldn't provide them, I was on a laptop posting and wasn't on that system at that time. I can be sure that I compiled both the kernel and the nvidia module with the same gcc version, because I compiled the kernel, booted into it, and immediately tried to install the Nvidia driver.

However, someone told me the same thing. He told me how to check which version I compiled them with, to be 100% sure, but I've forgotten.
Tristania is offline   Reply With Quote

Old 08-23-04, 12:00 AM   #9
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: nvidia.ko problems in kernel 2.6.7

One thing worth checking is that gcc -v and cc -v report the same compiler version.
zander is offline   Reply With Quote
Old 08-23-04, 12:57 AM   #10
Tristania
Registered User
 
Join Date: Aug 2004
Posts: 3
Default Re: nvidia.ko problems in kernel 2.6.7

Oy, you're right!

cc -v gives me 3.3.4, while gcc -v gives me 3.4.0!

So either the kernel was compiled with cc and the nvidia used gcc, or vise versa.

Is there a way I can control what nvidia uses to build? Or any other suggestions
Tristania is offline   Reply With Quote
Old 08-23-04, 01:55 AM   #11
agri
Registered User
 
Join Date: Aug 2004
Posts: 6
Default Re: nvidia.ko problems in kernel 2.6.7

Quote:
Originally Posted by Tristania
Oy, you're right!

cc -v gives me 3.3.4, while gcc -v gives me 3.4.0!

So either the kernel was compiled with cc and the nvidia used gcc, or vise versa.

Is there a way I can control what nvidia uses to build? Or any other suggestions
kernel build with gcc... and nvidia with cc.

hmmm... i dont know how nvidia make files works...
u may try set CC environment.... e.g. bash> CC=gcc ./command-to-fight args...

make either understand
make CC=gcc fight-target

i tryied do smth like that .... it doesn't help for me...

u may try another way
find your cc and gcc
bash> whereis gcc
bash> whereis cc
this shows u all files of that name... commands.. manfiles.. info... and otheres
i suppose that cc it just a symbolic link... u can change it to point to where your gcc is i.e. set into cc symlink to full gcc path of rite version.
if u get few gcc installs... u can check version providing full execfile path...
bash> /path/to/my/gcc --version
of smth like that...
after all... u will build your nvidia with the same compiler.

p.s. same compiler... seems like kernel paranoya...
agri is offline   Reply With Quote
Old 08-23-04, 02:49 AM   #12
Ernest0x
Registered User
 
Join Date: Aug 2004
Posts: 4
Default Re: nvidia.ko problems in kernel 2.6.7

My problem (which is the same problem described by others in this thread) was solved by just recompiling my kernel with gcc 3.3 and then building the nvidia kernel module (with the same gcc 3.3 compiler). It could be fixed also in the opposite way as zander said before, by re-installing the old gcc 3.2 compiler and building the nvidia kernel with it. I prefered to rebuild the kernel though since I want to use gcc 3.3 from now on.
The lesson here is (correct me if I'm wrong) that in order to build succesfully the nvidia kernel module you not only need to have installed the sources of the running kernel, but you also need to build the module with the same compiler, of the same version that the running kernel is built with.
I think it would be helpful if this extra tip (about compiler versions) is added to the error message of the nvidia installer.
Ernest0x is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random crashes, NVRM Xid messages Iesos NVIDIA Linux 90 10-04-12 03:27 AM
Corrupted display - 302.17 - Dell Precision T3500 (G98 [Quadro NVS 295]) gbailey NVIDIA Linux 1 06-27-12 10:24 AM
UEFI+Nvidia - NVRM: Your system is not currently configured to drive a VGA console... interzoneuk NVIDIA Linux 0 06-26-12 04:51 AM
xorg locks-up with newest nvidia drivers w/ vdpau. theroot NVIDIA Linux 1 06-24-12 11:04 AM
Crash when logout from X TGL NVIDIA Linux 10 09-13-02 08:22 PM

All times are GMT -5. The time now is 09:15 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.