Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Loading module options [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Unclethommy
Guru
Guru


Joined: 24 Jul 2006
Posts: 407

PostPosted: Sat Dec 02, 2006 2:49 pm    Post subject: Loading module options [solved] Reply with quote

Hi there, i need to run my spca5xx module as the following command line for it to produce a bright enough picture to see properly.

I was wondering what the correct way is to run these options everytime the module is asked to load.

I have tried to insert

Code:
options spca5xx GRed=500 GBlue=500 GGreen=500 gamma=4



command directly into my /etc/modules.conf file

I also tried to enter both spca5xx and (on another boot) spca5xx GRed=500 GBlue=500 GGreen=500 gamma=4 into my /etc/modules.autoload.d/kernel-2.6 neither seem to work and my webcam loads with a dark screen. However, when i rmmod spca5xx , and then manually type in modprobe spca5xx GRed=500 GBlue=500 GGreen=500 gamma=4 it works fine and dandy :(

Can anyone suggest a sure fire way of getting the module to load with the options I specify anytime and EVERYtime without the hassle of rooting and entering it manually :( ?


Last edited by Unclethommy on Sat Dec 02, 2006 6:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55015
Location: 56N 3W

PostPosted: Sat Dec 02, 2006 2:57 pm    Post subject: Reply with quote

Unclethommy,

Add
Code:
spca5xx GRed=500 GBlue=500 GGreen=500 gamma=4
to /etc/modules.autoload.d/kernel-2.6
This works if the spca5xx is actually loaded from here.

You cannot edit /etc/modules.conf directly. Its created at every boot by concating all the files in /etc/modules.d/
To add things to /etc/modules.conf, make a new file in /etc/modules.d/ (any name you like) and put your options there.
Now run modules-update to recreate /etc/modules.conf without a reboot.

To test do
Code:
modprobe -r spca5xx
modprobe spca5xx
your kernel needs to support module unloading for this to work
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
wudmx
Guru
Guru


Joined: 07 Aug 2002
Posts: 527

PostPosted: Sat Dec 02, 2006 3:01 pm    Post subject: Reply with quote

what does dmesg say after adding your options to your /etc/modules.autoload.d/kernel-2.6 ? Don't know any more if it's necessary, but perhaps you have to invoke a modules-update after inserting your options.

HTH
Andi
Back to top
View user's profile Send private message
Unclethommy
Guru
Guru


Joined: 24 Jul 2006
Posts: 407

PostPosted: Sat Dec 02, 2006 3:10 pm    Post subject: Reply with quote

I took all the references out of the files I mentioned to see if that stopped the module loading. Spca5xx still loaded and is visible in lsmod after the reboot. I will try to change the autoload file as youve suggested and reboot to see what dmesg says too....

I have change part of my udev rules so that the camera node is /dev/mywebcam

Would this effect the module loading? Just athought.

EDIT: okay, after boot, it still is dark as reported before... I check on dmesg heres the part with the first message of spca5xx



Code:
Bluetooth: HCI USB driver ver 2.9
usbcore: registered new driver hci_usb
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[001106000000e332]
/var/tmp/portage/spca5xx-20060501-r2/work/spca5xx-20060501/drivers/usb/spca5xx.c: USB SPCA5xx camera found. Type QC Express (unknown CCD)
/var/tmp/portage/spca5xx-20060501-r2/work/spca5xx-20060501/drivers/usb/spca5xx.c: [spca5xx_probe:5492] Camera type GBGR
/var/tmp/portage/spca5xx-20060501-r2/work/spca5xx-20060501/drivers/usb/spca5xx.c: [spca5xx_getcapability:1768] maxw 352 maxh 288 minw 160 minh 120
usbcore: registered new driver spca5xx
/var/tmp/portage/spca5xx-20060501-r2/work/spca5xx-20060501/drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered
EXT3 FS on hda7, internal journal
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8




Could there be something else running spca5xx automatically ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55015
Location: 56N 3W

PostPosted: Sat Dec 02, 2006 4:19 pm    Post subject: Reply with quote

Unclethommy,

I suspect its the part of udev that replaced coldplug.

Unplug the webcam,
Code:
 modprobe -r spca5xx
Now plug in the cam again. With modules.conf updated to include the options, I expect they will be applied. If so, that confirms its udev loading modules for equipment attached at start up.

In a corner of my mind, I have an inkling that udev can apply module params too. It can certainly run scripts, which would be a messy way to do the same thing. Its all here
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Unclethommy
Guru
Guru


Joined: 24 Jul 2006
Posts: 407

PostPosted: Sat Dec 02, 2006 6:00 pm    Post subject: Reply with quote

Neddyseagoon,

Your hunch was right. The module seems to be automatically loaded.

>>>>>>>>>>>>>>>>>>>>>>>Webcam unplugged and ran modprobe -r spca5xx
Code:

Module                  Size  Used by
raw1394                20084  0
rfcomm                 26780  0
l2cap                  15876  5 rfcomm
bttv                  147060  0
video_buf              17540  1 bttv
ir_common              24068  1 bttv
compat_ioctl32          1280  1 bttv
nvidia               4542292  12
btcx_risc               3848  1 bttv
tveeprom               12432  1 bttv
ohci1394               26288  0
videodev               18432  1 bttv
v4l1_compat            11396  1 videodev
ieee1394               70836  2 raw1394,ohci1394
v4l2_common            18560  2 bttv,videodev
sis900                 17152  0


<<<<<<<<<<<<<<<<<<<<webcam plugged in again
Code:

heaven mark # lsmod
Module                  Size  Used by
spca5xx               641616  0
raw1394                20084  0
rfcomm                 26780  0
l2cap                  15876  5 rfcomm
bttv                  147060  0
video_buf              17540  1 bttv
ir_common              24068  1 bttv
compat_ioctl32          1280  1 bttv
nvidia               4542292  12
btcx_risc               3848  1 bttv
tveeprom               12432  1 bttv
ohci1394               26288  0
videodev               18432  2 spca5xx,bttv
v4l1_compat            11396  1 videodev
ieee1394               70836  2 raw1394,ohci1394
v4l2_common            18560  2 bttv,videodev
sis900                 17152  0





EDIT: I've tried the suggestion by neddyseagoon and it works (for now :)) just did what he/she suggested :) hope it helps others Thanks again for the help :)


Quote:
to add things to /etc/modules.conf, make a new file in /etc/modules.d/ (any name you like) and put your options there.
Now run modules-update to recreate /etc/modules.conf without a reboot.

To test do
Code:
modprobe -r spca5xx
modprobe spca5xx
your kernel needs to support module unloading for this to work
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum