# Issue with /etc/modules.conf

## GungHo

Hi all,

there is an issue regarding autoloading of modules on my box.

When the lp module is loaded, then the parport modules is loadad automatically, but lp complains that no device is found:

```
Mar  9 11:09:01 BlackHole lp: driver loaded but no devices found
```

The parport_pc module is not loaded:

```
# modprobe -v lp

insmod /lib/modules/2.6.10-gentoo-r6/kernel/drivers/parport/parport.ko 

insmod /lib/modules/2.6.10-gentoo-r6/kernel/drivers/char/lp.ko 

```

In /lib/modules/2.6.10-gentoo-r6/modules.dep one could easily see, that when the lp module is loaded, the parport module also gets loaded, also when the parport_pc module is loaded, the parport module also gets loaded, but not the other way around. What is missing, that when the parport module is loaded, also the parport_pc module is loaded automatically:

```
/lib/modules/2.6.10-gentoo-r6/kernel/drivers/parport/parport.ko:

/lib/modules/2.6.10-gentoo-r6/kernel/drivers/parport/parport_pc.ko: /lib/modules/2.6.10-gentoo-r6/kernel/drivers/parport/parport.ko

/lib/modules/2.6.10-gentoo-r6/kernel/drivers/char/lp.ko: /lib/modules/2.6.10-gentoo-r6/kernel/drivers/parport/parport.ko
```

OK, no problem I thought, simply pre-loading the parport_pc module before the parport module should fix this issue. So I did in /etc/modules.d/i386

```
alias parport_lowlevel parport_pc

options parport_pc io=0x378 irq=7

# If you have multiple parallel ports, specify them this way:

# options parport_pc io=0x378,0x278  irq=none,none

# load parport_pc before parport

pre-install parport /sbin/modprobe "-k" "parport_pc"
```

followed by a 'module-update' with the expectation, that now the parport_pc module should be loaded before the parport module, which in turn is loaded before the lp module. But no luck, the parport_pc module is not loaded before the parport module.

Kernel on my box is gentoo-dev-sources-2.6.10-r6, with module-init-tools-3.0-r2.

Kernel is configured as follows:

```
#

# Loadable module support

#

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

CONFIG_OBSOLETE_MODPARM=y

# CONFIG_MODVERSIONS is not set

# CONFIG_MODULE_SRCVERSION_ALL is not set

CONFIG_KMOD=y
```

Can anybody help me with this issue, what am I doing wrong ?

Thanks in advanceLast edited by GungHo on Wed Mar 09, 2005 6:00 pm; edited 2 times in total

----------

## Maedhros

Moved from Installing Gentoo.

----------

## GungHo

Hi folks,

nobody a hint for me ?

Meanwhile I have had a deeper look into the prob, seems I have a more general problem regarding module loading and options for modules in /etc/modprobe.conf.

When I only do a 'modprobe parport_pc' in dmesg I see:

```
parport_pc: Ignoring new-style parameters in presence of obsolete ones

parport0: PC-style at 0x378 [PCSPP(,...)]

lp0: using parport0 (polling).
```

But according to my actual /etc/modprobe.conf, not polling, but an interrupt should be used for this device:

```
alias parport_lowlevel parport_pc

# interrupt driven printing

options parport_pc io=0x378 irq=7

# If you have multiple parallel ports, specify them this way:

# options parport_pc io=0x378,0x278  irq=none,none
```

This has been working for ages, without a prob, last time before I did the transition to the 2.6.10 kernel, here a message out of /var/log/messages:

```
Feb 12 12:37:52 BlackHole parport0: PC-style at 0x378, irq 7 [PCSPP(,...)]

Feb 12 12:37:52 BlackHole lp0: using parport0 (interrupt-driven).
```

But according to /usr/src/linux-2.6.10-gentoo-r6/Documentation/parport.txt this is the correct syntax:

```
KMod

----

If you use kmod, you will find it useful to edit /etc/modprobe.conf.

Here is an example of the lines that need to be added:

        alias parport_lowlevel parport_pc

        options parport_pc io=0x378,0x278 irq=7,auto

KMod will then automatically load parport_pc (with the options

"io=0x378,0x278 irq=7,auto") whenever a parallel port device driver

(such as lp) is loaded.
```

But neither interupt-driven is working, nor the autoloading of parport_lowlevel == parport_pc in my case  :Evil or Very Mad:  !

What also does not work anymore, are the options for the bttv module. They are

```
### modules-update: start processing /etc/modules.d/bttv

options bttv card=54 tuner=5 radio=1 gbuffers=16

options tuner type=5 debug=0
```

but when the bttv module is loaded at startup in dmesg I get

```
bttv: driver version 0.9.15 loaded

bttv: using 8 buffers with 2080k (520 pages) each for capture

bttv: Bt8xx card found (0).

ACPI: PCI interrupt 0000:00:08.0[A] -> GSI 10 (level, low) -> IRQ 10

bttv0: Bt878 (rev 17) at 0000:00:08.0, irq: 10, latency: 32, mmio: 0xe9003000

bttv0: using:  *** UNKNOWN/GENERIC ***  [card=0,autodetected]

bttv0: gpio: en=00000000, out=00000000 in=00449fff [init]

bttv: readee error

bttv0: using tuner=-1
```

what is not according to the options in /etc/modules.conf. And of course does not work, I have to do a 'rmmod bttv; modprobe bttv card=54 tuner=5 radio=1 gbuffers=16' to get it working.

Before the update to 2.6.10 it looked like

```
Feb  1 17:57:57 BlackHole bttv: driver version 0.7.108 loaded

Feb  1 17:57:57 BlackHole bttv: using 16 buffers with 2080k (33280k total) for capture

Feb  1 17:57:57 BlackHole bttv: Bt8xx card found (0).

Feb  1 17:57:57 BlackHole bttv0: Bt878 (rev 17) at 00:08.0, irq: 10, latency: 32, mmio: 0xe9003000

Feb  1 17:57:57 BlackHole bttv0: using: Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90] [card=54,insmod option]

Feb  1 17:57:57 BlackHole bttv0: FlyVideo Radio=yes RemoteControl=no  Tuner=5 gpio=0x449fff

Feb  1 17:57:57 BlackHole bttv0: FlyVideo  LR90=yes tda9821/tda9820=yes capture_only=no 

Feb  1 17:57:57 BlackHole bttv0: using tuner=5

```

What the f*ck is going on here  :Evil or Very Mad: 

Looks like at least option and pre-install statements in /etc/modules.conf are not working, at least on my box. F*ck  :Evil or Very Mad: 

Can somebody please assist me further tracking down this problem ?!

----------

## GungHo

Hi,

nobody a hint for me ?

----------

## GungHo

Hi,

another bump. 

Nobody a hint for me, how to better debug this issue ?

----------

## GungHo

oh boys and girls, nobody here which can give a helping hand  :Crying or Very sad: 

----------

## MiPo

module things always are done in /etc/modules.d/ <for example: alsa> and then updated via update-modules have you "done" this directly?  :Laughing:  that's the only thing i've done just one time ... and searching for ages and now knowing to do this ::not:: directly...

Greetings...

----------

## GungHo

Hi,

in /etc/modules.d/bttv I have the following statements:

```
options bttv card=54 tuner=5 radio=1 gbuffers=16

options tuner type=5 debug=0
```

This statements are correct, and I can see them in /etc/modules.conf after running modules-update

In /etc/modules.d/i386 there are the following statements:

```
# Printing-Howto

alias /dev/printers lp             # only for devfs?

alias /dev/lp*      lp             # only for devfs?

# for autoloading parport_lowlevel, when parport is loaded

alias parport_lowlevel parport_pc

# interrupt driven printing

options parport_pc io=0x378 irq=7

# If you have multiple parallel ports, specify them this way:

# options parport_pc io=0x378,0x278  irq=none,none
```

BTW, modules-update belongs to sys-apps/baselayout:

```
modules.d # which modules-update 

/sbin/modules-update

modules.d # qpkg -f /sbin/modules-update

sys-apps/baselayout

modules.d # qpkg -v -I sys-apps/baselayout 

sys-apps/baselayout-1.9.4-r6
```

Do you have some other hints ?

----------

## GungHo

Hi,

by chance I found the prob.

There was a rather mystious file in /etc/modules.d, it's filename was shown with a'?'. It was an ASCII type file, but with some Ctrl-codes in it, I think it was Ctrl-K. With a 'ls -l' it was shown above the '.' and '..' entries of this directory. The content was a listing of an lsmod, so I did not realize that it was not belonging into this directory. It's content was merged into /etc/modules.conf, as of the other files in /etc/modules.d, but apparently it was the cause of behaviour, that evaluation of the content of /etc/modules.conf did not work.

After deleting it, and doing a 'modules-update' all probs relating the parameters of the bttv module and the parport_pc module have gone !

I cannnot imagine how this file was created (only by an accident), hopefully my box is not rooted or corrupted  :Mad:  by an intruder

----------

