LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-11-2014, 05:31 PM   #1
Suevy Suavae
LQ Newbie
 
Registered: Nov 2013
Distribution: Slackware
Posts: 16

Rep: Reputation: Disabled
Slackware 14.1 latest Nvidia driver not finding kernel.h file


So I've been having some trouble with my current Slackware 14.1 install when trying to install the Nvidia drivers for my GTX 760. The install was initially 14.0, and was upgraded some time ago, mostly flawlessly.

My current steps are blacklisting the nouveau drivers in /etc/modprobe.d, killing X, and running the Nvidia installer (NVIDIA-Linux-x86_64-337.19.run). After agreeing to the terms and telling it to start, I'm presented with this error. The important part part obviously being that "The kernel header file '/lib/modules/3.10.30/source/include/linux/kernel.h' does not exist."

A quick investigation shows the I am definitely running kernel 3.10.30 (or at least according to uname -r), and the folder "/lib/modules/3.10.30/source/" does exist with several sub folders in it. However, none of them are an "include" folder.

A quick search for a nearby include folder found:
Code:
$ find /lib/modules/3.10.30/source -name include
  ./drivers/staging/tidspbridge/include
  ./tools/testing/ktest/examples/include
  ./tools/perf/util/include
  ./tools/perf/arch/x86/include
  ./tools/include
but creating a symlink in "source" to those didn't appear to help any.

I've installed the Nvidia drivers on all of this same hardware back on a Slackware 13.37 install (with an older driver) so I'm pretty sure that stuff should all be working. I imaging something either went wrong during the upgrade, or I'm just an idiot doing something wrong. Either way, hopefully someone else has a suggestion for anything I can do to get this running.
 
Old 05-11-2014, 06:21 PM   #2
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled
in my case
Code:
bash-4.2# file /lib/modules/3.14.0/source
/lib/modules/3.14.0/source: symbolic link to `/usr/src/linux-3.14'
kernel.h is in /usr/src/linux-3.14/include/linux/ that is the kernel source
in other words, install kernel source package
 
Old 05-11-2014, 06:23 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,183

Rep: Reputation: Disabled
You miss the kernel-source package. Always do a full installation if you want to add software to Slackware.

PS gens was faster

Last edited by Didier Spaier; 05-11-2014 at 06:24 PM.
 
Old 05-11-2014, 06:32 PM   #4
Suevy Suavae
LQ Newbie
 
Registered: Nov 2013
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks guys, figured it would be something like that. Any idea where the best place is to get that package, and how I would go about installing it? I was looking here, but the only options are for kernel 3.10.17 for Slackware 14.1, or 3.14.3 for Slackware-current. That is, assuming I'm looking for the "kernel-source-<version>_smp-noarch-1.txz" under slackware<version>/slackware/k/.
 
Old 05-11-2014, 06:44 PM   #5
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled
don't think there is an archive
just upgrade it, and don't forget kernel-modules (you can forget kernel-firmware as it is version independent)

ofc you can cheat and make links but that will confuse you later when you forget about it
 
Old 05-11-2014, 06:49 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,183

Rep: Reputation: Disabled
Use the packages intended for your Slackware version. So you should run a 3.10.17 (not 3.10.30) kernel, then install the corresponding kernel-source.

If you insist on compiling your own kernel, then put yourself the corresponding kernel source (donwloded from kernel.org) in its place, that is to say /usr/src, and make the symlink linux => usr/src/linux-<your version> in that folder.
 
Old 05-11-2014, 07:09 PM   #7
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled
i read 3.10.03
 
Old 05-11-2014, 08:15 PM   #8
Suevy Suavae
LQ Newbie
 
Registered: Nov 2013
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: Disabled
Shoot, so my best bet here is to upgrade or downgrade my kernel? Could be worse I guess...

Any idea why this might have happened in the first place? I upgraded with the instructions here from a fresh 14 install? It doesn't really matter, I'm just hoping to avoid having it happen again in the future.
 
Old 05-11-2014, 08:30 PM   #9
genss
Member
 
Registered: Nov 2013
Posts: 744

Rep: Reputation: Disabled
no idea how you got to 3.10.30 when slackware 14.1 is on 3.10.17 (from current of the past?)
anyway the nvidia installer needs the kernel source of the kernel that will be running the resulting kernel module
(it needs the kernel headers to be precise but the version must be right, even more so since the kernel checks the module version when loading it)

PS there is a work-around that some distros use, but i advise against it
 
Old 05-11-2014, 09:34 PM   #10
Suevy Suavae
LQ Newbie
 
Registered: Nov 2013
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: Disabled
All right, so now I'm just trying to avoid breaking everything, so bare with me here. I tried downloading the source for my 3.10.30 kernel (ftp://ftp.kernel.org/pub/linux/kerne...3.10.30.tar.gz) and extracting it. I then copied the contents of its "include" folder to /lib/modules/3.10.30/source/include/, but now I get this error when running the Nvidia installer. Am I on the right track here, or should I just bite the bullet and install a fresh kernel?
 
Old 05-12-2014, 07:34 AM   #11
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 541

Rep: Reputation: Disabled
Quote:
Suevy Suavae:
So I've been having some trouble with my current Slackware 14.1 install
I'm assuming you mean you're having trouble with Slackware 14.1, (not Slackware-current).

Anyways, my recommendation is you use the official kernel-source and kernel-modules packages for your particular Slackware version:
ftp://ftp.slackware.com/pub/slackwar...nux-3.10.17-2/

No one here has any idea which kernel you're booting (generic or huge) from via lilo. Download the one relevant to your needs along with the kernel-modules and kernel-source package.

Install both (don't upgrade). Make sure lilo and friends are all good with it, and reboot into this kernel before running your nvidia installer again.

Last edited by TommyC7; 05-12-2014 at 07:41 AM.
 
Old 05-12-2014, 11:36 AM   #12
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,928

Rep: Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558
Disclaimer - As some mentioned, it's easier to use Official

That said, I choose to accept the tradeoffs for compiling my own kernels. nVidia drivers state that they require "fully qualified" kernel source which basically means everything matches as if you had run "make modules&&make modules_install" as well as employing the resulting System.map and boot that kernel. So, why not just do that?

There perhaps aren't as many advantages to "rolling your own" as their used to be but there are still some rather powerful advantages like Low Latency and Scheduling that are kept low to match pretty much all hardware. If you have a decently modern (and well-balanced) box why not take advantage of these options as well as end driver compile problems?

Alien Bob's custom kernel page walks you through step-by-step if you're new to that game.
 
Old 05-12-2014, 12:01 PM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,183

Rep: Reputation: Disabled
Quote:
Originally Posted by Suevy Suavae View Post
All right, so now I'm just trying to avoid breaking everything, so bare with me here. I tried downloading the source for my 3.10.30 kernel (ftp://ftp.kernel.org/pub/linux/kerne...3.10.30.tar.gz) and extracting it. I then copied the contents of its "include" folder to /lib/modules/3.10.30/source/include/
That's not what you were told to do.

If you go that way, instead, you should have
  • in /usr/src, a subdirectory linux-3.10.30 containing the whole kernel-source unpacked from the tarball you downloaded from kernel.org, and a symlink linux => linux-3.10.30
  • in /lib/modules/3.10.30, the modules of course, and two symlinks: build => /usr/src/linux-3.10.30 and source => /usr/src/linux-3.10.30
 
Old 05-12-2014, 05:23 PM   #14
Suevy Suavae
LQ Newbie
 
Registered: Nov 2013
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: Disabled
All right, I guess the problem here is solved, though perhaps a little overkill. I went with enorbet's solution of building a new kernel (because if I only made easy decisions I wouldn't be here in the first place) and followed the instructions here and everything went pretty flawlessly (besides some stupid mistakes on my part). The kernel build and moved everything where it needed to be and lsmod shows that the nvidia driver is running and the nouveau driver is nowhere to be seen.

Thanks again to everyone.
 
Old 05-12-2014, 08:38 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,183

Rep: Reputation: Disabled
I'm happy you succeeded.
 
  


Reply

Tags
nvidia, slackware


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
[SOLVED] Slackware kernel-headers, nvidia driver module ADX Slackware 8 08-13-2011 12:11 PM
NVIDIA driver installation needs kernel source file? ksclps Fedora - Installation 3 09-20-2007 12:16 AM
NVIDIA driver problem on slackware 10.1 kernel 2.6.12.5 kuronyu Linux - Hardware 20 10-24-2005 01:12 PM
Finding latest kernel dgermann Ubuntu 5 09-20-2005 09:31 PM
finding the latest kernel 2.6.8.1-10mdk olubone Mandriva 1 09-25-2004 11:13 AM

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

All times are GMT -5. The time now is 07:57 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