LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to load module nvidia.ko after kernel recompile (https://www.linuxquestions.org/questions/linux-software-2/unable-to-load-module-nvidia-ko-after-kernel-recompile-832442/)

croftad1 09-15-2010 10:05 PM

Unable to load module nvidia.ko after kernel recompile
 
I have a fresh install of slackware 12.2 on my laptop using the stock, huge-smp 2.6.27.7 kernel. I have attempted to recompile the kernel to familiarize myself with the process. To start, I have simply changed the local version to "-custom" and made few changes to the current config. I'm following the steps posted here verbatim with the exception of setting up the environment and downloading new sources:

http://alien.slackbook.org/dokuwiki/...kernelbuilding

Booting with the new kernel seems to be ok. I'm even able to recompile the nvidia module using the installer directly from nvidia's web site. However, I would like to be able to boot back to the default kernel and use the nvidia driver. When I reboot using the original kernel and try to rerun the nvidia installer, I run into the following:

"Unable to load module 'nvidia.ko'. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb/nvidiafb is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA device(s)."

So far, I've tried to verify that none of the mentioned modules are conflicting by issuing lsmod. None are loaded. I've also tried to ensure there are no compiler version conflicts:

Code:

root@test1:~# cat /proc/version
Linux version 2.6.27.7-custom (root@test1) (gcc version 4.2.4) #1 SMP
Wed Sep 15 21:51:50 EDT 2010
root@test1:~# gcc -v
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.4/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.2.4/configure --prefix=/usr --enable-shared
--enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose
--with-arch=i486 --target=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 4.2.4

I can get past the error by running the installer with the -k $(uname -r) argument, but the module fails to load on startx saying "invalid module format".

I'm sure something obvious is escaping me, but all the googling I've done so far has not helped me. I'm able to restore my system to a usable state, but am mainly interested in understanding what I'm doing wrong and how to fix it. I'll be happy to post anything else necessary. Just tell me what you want.

Bruce Hill 09-16-2010 12:42 AM

What's the output of "ls -l /usr/src/" ?

croftad1 09-16-2010 04:38 PM

Thanks for replying, Bruce. Here is the output you asked for.

Code:

root@test1:~# ls -l /usr/src
total 8
lrwxrwxrwx  1 root root  14 2010-09-14 15:38 linux -> linux-2.6.27.7/
drwxr-xr-x 23 root root 4096 2010-09-15 22:01 linux-2.6.27.7/
drwxr-xr-x  7 root root 4096 2008-10-22 18:02 rpm/


Bruce Hill 09-16-2010 07:26 PM

Which version of the nVidia driver are you using and which card do you have?

croftad1 09-16-2010 09:21 PM

Vidao card is nVidia Corporation GeForce 8400M GS and the driver is NVIDIA-Linux-x86-256.53.run.

Bruce Hill 09-17-2010 02:51 AM

Honestly I'm grasping at straws. Have you updated your kernel
headers over time? Check "ls /var/log/packages/kernel-headers*"

Might read Common Problems and Known Issues in case
something there sticks out to you.


All times are GMT -5. The time now is 01:20 PM.