LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-02-2007, 03:33 AM   #1
adamruss
Member
 
Registered: Jul 2007
Posts: 44

Rep: Reputation: 15
load a module before usbhid load's


well... i think the topic say's it

if i want to load a module before usbhid load's up where do i write it? (/etc/modules didnt works...)
 
Old 10-03-2007, 05:48 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
If you're running a sufficiently new version of Linux, I believe /etc/modprobe.conf will do what you want. Use the install primitive to give a command line type argument for what you want. In your case, probably modprobe the prerequisite module followed by modprobing usbhid. When you modprobe usbhid you probably want to use the --ignore-install switch so you don't get into an infinite loop. I've even seen a sleep command put between the two modprobes. Separate the commands with semicolons like you would do in bash.

I am no expert on this (which is why I didn't put something specific between code tags), but I think this is the general direction you want to go.
 
Old 10-03-2007, 06:34 AM   #3
adamruss
Member
 
Registered: Jul 2007
Posts: 44

Original Poster
Rep: Reputation: 15
but usbhid is allready getting loaded somewhere... (?) and it's not in /etc/modules

i'm running debian so there's no /etc/modprobe.conf - only /etc/modules and /etc/modprobe.d (dir)
 
Old 10-03-2007, 09:47 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
A thousand pardons! I was not at a Linux machine when I typed that. On Ubuntu (which is based on Debian) there is indeed not a /etc/modprobe.conf. (Although perhaps one could be created and it would work???) But the files in /etc/modprobe.d are treated as if they were part of modprobe.conf.

As an example, when I needed to alter the behavior when the em28xx module was loaded, following directions I found on the Internet, I created the file /etc/modprobe/dvbstick:

Code:
$ cat /etc/modprobe.d/dvbstick 
install em28xx /sbin/modprobe --ignore-install em28xx; /bin/sleep 2; /sbin/modprobe em2880-dvb
Now this installs an additional module after the specified module rather than before, as you want, but the basic method is the same.

In your case, I don't know what is loading usbhid, but as I understand it, if whatever it is is using modprobe to do so, the behavior can be altered with a file in /etc/modeprobe.d.
 
  


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
USBHID polling - non-mouse SilentSam Linux - Software 1 08-24-2007 04:50 PM
Failed to load module "ati" (module does not exist, after upgrad from Redhat 3 to 5. perrym8 Red Hat 2 07-24-2007 10:14 AM
usbkbd and usbhid modules daveschile Linux - Hardware 1 12-28-2006 06:28 AM
X won't load i810 module for 915GM video card "module requirement mismatch" yougene Slackware 10 03-18-2006 10:02 AM
Module Auto-Load: module.conf tricks? m_e_perry Linux - Newbie 3 10-07-2004 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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