Turn off hotplug, yet detect a mouse
I really hate having to sit through hotplug during startup, only for it to detect my mouse. How can I turn off hotplug, but still have Linux detect my mouse?
My mouse is a a USB mouse, uses the IMPS/2 driver.
As long as you manually modprobe the kernel module(s) needed to run your mouse, you don't need to hotplug it.
Type LSMOD in a terminal to identify the mouse-driver-module(s) from the list of loaded kernel modules, and then locate that module in (or add it to) /etc/rc.d/rc.modules or /etc/rc.d/rc.modules.<kernel-name> or /etc/rc.d/rc.local with a statement like 'modprobe <module-name>' (or for a 2.4 kernel: insmod <module-name>).
Before eliminating hotplug, make sure it is not needed to load anything else either, particularly with the default 2.4 kernel. If it is, you must manually modprobe all things that hotplug does.
As for actually disabling the rc.hotplug script, just chmod it to non-executable (chmod -x /etc/rc.d/rc.hotplug)
EDIT: And actually, it's the /etc/xorg.conf which installs/chooses the mouse driver itself, so I stand to be slightly corrected regarding that one, but if hotplug is plugging the USB driver, you'll need that one for sure, if it isn't compiled into the kernel, which it may well be..
Hope this helps you :)
udev/HAL/dbus is going to replace or already replaces hotplug. In either /etc/modules.conf or /etc/modprobe.conf add the following.
alias char-major-13 mousedev
post-install mousedev modprobe usbhid
If the above is too confusing, place the lines in the files what GrapefruiTgirl provided. The utility insmod should only be used if there are no dependencies for other modules. I suggest using modprobe instead of insmod. Specify the full path to these utilities to make them predictable upon boot up.
Xorg 7 and above should load up USB mouse and USB keyboard modules automatically, but it may not do it always. Though it will not automatically load up the module for PS/2 mouse, so you have to do it manually load it through scripts and not through /etc/modules.conf or /etc/modprobe.conf.
FYI, IMPS/2 is a type of protocol a mouse uses not a driver.
Including noapic may make a USB mouse be detected faster.
man, there is so much stuff that is needing that hotplug, I couldn't possibly turn it off. I hear that there is a 2.6 kernal, I'm running 188.8.131.52 right now. How stable is the new kernal?
Does the new kernal also make what I'm trying to do easier?
I added that post w/o refreshing the browser, so I didnt see your post Electro. I got my mouse to work, but then turning off hotplug meant my ethernet and sound went out the window too. I got the ethernet to work, but there are just to many things for sound for me to care over. So is this udev with the new kernal, or would I have it now?
Udev is a tool which is not 'part' of the kernel, however, with the 2.6 kernels, UDEV is the method which replaces hotplug, and accomplishes the same task. And yes, Slackware 11 already has UDEV in its default configuration; it just is not used when the kernel is 2.4. If you switch to 2.6, udev will be used instead, and should require little or no configuration..
As for the new kernel making it easier to do what you're trying to do, the short answer, in my opinion, is YES. You don't have to wait for hotplug to work, and there's one less script to deal with/worry about as far as getting the needed stuff loaded.
If you felt adventurous, and compiled your own kernel, you could compile all the modules you need right into the kernel, and not need to load ANY modules :)
The same principle applies for the ethernet and for sound: either udev can do it, or you can compile the needed support right into the kernel, or you can use one of the rc.modules scripts to force-load them.
Oh, and finally- the 2.6 kernel is as stable as ever, in my experience, and has somewhat more functionality when one really gets down to details. As with any product, the newer and fresher it is, the more potential for undetected bugs; but I've been using the 2.6.20 kernel for close to a month now, and I'm delighted. Don't take it from me necessarily, there are lots of 2.6 kernels to choose from; do some reading.
The 184.108.40.206 I found to be VERY resilient and stable, easy to work with, and I **think** that's the 2.6 version also included with Slack 11.
For comparison, you could grab the 2.6 source-code for the kernel, compile it using the default configuration which would very likely include all necessary modules for your hardware, and install it as a second kernel, allowing you to choose which one to boot. This way, you can compare them, and see the difference. Nothing is stopping you from having a few different kernels to boot :) instead of "ONLY ONE".
Sounds good then, so where do I get the new kernal, and how do I compile and replace my old one?
Is my current kernal hidden somewhere impossible, or am I lucky, and it is the one in /boot?
And finally, would I only have to replace the kernal file, or would it also need new /etc files?
OK, you're in the us, so go to us.kernel.org or Google 'Linux Kernel'. Kernel.org is the official kernel archives, where you can download all the kernel sources. There **might** be sources on your install disk, but as I recall there aren't.
You'll need to pick a kernel, maybe 2.6.18 or 2.6.17 or 2.6.20, whatever suits you. Remember, there are **potential** problems with super-new stuff, but these ones I suggest have been implemented for some time now, and seem pretty reliable. I have had zero problems with 2.6.20. Also, be sure to download the corresponding MD5 checksum file, so you can verify that your kernel source is untampered with.
The kernel file you will download will be an archive, about 40-50 MB
The kernel isn't hidden at all. It is the one in /boot. it's around 1.3 to 1.9 MB, I can't remember exactly, and is called linux-220.127.116.11-<whatever>. Just leave that there, never remove it, atleast until you have a firm grip on compiling your own. You should ALWAYS keep a known-working kernel and modules installed and bootable. So just ignore that one for the time being.
The majority of the files in /etc will not change, or will change very little, depending on any adjustments you need/decide to make after installing a new kernel. For example, you will eventually not need the rc.hotplug file, so you might choose to remove it, or disable it.
Ultimately, none of the files in /etc will change by themselves except perhaps one called 'kernel-version' but even that you may have to adjust yourself.
As far as changes to any files in /etc, it's up to you. Depends what needs to be done.
As for compiling your new kernel, there are millions of tutorials floating around. Check here on LQ, check in /usr/doc on your system, and use Google. I'll be happy to help along the way, but you should get acquainted with a tutorial first, and have a read. Also, I think the kernel comes with a basic README file: instructions on how to do it.
After compiling the kernel and modules, and installing the modules, you will have to set up the bootloader, so it can find and boot the kernel.
Assuming you are using LILO bootloader, I'd be happy to help you with it. If you use GRUB, I'm not familiar with that one, so you will have to check the man pages or browse some more ;)
Ok, so heres what I did:
-Downloaded 18.104.22.168 kernel
-did "make xconfig"
-did "make install"
Now my sound is not working. How can I tell which kernel I'm running?
OK, nevermind, I figured out which kernel, I'm using 22.214.171.124 Sooooo I still have that sound problem.
Also... whenever I was booting, it didn't print out what it was doing like earlier, is there a way to get it to show me? (I am actually kinda learning stuff from looking at it lol)
Uhhhh.. OK, Make xconfig is good.. And when done, did you SAVE the config you made?
Then 'make' next, that's fine.
But now , should have been make modules (though they probably got auto-made), and then make modules_install.
After that, you would move the fresh kernel to /boot, name it something if you like, and then configure the bootloader.
Typically one doesn't use 'make install', so I can't comment on what exactly that did, but... Are you actually running the new kernel? Possibly so, maybe not. Probably not, unless you configured the bootloader, and if you are, then the sound isn't working maybe because you didn't do make modules_install.
Let me know what's happening now. I was off having a nap :)
Oh, and if it isn't showing you stuff scrolling by during boot, it's likely you forgot to incorporate framebuffer support or support for your video hardware, when you made the kernel.
A good way to make your first kernel, is to use the previously existing .config file from the original kernel, which *should* perhaps be in the /boot directory maybe..
PS - you can also look at all the bootup messages by examining /var/log/dmesg and /var/log/messages
So I ran make modules_install. What should I rerun now, if anything?
Well.. If it says you're running the new kernel, and you now have your modules installed, that's all good.
you don't need to re-run anything after installing the modules. But you may choose to reboot and see if anything gets plugged-in during boot, now that the modules are there.
However, when you boot the machine, you should get a choice of what to boot, either the 2.4 kernel, or your new one. If you don't, it makes me wonder how the machine is booting properly..
In any event, the key now is to find out if everything is working, or if you're missing modules (they aren't getting loaded for example) and to adjust anything you need to as far as the /etc/rc.d/rc.modules scripts.
You should type LSMOD in a terminal and see what modules are loaded.
If your sound isn't working, you may have to run alsamixer (type alsamixer in a root console) and make sure the sound settings are turned ON, and not muted. then if/when done that, escape and type 'alsactl save' and test out the sound system.
Well, I'm running LILO off of a floppy, that immediately boots to Slack. I went back and redid the xconfig. I'm right now redoing make, then after that I will do make modules_install for good measure, then make install
I wont be back till after 630PM CST, so I'll work with anything you give me.
Thanks for the help, I really appreciate it!
Why are you using the floppy? Any particular reason?
Anyhow, , you seem to be getting a grip on this stuff very quickly :) Congrats on that!
I will likely be around this evening, that's about 830 pm my time, so I'll see ya back here.
And I should note, If you notice that stuff isnt working, like the sound, and you can't get it working (or anything else for that matter), You should take a few hours and go thru the entire xconfig, and get acquainted with all the options, especially as there's probably a lot of stuff you could adjust to make the kernel better suited to your needs, and your exact hardware configuration, as well as removing stuff you absolutely don't need. Plus, you can avoid modules entirely by compiling them right into the kernel, OR you can even completely modularize it (well, nearly completely). Lot's of fun to be had, and the satisfaction of knowing your OS and kernel inside out, unlike with some 'other' OS's ;)
I'll leave you to it, and chat later on!
PS - You're welcome, any time.
|All times are GMT -5. The time now is 10:00 PM.|