LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-29-2003, 09:37 PM   #1
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Rep: Reputation: 15
Load Modules Before X


I'm trying to install the remote that came with my ATI AIW video card. It should be able to act as a mouse. These are the instructions:

* turn on USB and "input" support in the kernel
* make
* make test
* configure X to use /devfs/input/mice as a mouse
* start X - enjoy !

I can get the make and make test to work. However, I'm not sure how to configure my XF86Config file. When I enable the hid module and do a make test (which does an insmod of the ati_remote module) I end up with a bunch of things in /dev/input (I don't have /devfs/input/). /dev/input/mice is there all the time, but after make test i get /dev/input/mouse0 all the way to mouse15. I think those 16 devices represent the 16 channels that can be used by the remote.

I figure I just have to add the device as another mouse in my XF86Config file (using /dev/input/mice as the device, or maybe /dev/input/mouseX. But I think I need to do the modprobe and insmod commands before X loads so that the remote exists as a device for X to load it. How do I run the modprobe and insmod commands that I want before X loads?
 
Old 07-30-2003, 06:43 AM   #2
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
I put those kinds of things (I call them "X infrastructure files") in a small script file in my /etc/X11/xinit.d directory, they'll be exec'd indirectly via startx. I'd be curious what your XF86Config-4 will look like when you're done, will it have to support all 16 channels, ie: 16+ mice?
 
Old 07-30-2003, 08:41 PM   #3
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
I tried putting a script in the /etc/X11/xinit.d/ directory. There was a script there called numlock so I just copied it, renamed it to remote, then changed the contents to this:
Code:
modprobe hid
modprobe ati_radeon
That's what I have to run to get the devices to show up in /dev/input/. However, the script doesn't seem to execute. I know it works, because it works when I do ./remote in /xinit.d/, the commands execute. I'm tried adding those commands to the bottom of the numlock script as well, but to no avail. Is there any way to check and see if the scripts in that dir are actually executing

I get unresolved symbol errors when I boot up because ati_remote loads and hid doesn't. (ati_remote.o is located in /lib/modules/kernelversion/kernel/drivers/misc/. hid.o is located in /kernel/drivers/usb, but it doesn't load at startup.) Maybe I could fix the whole problem if I could get hid to load during startup. How can I add a module to the start up routine?

While I'm at it, is there any way to test the devices in /dev/input/? I remember running some command before that put up gibbersh in the command prompt when I moved the mouse, but I don't remember the command. I just want to see if the computer is actually receiving any input from the remote.

Thanks for your help so far.

Last edited by Parksy; 07-30-2003 at 08:53 PM.
 
Old 07-30-2003, 08:58 PM   #4
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
hmm, not sure why the xinit.d script is not executing, anything in the log? If not, perhaps you should just add those lines to your startx file somewhere, also you can add scripts to the /etc/rc.d/rc5.d directory, look there for examples.

you could add a line to your /etc/modules file (mandrake), containing the module name hid, I have to do that to get around the ms wheelmouse protocol thing, the file most likely just contains comments, after them add a line containing the one word hid.

to test mouse, from console (and make sure your mouse cursor is in the console window!) cat /dev/<your mouse device name>, for instance, on this machine it's cat /dev/psaux, if you're in X, and for some reason you lose the cursor, which happens easily, do a ctlr-alt-f2 and login to the terminal and then do a kill `pidof cat`, then a ctrl-alt-f7. (unless your X runs on a different terminal, in which case you already know the above). of course, ctrl+c when you're done seeing the gibberish.

Last edited by akaBeaVis; 07-30-2003 at 09:03 PM.
 
Old 07-30-2003, 09:26 PM   #5
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
It turns out my mouse is /dev/psaux, even though it wasn't set to that in XF86Config. I did cat /dev/psaux and it shows gibberish. cat /dev/input/mice works for the remote control. However, I still can't get hid and ati_remote to load during startup. I copied me remote script to /etc/rd5.d/ but still nothing happens.
 
Old 07-31-2003, 08:56 AM   #6
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
certainly adding them both to your /etc/modules file (not modules.conf, just modules) will work.
 
Old 07-31-2003, 06:16 PM   #7
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
I've got them in /etc/modules, but I'm still having problems. When mandrake is booting, I get unresolved symbol errors for the ati_remote module at the "Finding module dependencies" stage. These errors are caused when ati_remote is loaded before hid. Is there a way to stop the ati_remote module from loading at that time (or to have hid load before that)? After booting, the devices show up in /dev/input (meaning the stuff in /etc/modules works) but the remote still doesn't work. I'm guessing that has something to do with the unresolved symbol errors.
 
Old 07-31-2003, 09:29 PM   #8
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Hmm, "Finding module dependencies" is usually a prelude to a "depmod -a". So the unresolved symbols would be returned from that call regardless of whether hid is loaded or not. You can prove this to yourself by doing a "rmmod hid" and then doing a "depmod -a" (be prepared to wait a bit) and you should see the same unresolved symbol errors. Sometimes these errors can be safely ignored, other times not. If doing a "modprobe ati_remote" results in an error and a subsequent "lsmod" doesn't show the ati_remote module loaded, then these errors can't be ignored. If the module loads on a plain old "modprobe" then you're ok. Again, those symbol errors aren't related to hid being loaded or not.

If the devices show up, are you able to check them doing a "cat /dev/devicename"?
 
Old 07-31-2003, 09:53 PM   #9
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
First I tried your suggestion - I booted up normally (with hid and ati_remote in /etc/modules). I did rmmod hid, depmod -a and modprobe ati_remote. I didn't get an error with the modprobe. By doing cat/dev/input/mice, I could get a response from the remote.

Then I removed hid from /etc/modules and rebooted. I did depmod -a then modprobe ati_remote, but this time I got three unresolved symbol errors. Also when booting up without hid, /dev/input/ isn't created so I can't do cat /dev/input/mice. After doing modprobe hid, I can do modprobe ati_remote successfully and then /dev/input/mice is created. I can get a response from it.

When I do rmmod hid and rmmod ati_remote again, /dev/input/mice exists but doesn't work. Also when I do this, /dev/input/mouseX (X from 0 to 15) disappears.

I wonder what this all means.
 
Old 07-31-2003, 11:29 PM   #10
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
As near as I can tell, it means what you said already, that hid needs to be there before ati_remote. Try this, pull ati_remote out of /etc/modules and put it at the end of /etc/rc.d/rc.local, with hid in /etc/modules and ati_remote in rc.local, hid should go in first.
 
Old 08-02-2003, 04:55 PM   #11
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
I'm having some wierd things happen.

When I boot up normally, I get unresolved smbol errors and ati_remote isn't loaded. hid is loaded. If I start booting up, but after getting the unresolved symbol errors I press Ctrl-Alt-Del then on the subsequent boot, I don't get unresolved symbol errors.

If I can get it to load on the first boot, I think my only problem is getting X to recongnize the device. I likely don't have my XF86Config file entry correct for this device. This is what I have in the /etc/XF86Config file currently for this device:

Code:
Section "InputDevice"
        Identifier "ati_remote"
        Driver "mouse"
        Option "Protocol" "auto"
        Option "Device" "/dev/input/mice"
EndSection
I'm kind of confused about which config file X is loading. Should it be XF86Config or XF86Config-4? I have both in the /etc/X11 file now and they're identical, but I would like to straighten that out.

Once again, thanks for all your help.
 
Old 08-03-2003, 02:47 PM   #12
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Unless you specifically chose to install and use XFree86 3.x.x, your system is almost undoubtedly using the XF86Config-4 file, that file is for XFree86 4.x and the plain one is for 3.x. The layout/syntax was a bit different for v3, so if they're both identical, odds are the plain file isn't getting used, or it'd most certainly gen some errors.

As far as getting X to use your remote, it looks like you followed the instructions in your very first post correctly, beyond that, I don't know.
 
Old 08-05-2003, 10:08 AM   #13
Parksy
Member
 
Registered: Apr 2003
Distribution: Gentoo/Mandrake 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
Well it seems that something must be working now. I haven't changed anything, but as I was dusting my remote (and the rest of my room) I hit some buttons. A command prompt was open, and I saw some letters and numbers printed there. My remote works as a keyboard input device just fine, but not as a mouse input device. It must just be an X config problem, so I should be able to figure things out eventually.

Thanks for helping me through this.
 
Old 08-05-2003, 09:58 PM   #14
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
"dusting", what on earth is that?
 
  


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
modprobe: FATAL: Could not load /lib/modules/.../modules.dep Ankardo Debian 9 02-01-2011 06:09 PM
modules won't load huntz Slackware 2 10-03-2004 11:37 PM
FATAL: could not load /lib/modules/2.6.1/modules.dep Fr33B33R Slackware 3 01-12-2004 06:40 AM
modules.conf - Cannot get modules to load automatically gundelgauk Linux - General 1 12-28-2003 12:27 AM
modules load Beuzekom Linux - Newbie 2 08-22-2003 06:25 PM


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