LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-05-2003, 04:11 PM   #1
jumpinkiwi
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Rep: Reputation: 0
Need help with Nvidia-kernel


I'm trying to install the tar.gz file for the Nvidia drivers and am getting this error message.

"You appear to be compiling the NVdriver kernel module with
a compiler different from the one that was used to compile
the running kernel. This may be perfectly fine, but there
are cases where this can lead to unexpected behaviour and
system crashes.

If you know what you are doing and want to override this
check, you can do so by setting IGNORE_CC_MISMATCH.

In any other case, set the CC environment variable to the
name of the compiler that was used to compile the kernel."

I'm running Knoppix 3.2 V06/06, Biostar M7NCD Pro With an AMD Athlon 2600 and cant even use my usb mouse or any port on the mobo.
Any ideas would be welcome

AJ
 
Old 07-05-2003, 09:29 PM   #2
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
It would probably be better to compile a new kernel with the nvidia modules. But if the difference in the gcc versions is not in the major version, you'll probably be okay.
 
Old 07-06-2003, 04:55 AM   #3
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
OK. First, you'll want to find out which version of gcc you have. To do this type "cc --version". Then you'll want to find out which compiler was used to compile your kernel. To do this type "cat /proc/version". Note the two numbers. If they are reasonably similar (like 3.2 and 3.3 or something like that) then you set the IGNORE_CC_MISMATCH variable. To do this type "export IGNORE_CC_MISMATCH=1".

However, it is quite likely that the two versions will not be compatible. In that event, you have two options. Recompile your kernel with your version of gcc or try to find an older version of gcc (and set the CC variable).

To recompile your kernel, do the following:

*Make sure there is a symlink to your kernel source in /usr/src called linux. To do this type (whilst root and in /usr/src) "ln -s kernel-source-<version> linux". This will effectively create a directory called /usr/src/linux (where the "linux" part is a symlink).
*Go to /usr/src/linux and type "make oldconfig". This conserves your current kernel settings but lets you recompile the modules and such.
*Type "make dep". This handles dependencies and takes a little while.
*Type "make modules". This recompiles your modules and also takes a while.
*Type "make modules_install". This copies the previously made modules to the appropriate directory (/lib/modules/<kernel version>). I believe this step also generates a modversions.h file which the nvidia installer requires.
*Rerun the nvidia installer and all should be fine.

To get an older version of gcc under debian type "apt-get install gcc-<version>". I'm not sure about other distributions. You may be able to install the rpm (if it's available) and there *shouldn't* be any dependency problems. So, effectively you will have more than one version of gcc installed. Then you type "which gcc-version" to find out where the gcc package you just installed was put (probably /usr/bin) and the shove that information into the CC enviro variable. For example, under debian it would be "export CC=/usr/bin/gcc-<version>".

Oh just to make sure you know, in the above text, anywhere you see something like "<version>" you replace it by the appropriate version number (without the "<" and ">" signs.
 
Old 07-06-2003, 09:21 PM   #4
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Actually, I heard that knoppix could auto-install the nvidia drivers. No idea how, though. I'm just a plain old debian user.
 
Old 07-06-2003, 10:09 PM   #5
ghostwalker
Member
 
Registered: Jun 2003
Posts: 160

Rep: Reputation: 30
Go to NVidia site and download the linux .run file.

chmod +x *.run

./NVIDIA-Linux-x86-1.0-4363.run

Follow the directions and you are of an running....
 
Old 07-06-2003, 11:58 PM   #6
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
I believe he's already gotten that far. Otherwise he wouldn't have received that error.
 
Old 07-07-2003, 07:21 AM   #7
devil_slayer
LQ Newbie
 
Registered: Jul 2003
Location: Warsaw, Poland
Distribution: Debian testing/unstable
Posts: 5

Rep: Reputation: 0
I was also annoyed by installing Nvidia gfx drivers, but then i found this script on the net:
Code:
#!/bin/sh

tixe ()
{
	echo "*************************"
	echo "**ERROR** last step failed, exiting"
	echo "It's probably YOUR fault, but if you think its mine, run this:"
	echo "./$0 2>&1 |mail -s nvidia-install.error justin@bouncybouncy.net"

	exit 1
}

echo INSTALLING NVIDIA-KERNEL

echo apt-get install nvidia-kernel-src -y
apt-get install nvidia-kernel-src -y				||tixe

echo "---------------------------------"
echo ""

echo apt-get install kernel-headers-`uname -r` -y
apt-get install kernel-headers-`uname -r` -y			||tixe


echo "---------------------------------"
echo ""

echo export KSRC=/usr/src/kernel-headers-`uname -r`		||tixe
echo export KVERS=`uname -r`

export KSRC=/usr/src/kernel-headers-`uname -r`
export KVERS=`uname -r`


echo "cd /usr/src && tar xvzf nvidia-kernel-src.tar.gz"
cd /usr/src && tar xvzf nvidia-kernel-src.tar.gz		||tixe

echo "---------------------------------"
echo ""

echo cd /usr/src/modules/nvidia-kernel-*
echo debian/rules binary_modules

cd /usr/src/modules/nvidia-kernel-*				||tixe
debian/rules binary_modules					||tixe

echo "---------------------------------"
echo ""

echo dpkg -i /usr/src/nvidia-kernel-`uname -r`*.deb
dpkg -i /usr/src/nvidia-kernel-`uname -r`*.deb			||tixe


echo "---------------------------------"
echo ""

echo INSTALLING NVIDIA-GLX

echo installing pre-depend xlibmesa3 xlibmesa-dev and nvidia-glx-src
echo apt-get install xlibmesa3 xlibmesa-dev nvidia-glx-src -y
apt-get install xlibmesa3 xlibmesa-dev nvidia-glx-src -y	||tixe

echo "---------------------------------"
echo ""

echo cd /usr/src/nvidia-glx-*/
cd /usr/src/nvidia-glx-*/					||tixe

echo dpkg-buildpackage -us -uc					
dpkg-buildpackage -us -uc					||tixe
echo cd /usr/src
cd /usr/src
echo dpkg -i nvidia-glx*.deb
dpkg -i nvidia-glx*.deb						||tixe

echo "---------------------------------"
echo ""

echo Fixing XF86Config-4
echo This will only work if you already have X4 working with the 'nv' driver
echo This will change 'nv' to 'nvidia' and remove the GLcore and dri modules

echo cd /etc/X11
cd /etc/X11
echo cp XF86Config-4 XF86Config.backup
cp XF86Config-4 XF86Config.backup
echo perl -pi -e 's/(Load.*\"glcore\")/#$1/i;s/(Load.*\"dri\")/#$1/i;s/Driver.*\"nv\"/Driver\t\t\"nvidia\"/i' XF86Config-4
perl -pi -e 's/(Load.*\"glcore\")/#$1/i;s/(Load.*\"dri\")/#$1/i;s/Driver.*\"nv\"/Driver\t\t\"nvidia\"/i' XF86Config-4				||tixe
Worked great for me!

Found it on: http://www.linuks.mine.nu/conf/nvidia/nvidia_install
 
Old 07-07-2003, 01:09 PM   #8
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
I just installed a biostar nforce2 motherboard (although it is the igp version) and with Knoppix everything was working just fine (with the live cd).I can't vouch for the usb since I don't use it.
I slapped gentoo in there now and don't have a problem either.Anything but the LAN should be supported by a regular kernel.If you use a nvidia graphics card you need to get the drivers for it.
 
Old 07-07-2003, 06:14 PM   #9
jumpinkiwi
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Ok....I think I got it..but..

I hate to ask such an easy question, and I've searched around the news groups but how....step by step do I go into xf86config and make sure the nvidia driver is selected and not the nv driver?

AJ

I will not be beaten
 
Old 07-07-2003, 06:53 PM   #10
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
All I did was to write configure with xf86config for vesa and then manually changed the vesa to nvidia in the device section.But you need to have the drivers installed for that plus I just installed a nvidia to dayfor the first time - it's not like I do know a lot about it.
But your USB mouse and nvidia graphics are two completely different things with different drivers.
 
Old 07-08-2003, 01:29 AM   #11
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Jumpinkiwi,

you edit your /etc/X11/XF86Config-4 file (as root) with your favourite editor (emacs, nedit, nano, vi) and go to 'Section "Module"'. Comment out (put a "#" in front of) 'Load "GLcore"' and 'Load "dri"' while making sure that the line 'Load "glx"' is present. Then, go to 'Section "Device"' and change the line 'Driver "nv"' to 'Driver "nvidia"'. Also make sure that the driver nvidia.o is loaded by default on startup (ie make sure there is a line "nvidia" in the /etc/modules file.
 
Old 07-09-2003, 06:41 PM   #12
jumpinkiwi
LQ Newbie
 
Registered: Feb 2003
Posts: 18

Original Poster
Rep: Reputation: 0
No modversions

Adz
I tried your idea but got some errors as usual. It keeps saying "no rule to make oldconfig.
I also ran the installer and it failed because the modversions.h file is missing. So, I guess I need to know how to add that file or recompile my kernel. I followed your instructions to the letter but no go.
I hope you have more ideas.

AJ
 
Old 07-10-2003, 04:48 AM   #13
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
If the directory /usr/src/linux is empty, install either the "kernel-headers-x.x.xx" or the "kernel-source-x.x.xx" package. Replace x.x.xx with your current kernel version (`uname -r`). Then adz's instruction will work great.
 
Old 07-10-2003, 09:01 PM   #14
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
If you get an error like "no rule to make oldconfig" then you probably haven't got the kernel-source installed. Or, you're missing a package used to compile the kernel. The packages you'll need are: make, gcc, bin86, and libc6-dev (I think that's all).

My instructions were given based on the assumption that you had already downloaded the kernel source. If you download the kernel source, you'll need to build it at some stage ("make oldconfig" etc) because you'll be missing a modversions.h file. Otherwise you can download the kernel-headers package specific to your kernel (this will have a modversions.h file). Then you'll quite likely have to set the IGNORE_CC_MISMATCH variable or the CC variable as stated above. I'd probably recommend going the kernel-headers option first as it's probably easier. If you go the headers then you'll probably have to use the --kernel-include-path=<path> option when running the nvidia installer. Try it without first and if that fails try again with. For details on nvidia installer options run the installer with the command "sh *.run -A |more". The "-A" tells it to spit out every option it has and the "|more" tells it to stop and prompt you when you've reached the end of the page.

I take it devil slayer's instructions bombed out also...
 
Old 07-10-2003, 09:05 PM   #15
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Oh, if you ever want to compile a new kernel for whatever reason, the easiest to follow instructions that I've found are at:

http://www.osnews.com/story.php?news_id=2949&page=1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(EE) NVIDIA(0): Failed to initialize the NVIDIA Kernel module latino Linux - Hardware 5 06-03-2008 04:55 AM
(EE) NVIDIA(0): Failed to initialize the nvidia kernel module necbrownie Slackware 18 06-16-2006 03:20 AM
nvidia 6106, kernel 2.6.7, slackware 10, failure to load nvidia.ko Tarball_Phreak Linux - Hardware 3 08-04-2004 04:16 PM
kernel 2.6.3--bk8 and NVIDIA-Linux-x86-1.0-5336 video driver from Nvidia zdenkod Linux - Hardware 2 03-09-2004 06:38 AM
(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module! Stan the caddy Linux - Hardware 8 01-18-2004 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration