LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-05-2017, 11:34 PM   #1
TarFile
Member
 
Registered: Mar 2003
Posts: 371

Rep: Reputation: 37
nvidia won't build kernel 4.4.38 32bit


I tried the latest nvidia deivers 304.134 with 4.4.38 and got an error at the load kernel module part.

Code:
-> Kernel module compilation complete.
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, or nouveau 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: could not insert module ./kernel/nvidia.ko: Invalid module format
-> Kernel messages:
[   10.324299] snd_intel8x0 0000:00:06.0: clocking to 47395
[   11.275182] ppdev: user-space parallel port driver
[   11.447285] i2c /dev entries driver
[   12.716325] hidraw: raw HID events driver (C) Jiri Kosina
[   12.726552] usbcore: registered new interface driver usbhid
[   12.726724] usbhid: USB HID core driver
[   12.736116] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.0/0003:046D:C018.0001/input/input4
[   12.736906] hid-generic 0003:046D:C018.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:02.0-2/input0
[   13.192625] Adding 1048572k swap on /dev/sdb1.  Priority:-1 extents:1 across:1048572k 
[   13.300339] fuse init (API version 7.23)
[   14.419635] EXT4-fs (sdb2): re-mounted. Opts: (null)
[   25.037311] cfg80211: World regulatory domain updated:
[   25.037320] cfg80211:  DFS Master region: unset
[   25.037322] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   25.037326] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   25.037330] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   25.037332] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   25.037335] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   25.037338] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   25.037341] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   25.037343] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   25.037346] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   27.643413] NET: Registered protocol family 10
[  131.517433] [drm] Initialized drm 1.1.0 20060810
[  131.547411] nvidia: version magic '4.4.38-smp SMP mod_unload PENTIUMIII ' should be '4.4.38 mod_unload 586TSC '
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
Any ideas ?

I guess I can try the SMP kernel?
 
Old 01-05-2017, 11:52 PM   #2
TarFile
Member
 
Registered: Mar 2003
Posts: 371

Original Poster
Rep: Reputation: 37
Tried the SMP kernel got a different error

Code:
[   27.476544] NET: Registered protocol family 10
[  122.605550] [drm] Initialized drm 1.1.0 20060810
[  122.636937] nvidia: module license 'NVIDIA' taints kernel.
[  122.636947] Disabling lock debugging due to kernel taint
[  122.667560] nvidia: Unknown symbol mtrr_del (err 0)
[  122.667756] nvidia: Unknown symbol mtrr_add (err 0)
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
 
Old 01-06-2017, 12:55 AM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Quote:
Originally Posted by TarFile View Post
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, or nouveau 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: could not insert module ./kernel/nvidia.ko: Invalid module format
It's just a guess, but as the error message says that the kernel might have been built with a different gcc than the one used to build the nvidia kernel module, I suppose you moved to current (that comes gcc-5.4.0) but you're still using a kernel built on 14.2 (with gcc-5.3.x): in this case you should upgrade your kernel with the one shipped with current and then try again building the nvidia driver.
obviously you might be also installing on stable some kernel packages built on current, and also in this case the same considerations apply (install kernel packages from stable)...
in general, if you want to use a different kernel not available as a package for your version of Slackware you should build it yourself on that version, so you won't have issues building additional third-party kernel modules.

Last edited by ponce; 01-06-2017 at 05:03 AM.
 
1 members found this post helpful.
Old 01-06-2017, 05:32 AM   #4
delson
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Rep: Reputation: Disabled
you need to add

EXPORT_SYMBOL(mtrr_add);
and
EXPORT_SYMBOL(mtrr_del);

to the main.c file
in
source /arch/x86/kernel/cpu/mtrr

the old legacy nvidia driver looks for these symbols. (I put them after the functions)

Dave
 
3 members found this post helpful.
Old 01-06-2017, 05:15 PM   #5
TarFile
Member
 
Registered: Mar 2003
Posts: 371

Original Poster
Rep: Reputation: 37
My Bad

I just assumed they fixed this with the new drivers

Not sure why I thought Nvidia would make their driver work with the current LTS kernel

Works now after the usual fix and recompile of the kernel

Last edited by TarFile; 01-06-2017 at 05:17 PM.
 
Old 01-07-2017, 11:47 AM   #6
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Out of curiosity, were you using the SlackBuild hosted on SlackBuilds.org to build the Nvidia driver?


Quote:
Originally Posted by delson View Post
you need to add

EXPORT_SYMBOL(mtrr_add);
and
EXPORT_SYMBOL(mtrr_del);

to the main.c file
in
source /arch/x86/kernel/cpu/mtrr

the old legacy nvidia driver looks for these symbols. (I put them after the functions)

Dave
I wonder, if its not too much trouble for you, would you expand a bit on what that does?

Last edited by khronosschoty; 01-08-2017 at 09:56 AM.
 
1 members found this post helpful.
Old 01-08-2017, 04:09 AM   #7
delson
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Rep: Reputation: Disabled
The legacy nvidia drivers linked to a number of variables in the kernel symbol tables, including mtrr_del and mtrr_add, later versions of the nvidia driver no longer use these two symbols. Happily these variables are still available in the kernel but now have to be made available for dynamically linking by the user.

We are now in the realms of "kernel support of legacy proprietary drivers". Should the kernel developers leave them leave them in for a limited number of users, cluttering up the kernel symbol table for everyone? Should, the commercial organisation, nvidia re-write their old legacy drivers to remove the dependencies? Or should the user patch the kernel and re-compile? I think we will be patching the kernel until we buy new graphics cards. (Or use the nouveau driver - if it supports our cards).

Hope this expands (or expounds) an explanation.

Dave
 
2 members found this post helpful.
Old 01-08-2017, 10:50 AM   #8
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
If you have a legacy nvidia card, just use the free nouveau drivers. If something goes wrong at least you can get support still... The proprietary drivers are only really needed for modern cards, many of which have stupid things like signed firmware.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] Linux 4.0 is in unstable, warning: nvidia-kernel-dkms won't build properly Daws Debian 2 05-13-2015 07:59 PM
[SOLVED] build 32bit-kernel on 64bit kernel system jimmyting Linux - Software 2 06-04-2012 07:58 AM
New kernel build won't boot. newtovanilla Linux - Newbie 6 04-29-2008 10:37 PM
Unable to build the NVIDIA kernel module. jarred Linux - Newbie 5 03-20-2007 01:15 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM

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

All times are GMT -5. The time now is 07:29 AM.

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