LinuxQuestions.org
Review your favorite Linux distribution.
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 06-16-2004, 11:29 AM   #1
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Rep: Reputation: 15
Problems with automatic modules loading in kernels 2.6.X


Hi,


I have some problems with modules loading in kernels 2.6.X
Only some of them are loaded automatically:
root@~\254#lsmod
Module Size Used by
snd 40996 0
nvidia 2074664 8
uhci_hcd 28488 0
ehci_hcd 24576 0
usbcore 94548 4 uhci_hcd,ehci_hcd
vfat 11520 2
fat 40544 1 vfat
ntfs 86804 1


and the rest I have to load manually with modprobe or by putting them in modules.rc.

modprobe via-rhine
modprobe 8139too
modprobe snd-via82xx

But when I put or uncomment lines for my network interfaces in modules.rc, these interfaces do not work and I have to reload modules and raise interfaces manually.



With the original kernel form Slackware 9.1 I don’t have to do anything with modules.rc . All necessary modules are loaded:

root@~\82#lsmod
Module Size Used by Not tainted
snd-pcm-oss 37252 0 (unused)
snd-mixer-oss 11992 0 [snd-pcm-oss]
8139too 15240 1
uhci 24496 0 (unused)
ehci-hcd 16872 0 (unused)
usbcore 58400 1 [uhci ehci-hcd]
snd-via82xx 11712 0
snd-pcm 55904 0 [snd-pcm-oss snd-via82xx]
snd-timer 13252 0 [snd-pcm]
snd-ac97-codec 37240 0 [snd-via82xx]
snd-page-alloc 6004 0 [snd-via82xx snd-pcm]
snd-mpu401-uart 3136 0 [snd-via82xx]
snd-rawmidi 12512 0 [snd-mpu401-uart]
snd-seq-device 3920 0 [snd-rawmidi]
snd 27460 0 [snd-pcm-oss snd-mixer-oss snd-via82xx snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore 3332 4 [snd]
via-rhine 13552 1
mii 2304 0 [8139too via-rhine]
crc32 2880 0 [8139too via-rhine]
ide-scsi 9424 0


this has to do something with hotplug, because when I turn off the hotplug only these modules are loaded:


root@~\85#lsmod
Module Size Used by Not tainted
snd-pcm-oss 37252 0 (unused)
snd-mixer-oss 11992 0 [snd-pcm-oss]
snd-via82xx 11712 0
snd-pcm 55904 0 [snd-pcm-oss snd-via82xx]
snd-timer 13252 0 [snd-pcm]
snd-ac97-codec 37240 0 [snd-via82xx]
snd-page-alloc 6004 0 [snd-via82xx snd-pcm]
snd-mpu401-uart 3136 0 [snd-via82xx]
snd-rawmidi 12512 0 [snd-mpu401-uart]
snd-seq-device 3920 0 [snd-rawmidi]
snd 27460 0 [snd-pcm-oss snd-mixer-oss snd-via82xx snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore 3332 4 [snd]
ide-scsi 9424 0


the difference is:
8139too 15240 1
uhci 24496 0 (unused)
ehci-hcd 16872 0 (unused)
usbcore 58400 1 [uhci ehci-hcd]

via-rhine 13552 1
mii 2304 0 [8139too via-rhine]
crc32 2880 0 [8139too via-rhine]


which are modules of my network interfaces and USB.

Does anybody knows why hotplug do not work with 2.6.X?? And how to automatically load modules for my sound card under 2.6.X
(I have module-init-tools-3.0-i486-1 from Slackware current installed)


regards

Andrzej
 
Old 06-16-2004, 12:20 PM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
Hello,

I compiled 2.6.5 okay. Hotplugging wasn't loaded after the kernel compiled tho.

I'm not sure. Are you saying that after you use 'insmod' they are gone next time you reboot?

You should note that the default slack kernel puts a lot of stuff in that you don't need. E.g. snd-pcm-oss (open source sound or whatever it's called).
 
Old 06-16-2004, 12:30 PM   #3
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
If i'm not wrong (i installed 2.6.6 a few hours ago but i haven't sleeped in two days so i'm not in a good state) some usb drivers and network cards weren't selected to compile in the kernel (i use same modules as you). Just do a "make menuconfig" or "make xconfig" and check them under Device Drivers.

<EDIT> By "compile in the kernel" i mean either as module or built-in. </EDIT>

Last edited by gbonvehi; 06-16-2004 at 12:32 PM.
 
Old 06-16-2004, 05:05 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
What is the output of : /etc/rc.d/rc.hotplug restart
?
 
Old 06-17-2004, 04:39 AM   #5
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Original Poster
Rep: Reputation: 15
satinet,

> I'm not sure. Are you saying that after you use 'insmod' they are gone next time you reboot?

In fact I use 'modprobe' to load modules and not "insmod". Is there any difference??
And yes after rebooting I have to reload modules.

gbonvehi

>If i'm not wrong some usb drivers and network cards weren't selected to compile in the kernel
> <EDIT> By "compile in the kernel" i mean either as module or built-in. </EDIT>

I do have all the necessary modules compiled, but the problem is that I have to load them manually. when I compile them as built-in, they work just fine, but then each time I want to add new hardware I have to recompile the whole kernel and not just module. that is why I don't like to have everythink compiled builed-in


keefaz

> What is the output of : /etc/rc.d/rc.hotplug restart ?

I'll check it because I'm using different PC right now.
 
Old 06-17-2004, 06:46 AM   #6
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
Hello again,

Well, my understanding is that 'modprobe' gives you information about modules, whereas 'insmod' actually loads them. Anyone can correct me if I am wrong, but that's how I remember it. I'm at work now, so can't veryfiy this.

Try typing 'man modprobe' and 'man insmod'

I think once, the modules are loaded, they stay loaded. When I compiled to 2.6.5 not all the modules I specified acutally loaded, but i think i got them working by this method.

'lsmod' will tell you what modules you have loaded. Try 'lspci' to list your pci cards/devices. Also 'dmesg | grep -i cd' (or similar) will give you some info about your system.

Can anyone tell me where the modules are actually are in the system. I can't remember! doh

How do u recompile and individual module anyway?
 
Old 06-17-2004, 07:47 AM   #7
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
insmod loads the module with the full path to module as argument, it does not take care about modules dependency, it is usefull for testing when you make your own module or debug module installation.

modprobe loads the module with the module name as argument and will load any module needed.
But it need kernel configuration so it can't be used when testing a custom module without deal with kernel configuration.
 
Old 06-17-2004, 04:48 PM   #8
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Original Poster
Rep: Reputation: 15
satinet,

>I think once, the modules are loaded, they stay loaded. When I compiled to 2.6.5 not all the
> modules I specified actually loaded, but i think i got them working by this method.
unfortunately it doesn't work like this.

> 'lsmod' will tell you what modules you have loaded.
As you can see in my first post I do use lsmod for modules listing.


> Try 'lspci' to list your pci cards/devices.
OK here is the output. All my network interfaces are detected as well as my sound card.

00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400 AGP] Host Bridge (rev 80)
00:01.0 PCI bridge: VIA Technologies, Inc.: Unknown device b198
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
00:0f.0 RAID bus controller: VIA Technologies, Inc.: Unknown device 3149 (rev 80)
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B PIPC Bus Master IDE (rev 06)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. USB (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc.: Unknown device 3227
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233 AC97 Audio Controller (rev 60)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] (rev a2)


> Can anyone tell me where the modules are actually are in the system. I can't remember! doh
/lib/modules/2.6.X

>How do u recompile and individual module anyway?
I do
make xconfig
mark the module I need then I do:

make modules
make modules_install

keefaz,
>What is the output of : /etc/rc.d/rc.hotplug restart?
nothing at all
 
Old 06-17-2004, 05:07 PM   #9
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
So if I understand well your problem is in that hotplug does not load all the modules automatically ?

Is your sysfs enabled ? (have you something in /sys directory) if not try add :
none /sys sysfs defaults 0 0
to your /etc/fstab (mkdir /sys if it does not exist)
 
Old 06-19-2004, 02:13 AM   #10
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Original Poster
Rep: Reputation: 15
keefaz

>So if I understand well your problem is in that hotplug does not load all the modules automatically ?

exactly

> Is your sysfs enabled ?
No i was not. I enabled it accordingly to your suggestion.

After changing fstab, creating /sys and rebooting I have the following content of /sys
root@/sys\289#ls -l
razem 0
drwxr-xr-x 5 root root 0 2004-06-19 09:54 block/
drwxr-xr-x 7 root root 0 2004-06-19 07:58 bus/
drwxr-xr-x 15 root root 0 2004-06-19 07:58 class/
drwxr-xr-x 5 root root 0 2004-06-19 09:54 devices/
drwxr-xr-x 3 root root 0 2004-06-19 09:54 firmware/
drwxr-xr-x 2 root root 0 2004-06-19 09:54 power/

but still modules of my network interfaces and modules of audio card are NOT loaded on boot.

What is surprising me is that hotplug is working under original Slackwares' 2.4.X kernel without /sys
 
Old 06-20-2004, 04:54 AM   #11
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
Well,

please excuse my earlier ignorance. I am have read up a little now on the subject. Yes insmod loads modules but does not check dependances, whereas modprobe loads them and dependant modules.

Futher to this i think you need to make sure that module autoloading was compiled as part of your kernel. This is definately an option. I belive this is called kmod (kernel module loader). As far as my system goes, it runs module auto unloading, which means that modules that are not needed by the system are unloaded after 60 seconds (i believe.). I think that such modules are maked by autoclean when typing lsmod.

What devices are you wanting to [B]hotplug/[B] anyway? I would suggest building this into the kernel rather than as a modules, if you want support for it all the time. I migh tbe wrong on the module unloading, but if it is something you want all the time, why not make it be there all the time?

I think this would be better than adding the commands lsmod etc to your startup scripts, as that would be a bit of a bodge. I think a recompile is the order of the day.

Go to /usr/src/kernelx.x.x and run menuconfig and see what options you had checked.

Well, I'm probably wrong as usual!
 
Old 06-20-2004, 05:32 AM   #12
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
superandrzej
Just to be sure, is /etc/rc.d/rc.hotplug executable ? (if not chmod +x /etc/rc.d/rc.hotplug)
What is the output for : ls /sys/bus/pci/drivers
 
Old 06-20-2004, 06:51 AM   #13
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
superandrzej, try looking at /etc/hotplug/blacklist and comment out any modules which are not loading.
 
Old 06-23-2004, 04:45 PM   #14
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Original Poster
Rep: Reputation: 15
satinet

>Further to this i think you need to make sure that module autoloading was compiled as part of >your kernel. This is definitely an option. I believe this is called kmod (kernel module loader).

yes I had it compiled with this option:
CONFIG_KMOD=y

>What devices are you wanting to [B]hotplug/[B] anyway?
network interfaces and sound card

>I would suggest building this into the kernel rather than as a modules, if you want support for
> it all the time. I migh tbe wrong on the module unloading, but if it is something you want all > the time, why not make it be there all the time?

Yes, you are right. First I had this compiled into kernel, but there are various reasons why I want it as a module:
* I recompile kernel few times in row, it takes me less time to compile only core kernel or modules only
* It is more universal. I can give this kernel to my friends without making them to recompile kernel for their own. I just add few extra modules
* I want to have core kernel as small a possible. I have SATA disk and It is not supported in Slackware 9.1 kernels and probably won't be in Slackware 10. With floppy with custom kernel I can install Slackware without the need of taking PATA disk from my old PC
* maybe less important, I want to know what in going on in my system. I had my 2.4 kernel working with hotplug and I want my 2.6 to work as well. I know how to pass by the problem, but I want to solve the problem


keefaz,

> Just to be sure, is /etc/rc.d/rc.hotplug executable ? (if not chmod +x /etc/rc.d/rc.hotplug)
Yes, it is executable. (It was one of the first things I checked)

> What is the output for : ls /sys/bus/pci/drivers

root@/sys/bus/pci/drivers\379#ls -l
razem 0
drwxr-xr-x 2 root root 0 2004-06-23 21:56 8139too/ <-- my eth1
drwxr-xr-x 2 root root 0 2004-06-23 21:56 ehci_hcd/
drwxr-xr-x 2 root root 0 2004-06-23 23:56 parport_pc/
drwxr-xr-x 2 root root 0 2004-06-23 23:56 PCI\ IDE/
drwxr-xr-x 2 root root 0 2004-06-23 23:56 sata_via/
drwxr-xr-x 2 root root 0 2004-06-23 21:56 uhci_hcd/
drwxr-xr-x 2 root root 0 2004-06-23 21:56 VIA\ 82xx\ Audio/ <-- my sound card
drwxr-xr-x 2 root root 0 2004-06-23 23:56 VIA\ IDE/
drwxr-xr-x 2 root root 0 2004-06-23 21:56 via-rhine/ <-- my eth0

Tuttle,
> try looking at /etc/hotplug/blacklist and comment out any modules which are not loading.
in that module there are no modules of mine. Any way this file works fine with 2.4 kernel.
 
Old 06-23-2004, 05:02 PM   #15
superandrzej
Member
 
Registered: Nov 2003
Posts: 63

Original Poster
Rep: Reputation: 15
UUUUPS

keefaz,

the previous content of /sys/bus/pci/drivers
was after manual modules loading. Without modules loading /sys/bus/pci/drivers looks like this:

root@/sys/bus/pci/drivers\383#ls -l
razem 0
drwxr-xr-x 2 root root 0 2004-06-23 22:50 ehci_hcd/
drwxr-xr-x 2 root root 0 2004-06-24 00:50 parport_pc/
drwxr-xr-x 2 root root 0 2004-06-24 00:50 PCI\ IDE/
drwxr-xr-x 2 root root 0 2004-06-24 00:50 sata_via/
drwxr-xr-x 2 root root 0 2004-06-23 22:50 uhci_hcd/
drwxr-xr-x 2 root root 0 2004-06-24 00:50 VIA\ IDE/

so devices I'm interested most are NOT in.
 
  


Reply


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
Automatic loading of firewire modules and devices Ilici Linux - Software 1 04-09-2005 08:26 AM
Loading modules error after loading compiled kernel td0l2 Linux - Newbie 12 07-28-2004 12:10 PM
How to load modules on demand (automatic loading)? Cyb3rPr0 Linux - Software 4 07-08-2004 12:07 AM
Problems with loading modules in new kernel beejayzed Linux - Newbie 5 02-07-2004 04:29 PM
Modules and 2.6test kernels rch Linux - General 3 11-11-2003 10:39 PM


All times are GMT -5. The time now is 07:21 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration