Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Modules - Emerge Not Finding Them?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Nick W
l33t
l33t


Joined: 07 Dec 2003
Posts: 684

PostPosted: Mon Dec 08, 2003 8:46 pm    Post subject: Kernel Modules - Emerge Not Finding Them? Reply with quote

Hi

In the x install docs it says i have to add some kernel modules for my usb mouse, including 'usbmouse'

When I try 'emerge usbmouse' or any of them, emerge cant find them. What am I missing here?

Many thanks

Nick
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 08, 2003 8:53 pm    Post subject: Reply with quote

Nick W,

Thats not how you add kernel modules, they are not seperate packages. They are provided with the kernel for you to choose (or not).

cd /usr/src/linux
make menuconfig (or make xconfig if you have X running)

Reconfigure the kernel and rebuild it as it says in the install guide.

Regards,

NeddySeagoon
_________________
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
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Mon Dec 08, 2003 8:55 pm    Post subject: Reply with quote

I have the same issue! Although, I think it's just because I'm noob. If I had a bit more expirience I could probebly figgure it out. :oops: I with there was more compleat documetation on this.

Sorry,

-=GB=-
Back to top
View user's profile Send private message
sbbeebe
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2003
Posts: 104
Location: Colorado, US

PostPosted: Mon Dec 08, 2003 8:59 pm    Post subject: Reply with quote

Take another look at the installation document, the section on installing the kernel. Scroll down to the Manual Configuration section. What you need to do is select the modules mentioned in the desktop guide as modules (e.g. usbmouse) in your kernel config.

Then recompile the kernel, then you can use insmod to load the modules.

Make sense?

hth,
_________________
"smell the color 9"
steve
Back to top
View user's profile Send private message
kenoki
n00b
n00b


Joined: 14 Nov 2003
Posts: 57
Location: montreal,canada

PostPosted: Mon Dec 08, 2003 9:09 pm    Post subject: Reply with quote

You just need to select usb support for you usb controlled, UHCI EHCI ect in the kernel config, and add support for a usb mouse.
_________________
Generic Signature filling up blank space.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 08, 2003 9:10 pm    Post subject: Reply with quote

galenb,

I'm not one to say RTFM, especially to a noob but since you asked:-

look in /usr/src/linux
Start with README (in uppercase)

Move on to /usr/src/linux/Documention.

We'll be asking questions later :)

Regards,

NeddySeagoon
_________________
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
kenoki
n00b
n00b


Joined: 14 Nov 2003
Posts: 57
Location: montreal,canada

PostPosted: Mon Dec 08, 2003 9:12 pm    Post subject: Reply with quote

Just a small sidenote now that I think about it, the kernel modules or the src for them to be specific are included with the kernel source, so for eg: if you emerge new kernel src like "emerge development-sources" you don't have to add or do anything to get the modules, just choose what you want if available as a module in your kernel config.
_________________
Generic Signature filling up blank space.
Back to top
View user's profile Send private message
Nick W
l33t
l33t


Joined: 07 Dec 2003
Posts: 684

PostPosted: Mon Dec 08, 2003 9:32 pm    Post subject: Reply with quote

Thanks for the help!

I didn't find any of the things the docs said I had to have (usbmouse, mousedev, hid, usbcore, usb-uhci, and input) but I have enabled the stuff kanooki said above and will now deal with the kernel.

Any ideas on the stuff I couldn't find?

I also have no keyboard whatsoever when I startx but looking at ythe log it seems to be breaing just after the mouse .....

Nick
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 08, 2003 9:54 pm    Post subject: Reply with quote

Nick W,

Those names you quote are the names of the modules. It not very clear when you are configuring the kernel, which modules you will get until you read the help items associated with each option.

grep USB /usr/src/linux/.config should list at least show the following
# USB support
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y

# USB Host Controller Drivers
# NB: You may only have one of these to suit your hardware
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_UHCI=m
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_OHCI=m

# USB Human Interface Devices (HID)
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
CONFIG_USB_HIDDEV=y
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set

The last two options are for legacy mode - you must not choose them and HID. Any lines beginning with a "#" are comments and are ignored when the kernel is built.

Regards,

NeddySeagoon
_________________
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
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Tue Dec 09, 2003 8:22 am    Post subject: Reply with quote

Eek! Sorry about that. I did read the all that stuff and it really made my head ach. ;) I was not kidding when I said I was a noob.

Anyway, it seems as though I'm almost there. When I unplug and plug the usb mouse in I do get the kernel recognizing it. Now the issue is that it can't seem to find the "mousedev" module:

Code:
usb.c: USB disconnect on device 00:03.0-1 address 2
hub.c: new USB HID v1.00 Mouse [05e3:1205] on usb2:3.0
modprobe: modprobe: Can't locate module mousedev


I've searched about for an answer but can't seem to find anything.

Anything to help me escape Windows is much appreciated,

-=GB=-
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 09, 2003 9:01 am    Post subject: Reply with quote

galenb,

I think my post was not clear. I was intending for you to exececute the command
Code:
grep USB /usr/src/linux/.config
and compare what you got with what I posted. the easiest way for you to do that is to open a tereminal window,
highlight the command in my post by draggging across it using the left mouse button, then clicking the middle mouse button in the terminal window. If you don't have a three buttton mouse (and you have emulation set up) press buttons one and two together.

I'm not sure what the "mousedev" module is - I can't find it either. It is probably devfsd complaing about something.

Look in /dev/input. Do you see mouse0 appearing and dissapearing as you connect and disconnect the mouse?
If you are too quick it may reappear as mouse1.

In your /etc/X11/XF86Config file add a new section (you can put it anywhen except in the middle of another section) as follows
Quote:

Section "InputDevice"

# Identifier and driver

Identifier "Mouse2"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
# Option "Protocol" "Auto"
Option "Device" "/dev/input/mouse0"

# Allow Both mice to work for debugging
Option "SendCoreEvents"

# For the Logitech Mx700 added by Roy
Option "ZAxisMapping" "6 7"
Option "Buttons" "7"

# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)

# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"

# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"

EndSection

You can copy and past that whole section. Set the options to suit your mouse.

At the bottom of the file
Quote:

InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse2"
You will have the first two lines listed above. Add the mouse 2 line.
this makes X work with either or both mice, so if the USB mouse settings are not quite right, X will still start and your PS/2 mouse will still work. It avoids the need to keep on editing /etc/X11/XF86Config to get you going if something doesn't work.

Regards,

NeddySeagoon
_________________
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
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Wed Dec 10, 2003 7:38 am    Post subject: Reply with quote

NeddySeagoon,

Thank for the help. The Gentoo install docs state quite ambiguously:
Quote:
A USB mouse is your friend on a high resolution screen. The kernel takes care of the scaling so you don't have to move your mouse five times across the pad to make it across the screen.

The first thing that has to be done is the installation of the kernel modules. The modules that will be needed for a USB mouse to work are usbmouse, mousedev, hid, usbcore, usb-uhci, and input. After the necessary kernel configuration is done, insmod the modules.

So, there's no mention of how to actually do this... I'm sure this makes sense to you but you have to realize that nowhere in the docs so far are there any instructions that I was able to find that describe Installing a kernel module. And, what is the "nessesary kernel configuration"? Anyway, as you can see, mousedev is there in the docs but it doesn't seem to be here. Also, there's no metion of having to re-build your kernel in there either.

While we are on the subject of where things are, how do you use "whereis"? The only output I get is the string I was searching for. Huh? Is this what it's supposed to do? The man pages are surprisingly void of any helpful information. Hasn't that thing been out since the beginning if Unix?

Sorry, got a little side tracked.

Anyway, I'll give your configuration a try. By the way, it's been four days now and I'm still starring at a counsel window. I've been able to boot X a few times but I can't get kde to work. So all those great tips for dragging and dropping are wasted on me at this point.

BUT I WON'T GIVE UP! I’M NOT GOING BACK TO WINDOWS! AND NO HALF-ASSED DOCUMENTATION IS GOING TO STOP ME! :twisted:

-=GB=-
Back to top
View user's profile Send private message
silverpig
Tux's lil' helper
Tux's lil' helper


Joined: 10 Dec 2003
Posts: 143
Location: Vancouver BC

PostPosted: Wed Dec 10, 2003 8:16 am    Post subject: Reply with quote

Kernel modules are made when you compile the kernel. I'm going to guess you used genkernel to do yours so I'll tell you how to do it using genkernel.

cd /usr/src/linux
genkernel --config

This will bring up a menu. Search through it until you find the options you need to add in. Use the M key to compile them as modules. When you're done, exit that and genkernel will build you a new kernel just as before. Reboot to your new kernel. If you have hotplug installed, it will probably load the new modules for you automatically, but to check type:

lsmod

at the prompt to see what modules are loaded. If those ones come up, then you're set, if not then type:

insmod <module>

where <module> refers to each one you need... ie usbmouse, mousedev etc. That should do it for you. Just to make sure, do an lsmod again to see that the modules are properly loaded.

Of course, if you didn't use genkernel, then the procedure is almost the same. Just cd to /usr/src/linux and type "make menuconfig" to bring up that menu I was talking about before. Select your options and save the configuration when you exit the program. then type:

make dep && make clean bzImage modules modules_install

and then copy the new kernel image to /boot/bzImage as it says in the install guide. Reboot and it's all the same from there.
_________________
'Cause I can.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Dec 10, 2003 10:15 am    Post subject: Reply with quote

galenb,

Kernel modules are selected at kernel configuration time, thats when you run make menuconfig or when you run genkernel.

The grep command I posted searches your kernel configuration file for all instances of the text USB. It uses the absolue path to the file, so if you use it in full, its not dependant on your current directory. If it doesn't work for you, check that you spotted that .config actually begins with a full stop.

The idea was to compare your settings for a USB mouse with mine, which I know work.

Copy and paste text works as I describe without X. You need the console mouse driver (emerge gdm) for it to work in a console. It works between two consoles, between a console and X and even across ssh from one PC to another.

whereis looks for a file or directory in you path with the name given. I have a feeling that it actually uses a database that is updated as a daily cron job, rather than searching your entire path every time.

I've found mousedev too. Its under Input Core Support Mouse Support. in the kernel configuration. Be sure to fill in your screen resolution.

whereis man returns
Quote:

man: /usr/bin/man /etc/man.conf /usr/local/man /usr/share/man /usr/man/man1/man.1.gz /usr/man/man7/man.7.gz /usr/share/man/man1/man.1.gz /usr/share/man/man7/man.7.gz
on my machine

Regards,

NeddySeagoon
_________________
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
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Thu Dec 11, 2003 6:11 pm    Post subject: Reply with quote

Hey NeddySeagoon,

Thanks again for all your help! I think I'm actually starting to get it now. just after I posted that last message I suddenly realized the meaning of "insmod"! Install Module! Sheesh!

Anyway, I'm still not finding the moudedev and input modules. I'm not exactly sure where that path starts from. I'm guessing you meant /input/core/support/mouse/support and just forgot to put in the beginning?

-=GB=-
Back to top
View user's profile Send private message
sbbeebe
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2003
Posts: 104
Location: Colorado, US

PostPosted: Fri Dec 12, 2003 4:05 am    Post subject: Reply with quote

Hey, if you're still at it, here's some additional info:

For the kernel to know about the modules, they need to be configured. To do this, you need to:

1. open a terminal window.
2. type "su" then you'll be prompted for the root password - enter it.
3. then type "cd /usr/src/linux"
4. type "make menuconfig"
At this point you get a semi graphical thing that let's you go through and identify what you want included in your kernel.

Now the problem I have, is I'm running the 2.6 kernel and the config options are layed out a little differently than 2.4. In 2.6, you navigate to Device Drivers | Input Device Support, and then to USB Support. I think in the 2.4 kernel Input Device Support and USB Support are both in the first list you see - you'll probably have to scroll down to find them.

5. select Input Device Support and hit enter.
6. select Mouse Interface and press m (you should see <m> this selection is the mousedev module.
7. select USB Support and hit enter.
8. select Support for USB and press y (you should see <*> )
9. select Preliminary USB dev FS and press y
10. select UHCI and press m (you should see <m>)
11. select USB Human Interface Device (Full Support) and press y
12. select HID Input layer support and press y

That should do it. With one possible gotcha. If you have a USB 2.0 mobo, you may need to select EHCI HCD instead of UHCI HCD. For any of these items, when you have it selected you can press ? and you'll get a little help text. The help suggests if you're not sure, you can select UHCI, OHCI, and EHCI.

Exit from menuconfig and save your configuration. If you're running 2.4 you'll then need to recompile the kernel with the following:

# make dep && make clean bzImage modules modules_install

When that is done, you'll need to mount your boot partition
#mount /dev/hda1 /boot (make sure that hda1 is right for you)

now you can copy your new kernel to your boot partition

# cp /usr/src/linux/arch/i386/boot/bzImage /boot
#umount /boot
#reboot

Once you have rebooted you should be able to insmod mousedev, uhci, (possibly ehci and ohci too) and hid. You can also enter these into /etc/modules.autoload.d/kernel-2.x, then you won't have to insmod after rebooting.

Don't give up, man. You're almost there.
_________________
"smell the color 9"
steve
Back to top
View user's profile Send private message
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Fri Dec 12, 2003 6:34 am    Post subject: Reply with quote

Hey Steve, Yeah I'm still at it. It's been a week now... but I'm not giving up now. I actually got the usb mouse to work in X. I'm not exactly sure what it was that did it because I did a few things and then rebooted and at that point it just started working. So much for learning from our mistakes. I don't even know what the mistake was! ;)

Thanks for that run down by the way. You know, I was under the impression that you could just tell the kernel config that you wanted these to be loaded as modules instead of being compiled into the kernel... Is this not the case?

You know, I've never been able to locate the fabled mousedev module. If anyone knows the exact location, I'd sure like to know.

Actually, at this point, I'm only now getting to install kde. it's been hell I tell yah. Linux is not for noobs at all. but, how does one get over being a noob? Usually, I suspect that most people start with RedHat and move on to something a little more technical and so on and so on. For me, my hardware (a Sony PCG-GRT100 notebook btw) is so utterly incompatible with the basic linux distributions that I had no choice but to do a custom install. Crap!


Thanks again,

-=GB=-
Back to top
View user's profile Send private message
sbbeebe
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2003
Posts: 104
Location: Colorado, US

PostPosted: Fri Dec 12, 2003 12:30 pm    Post subject: Reply with quote

You know, somebody on gentoo has a signature that says something like:
"when it comes down to it, we're all n00bs" - which I think is pretty good.

I started with Mandrake, which I've been using for about two years. Frankly I didn't learn much, but enjoyed using linux. I started with gentoo a few months ago after reading about it - I'm too cheap to have the latest / greatest hardware, so I wanted to get the best performance I could...

The way to get over being a n00b is to do exactly what you're doing. Just work through it. To bad about not being really sure what happened to get the mouse working.

As to the kernel, you have three choices when dealing with a specific feature or capability, you can:
1. compile a feature into it,
2. compile a feature as a module, or
3. leave the feature out.

When you run "make menuconfig" or genkernel, that's what is happening. With make menuconfig you're going through a long list of features and deciding what to make available (either compiled in or as a module) and what to leave out (if you don't need it, might as well keep the kernel small and faster by not putting it in).

If something is compiled into the kernel, it's always there and you just use it. If it is compiled as a module, you must load the module before you can use it. If you leave the feature out, the kernel has no idea what it is. So with mousedev, if it's compiled in, you don't have to do insmod, it's just there when you boot up. If it's a module, then you have to explicitly load it.

If you run "make menuconfig", the place to find mousedev, is by enabling Mouse Interface in the Input Device Support section. If you go there and press ? you'll see a description of the driver and at the bottom, the driver name mousedev.o. Once the driver has been compiled in you'd find the actualy file (mousdev.o) someplace like here:

/usr/src/linux-2.6.0-test8-patchset-0.1/drivers/input/mousedev.o

that's where mine is.

Good luck with kde. If you have X working, there's not much to get kde going. Well, not much, but a long compile time :D
_________________
"smell the color 9"
steve
Back to top
View user's profile Send private message
galenb
n00b
n00b


Joined: 08 Dec 2003
Posts: 10

PostPosted: Fri Dec 12, 2003 4:23 pm    Post subject: Reply with quote

Ahhhhh..... Finally... Mousedev.o and input.o. I see them. I feel so much better now. Thank you soooo much sbbeebe.

OK, two more things...

1.) When I do insmod for them I get: "Couldn't find the kernel version the module was compiled for." Huh?! mine is in /usr/src/linux-2.4.20-gentoo-r9/drivers/input. Is there some place I sould cp them to so modprobe can find them?

2.) Completely different subject: I've finished installing kde. I look in /etc/X11/Sessions/ and all I see is "Xsession". No 'kde'. So I figured I see if there wasn't just some typo in the docs or something. Following the next part in the docs, I type "kdm" to bring up the login screen... Well, just like everything else it says "bash: kdm: command not found." Should have seen that one coming. I checked to make sure kde was really installed and it seems to be in all the right places. Man...

-=GB=-
Back to top
View user's profile Send private message
sbbeebe
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2003
Posts: 104
Location: Colorado, US

PostPosted: Sat Dec 13, 2003 3:31 am    Post subject: Reply with quote

1. the error you're getting on insmod will show up if the kernel you are running wasn't configured for the module you are trying to load. A couple of the things to check.

cd /usr/src/linux
make menuconfig

find the mousedev entry and make sure that it has <m> in front of it.

After that was set did you recompile the kernel? that would be

make dep && make clean bzImage modules modules_install

Then you have to mount your boot partition and cp the bzImage file to it. Then reboot so that you are using the new kernel. Then you should be able to insmod mousedev.

But if your usb mouse is already working, then i suspect these modules were compiled directly into the kernel. In menuconfig above you should see [*] next to them instead of <m>.

2. On KDE. hmmmm. Did you do the following:
Code:
# emerge kde
# env-update && source /etc/profile


before checking /etc/X11/Sessions/ ? Not sure what else may have been a problem. if issuing env-update && source /etc/profile don't resolve it, then maybe post some more info about what you did to get kde running.

ciao
_________________
"smell the color 9"
steve
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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