LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   kernel 2.6.27.7 + nvidia driver = trouble (https://www.linuxquestions.org/questions/slackware-14/kernel-2-6-27-7-nvidia-driver-%3D-trouble-697138/)

Lord Zoltar 01-13-2009 09:34 PM

kernel 2.6.27.7 + nvidia driver = trouble
 
I've upgraded the kernel to 2.6.27.7 and tried installing the latest nVidia driver. The installation fails right at the end, on a kernel error:
Code:


ERROR: Unable to load the kernel 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 graphics device(s), or NVIDIA GPU
      installed in this system is not supported by this NVIDIA Linux graphics
      driver release.
     
      Please see the log entries 'Kernel module load error' and 'Kernel
      messages' at the end of the file '/var/log/nvidia-installer.log' for
      more information.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
  -1 Invalid module format
-> Kernel messages:
  usb 1-1.3: New USB device found, idVendor=05e3, idProduct=0608
  usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
  usb 1-1.3: Product: USB2.0 Hub
  Adding 2096440k swap on /dev/hda6.  Priority:-1 extents:1 across:2096440k
  fuse init (API version 7.9)
  EXT3 FS on hda2, internal journal
  lp0: using parport0 (interrupt-driven).
  lp0: console ready
  kjournald starting.  Commit interval 5 seconds
  EXT3 FS on hda5, internal journal
  EXT3-fs: mounted filesystem with ordered data mode.
  Intel ISA PCIC probe: not found.
  Databook TCIC-2 PCMCIA probe: not found.
  eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
  eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
  NET: Registered protocol family 10
  lo: Disabled Privacy Extensions
  eth0: no IPv6 routers present
  atkbd.c: Unknown key pressed (translated set 2, code 0x88 on
  isa0060/serio0).
  atkbd.c: Use 'setkeycodes e008 <keycode>' to make it known.
  atkbd.c: Unknown key released (translated set 2, code 0x88 on
  isa0060/serio0).
  atkbd.c: Use 'setkeycodes e008 <keycode>' to make it known.
  input: ImPS/2 Generic Wheel Mouse as
  /devices/platform/i8042/serio1/input/input5
  psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization,
  throwing 2 bytes away.
  nvidia: version magic '2.6.27.7-smp SMP mod_unload 686 ' should be '2.6.27.7
  mod_unload 486 '

That last line about the "version magic" is what worries me. WTF is version magic, how do I fix it?
(the version magic error is also in dmesg output)

It looks to me like the nvidia installer thinks I am running the SMP kernel, which I'm not. Any ideas on how get the installer to look at the correct kernel?

Lord Zoltar 01-13-2009 10:40 PM

Problem solved: switched to the SMP kernel in the distro. I guess there's no harm in running it even if my hardware is not multicore/processor.

astrogeek 01-13-2009 11:01 PM

Glad it is working.

Not only is there no harm in running the SMP kernel, I believe it is recommended unless you have specific hardware issues with very old system.

davidehm 02-27-2009 05:02 PM

Hello:

I have exactly the same problem.

My PC is a AMD Athlon XP 2600+ and my graphic card is a Nvidia GeForce 5200.

I can't use the hugesmp.s because it doesn't boot.

I have posted my problem here: nvnews.net/vbulletin/showthread.php?t=128908

If I try to compile the module "by hand" I get this error:

FATAL: Error inserting nvidia (/lib/modules/2.6.27.7/kernel/drivers/video/nvidia/nvidia.ko): Invalid module format

The final line of my dmesg:

nvidia: version magic '2.6.27.7-smp SMP mod_unload 686 ' should be '2.6.27.7 mod_unload 486 '

I don't paste the log of the Nvidia's installer because is the same that Lord Zoltar put it on

Finally, my gcc-v:

my 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


Unfortunately it seems that I can't to change to 2.6.27.7-smp

¿Any idea? ¿Maybe must I configure the gcc for my kernel?

Sorry if I say anything with nonsense

And sorry for my bad english

Thank you
David

allend 02-27-2009 07:04 PM

From CHANGES_AND_HINTS.TXT
Quote:

If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux-2.6.27.7-nosmp-sdk/README.TXT to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.
And from /extra/linux-2.6.27.7-nosmp-sdk/README.TXT
Quote:

By default, the kernel in Slackware supports SMP. With as common as
multicore CPUs and SMP boards have become, this seems like the
obvious choice. The kernels are probably better for single CPU
machines, too, if they will run them.

If you have to use one of the non SMP kernels (huge.s or generic.s),
then you will need to reconfigure your kernel sources to build any
additional kernel modules. In order to compile outside kernel
modules and such, you *may* need to install non-SMP kernel-headers
(we're not entirely sure about this), and either build the kernel once
without SMP (which might take a while), or apply a patch to freshly
installed kernel sources to convert them from smp to non-SMP
(this is fast).

To switch your unmodified Slackware kernel sources from SMP to non-SMP,
run the following script in this directory:

./patch-to-non-smp.sh

If you'd rather apply these patches by hand, feel free.

At this point if you are running huge.s or generic.s, you should have
no problems building kernel modules. This has been tested here with the
latest nVidia X.Org drivers.

Have fun! :-)

Pat

davidehm 02-28-2009 01:44 AM

It's works!!!!!!!
 
Thank you allend. Thank you very much.
I downloaded the kernel-headers, executed the script, installed the kernel-headers and I compiled again the driver...but succesfully now!!

Because I live in Spain. If not, you would be invited to a tons of beers! :-)

I was more than a month trying it :-|

Thank you!
David

allend 02-28-2009 05:29 AM

@davidehm
I appreciate your thanks, but feel that it would be much better directed to Pat V. and to ppr:kut who maintains the nVidia Slackbuild scripts.
Also, welcome to LQ. Now that you know how to ask a question, hopefully other problems may take less than a month to resolve.
PS- Please do not apologise for your English. It is very much better than my Spanish!

davidehm 03-01-2009 05:53 AM

Quote:

Originally Posted by allend (Post 3460276)
@davidehm
Also, welcome to LQ. Now that you know how to ask a question, hopefully other problems may take less than a month to resolve.

Thank you, I have found my second /home in Slackware questions here. :)

I'll crying for help soon, I'm afraid :)

David

mbuechle 03-03-2009 10:13 PM

I'm having a similar problem building an NVidia driver for my 2.6.27.7 non-smp kernel in slack 12.2. I have run the linux-2.6.27.7-nosmp-sdk patch to no avail. I just upgraded this machine to Slack 12.2 and it will not boot the smp kernel, failing to mount hda2. In Slack 12.1 I ran the smp generic kernel without problem and built the NVidia driver without problem. My hardware is old, Athlon 1800+, MSI MB, PATA disc. Here is an excript from the nvidialog file in /var/log:

........................................................................................
make -C /lib/modules/2.6.27.7/build \
KBUILD_SRC=/usr/src/linux-2.6.27.7 \
KBUILD_EXTMOD="/tmp/selfgz4316/NVIDIA-Linux-x86-173.14.12-pkg1/usr/src/nv"
-f /usr/src/linux-2.6.27.7/Makefile \
modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are mis
sing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it
."; \
echo; \
/bin/false)
mkdir -p
.............................................................................................

I tried running "make oldconfig && make prepare" on my source tree but it had no effect on driver compilation, producing identical error log message. I have not yet built a custom kernel. Any ideas?

Mark

davidehm 03-10-2009 03:29 PM

Hi mbuechle, why are you using the non-smp kernel?

Anyway, I think that if you must to use the nosmp-sdk patch, you must have installed the huge.s kernel.

Sorry if I say something obviously that you know, but I´m noob :-)

mbuechle 03-12-2009 08:14 PM

Davidehm, I'm using the non-SMP kernel because my desktop will not boot the SMP one. It did in 12.1 but not 12.2, The boot sequence stops when the boot partition mount is first attempted complaining that the /dev/hda2 does not exist. This happens with either the huge or the generic SMP kernels. Both the huge and the generic non-SMP kernel will boot, the latter with an initrd for reiserfs support. I ran the nosmp-sdk patch but the NVidia driver will not build. I was able to compile a kernel module for my Wacom Graphire tablet without issue so I think the kernel source is OK. I'm not a programmer, so I don't really know how to go about troubleshooting this further except maybe to get a new motherboard,Proc, etc.

Cheesesteak 03-14-2009 01:47 AM

For GeForce 5 GPU's, I believe it was driver release 173.14.15 that provided support for the 2.6.27 kernel. The latest, as of this post, is 173.14.18.

You may want to check this link periodically. It seems as if you folks need to use a slightly updated driver.


-Andy

davidehm 03-16-2009 02:11 PM

Hello:

If it can be useful for you, I downloaded the x86-173.14.16

(BTW, I didn't know that they got out the drivers so oftenly) :)


All times are GMT -5. The time now is 05:22 PM.