LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-22-2011, 12:28 AM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
How does nvidia module get loaded...


After installing slackware64 13.37 and going into runlevel 3, I downloaded the NVIDIA-Linux-x86_64-285.05.09.run file from the nvidia website. I ran it with
Code:
sh NVIDIA-Linux-x86_64-285.05.09.run
as root. Seems that slackware64 13.37 comes with the kernel headers already installed because the nvidia install had no problems. I see that it built the nvidia module as well as compatible 32 bit opengl libs. I do see also that the nvidia script added
Code:
blacklist noveau
to a file in /etc/modprobe.d

Now for my question. How and where exactly does this module get loaded at boot? I do see it's located at
Code:
/lib/modules/2.6.37.6/kernel/drivers/video/nvidia.ko
yet there's no mention of it in /etc/modprobe.conf(seems like this file is not even used anymore in slackware64 13.37). The module does not load in /etc/rc.d/rc.modules-2.6.37.6 either. Is it just because the module is behind rc.modules-2.6.37.6, then it automatically gets loaded at boot?

If that were true, then all the other modules in
Code:
/lib/modules/2.6.37.6/kernel/drivers/video/
would get loaded as well. What makes nvidia.ko special? Which file actually modprobes the module?

Trying to understand exactly how it works.
In dmesg I see this pertinent output.
Code:
 NVRM: loading NVIDIA UNIX x86_64 Kernel Module  285.05.09  Fri Sep 23 17:31:57 PDT 2011
Which script exactly loads the nvidia.ko module?

Last edited by trist007; 10-22-2011 at 12:32 AM.
 
Old 10-22-2011, 01:17 AM   #2
smoooth103
Member
 
Registered: Aug 2009
Location: NC, USA
Distribution: Slackware (64 bit)
Posts: 242

Rep: Reputation: 62
My GUESS is this:

All the available .ko modules are not linked at boot unless hardware is found that matches them. Even though the module is linked it's still not loaded until X or some other application is called. X binary claims the "available" nvidia driver on execution as identified in the /etc/xorg.conf config file.

There maybe a script that modprobes it, but I couldn't find it either.

Good question, I'd love to hear someone elses take.

Last edited by smoooth103; 10-22-2011 at 01:27 AM.
 
Old 10-22-2011, 07:42 AM   #3
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
smoooth103 is essentially correct, Xorg can load the kernel module if it's not already loaded when X starts. This is also how the open source DRM drivers would often get loaded before they implemented KMS. Now they are usually either loaded into the initrd or loaded by udev. I would guess that udev could also be configured to load the nvidia kernel module, but I don't know how common that is.

Adam
 
Old 10-22-2011, 10:00 AM   #4
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Have a look in /usr/share/X11/xorg.conf.d/
 
Old 10-22-2011, 10:54 AM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
I have rc.hald and rc.udev set to run. My default runlevel is 3. When I boot and login to console, lsmod shows nvidia as being loaded. So it should be safe to assume that Xorg did not load it. Now I do see udevd --daemon running, which is listening for kernel uevents. Where else should I check.
 
Old 10-22-2011, 12:00 PM   #6
hen770
Member
 
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
Essentialy what you are asking is why the system is decide to load a spcific module and not the other (all of the in the /lib/module dir).
And is true in all of the hardware you have.
I assume that there is just one module (plus a generic one) that is good for your hardware and it is load based on the kernel probe, hence you see the other module in a blacklist, in order for it not to be loaded before the nvidia one, i assume that all the other modules that are in your video/ dir aren't accepted by you system (not include the generic one usually vesa).
 
Old 10-22-2011, 12:21 PM   #7
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
Yea that makes sense. I see all those video modules under /etc/modprobe.d/blacklist.conf. Ok great thanks.
 
Old 10-22-2011, 12:55 PM   #8
smoooth103
Member
 
Registered: Aug 2009
Location: NC, USA
Distribution: Slackware (64 bit)
Posts: 242

Rep: Reputation: 62
It might be the kernel hotplug scripts are loading matching available driver/hardware configs in the /lib/modules/ dir, like hen770 is suggesting. I think the answer to your question though is: it's mostly in the kernel.
 
  


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
how i would know that new module has loaded Misbah Naveed Linux - Newbie 4 01-07-2008 12:52 AM
NVIDIA module not loaded Zolex Debian 10 08-01-2007 01:18 PM
why my module can not be loaded by Apache? iclinux Linux - Newbie 1 06-10-2005 05:35 PM
Cannot reinstall NVIDIA Driver ... module being loaded ? wtf? sys7em Slackware 2 03-02-2005 06:58 PM
paraport_pc module loaded with wrong options, st not loaded adrianmariano Debian 2 12-18-2004 09:37 PM

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

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