LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   the truth about hotplug (https://www.linuxquestions.org/questions/slackware-14/the-truth-about-hotplug-277496/)

kersten78 01-13-2005 05:36 PM

the truth about hotplug
 
I have been trying to figure out hotplugging for a while now, and I can't really come to a good understanding of it. I've experimented with it from disabling certain agents, to disabling it all together. I've read up what I can comprehend on the sourceforge hotplug site, googled it, etc, and I just can't seem to find any concrete info.

Here's the problem: it takes forever during boot

I don't have anything blacklisted, as I don't have any errors. I've experimented with disabling agents and the rc.hotplug script in various combinations. So far, even with it completely disabled it seems to have no effect on my system. It boots faster, all my hardware works, etc. But from what I've read about disabling it, I won't be able to plug anything into my computer while it's running and be able to use it.

What I'd like to do is scale it down to the point that it doesn't bother with detecting all the hardware that is already supported by my kernel config. I'd basically like it to do nothing during the boot process, while leaving it active so it will still work if I plug in a digital camera or a different mouse, a pda, etc. Basically what it amounts to is I want to be able to hotlpug usb devices.

I looked through /etc/hotplug.d/default.hotplug, and it looks like it just looks for the various agents found in /etc/hotplug/ But disabling them doesn't seem to have any effect at boot. And the /etc/rc.d/rc.hotplug script just looks for *.rc files in /etc/hotplug/. The only .rc files there are input.rc, pci.rc, and usb.rc. I'm wondering if I can just disable or rename the input.rc and pci.rc files so the usb.rc script is the only one that rc.hotplug finds.

I have no idea if this is the right way to approach this, or if I'm completely off base.

If anyone can point me in the right direction or post a link that explains it a little better, please let me know. I'm clueless so far.

Thanks in advance.

egag 01-13-2005 05:44 PM

---------
But from what I've read about disabling it, I won't be able to plug anything into my computer while it's running and be able to use it.
---------

i think that's not true. hotplug loads modules, udev makes the devices.
you can ( correct me if i'm wrong ? ) load all modules you need in rc.modules, and leave out hotplug.

when you plug-in smth. in a usb conn. ,a device will be made and you can use it....( if the modules are there )

egag

kersten78 01-13-2005 06:01 PM

Well, i was reading a bit more about the agents. It sounds like the agents are the part that loads the appropriate driver/module when you plug something in after you boot. It sounds like the *.rc files in /etc/hotplug just configure everything that's already plugged in at boot. But if they're already built in to the kernel or loaded as modules, it sounds like you won't need hotplug to see them during the boot.

egag, so basically I can just build and load the appropriate modules for the things I know i might need and forget about hotplug? If that's the case, then I think I'm set. I just built 2.6.10 and included support for the few extra things that I use. It's not like I have a basket full of random gadgets that I plug into my computer to see if they work....there's just a few things I use on occasion. I'll have to experiment a bit more and see how it works. Thanks.

egag 01-13-2005 06:14 PM

well...if i were you i'd just try it.
i think hotplug is meant for " universal " kernels with lots of modules ( like the startup kernels supplied on disc), to boot on a variety of hardware-combinations.

if you build your own kernel/modules you can do without that.
( you know what you need... )

hope you'll post if all works... ( or not :) )

egag

kersten78 01-13-2005 11:09 PM

Well, I have a bit of an update. I'm currently working with hotplug completely disabled. chmod ugo-x /etc/rc.hotplug. Boot is noticeably faster (obviously:D). Unfortunately I haven't been able to test a whole lot of devices. I plugged in a USB game controller pad thing that I never use. It was immediately recognized and listed in "cat /proc/input/devices" with appropriate usb address, etc. As I didn't have any game installed to see if it actually worked, I decided to try an additional USB mouse. I plugged it into the same port, alongside my usual mouse, and /proc/input/devices was immediately updated with new information about the mouse. Better yet, it worked....instantly....with my other mouse. I would really like to see if I can plug in the digital camera and mount the device to get pics, but the battery is dead. And I can't find the adapter. As soon as I do, I'll try it out and post back. But so far, things are looking good for running without hotplug. I'll let you know if anything changes. In the meantime, I'm going to scour the house for more things to try out.

brancalessio 01-14-2005 04:28 AM

I know you problem (unfortunately).

I installed Slackware on three computer: 9.1 on two desktops and 10.0 on a laptop. On the two desktops it takes a while to start, on the laptop it takes quite a long time instead.

Since the hotplug script does nothing other than loading the appropriate modules for devices already found by the kernel (eventually on boot), the answer should be that one or more of these modules takes a lot to load...

I think the problem is with the pcmcia (more or less the only difference with the three computers). What kind of computer is yours?


I confirm that you can disable hotplug and edit rc.modules to have the right modules loaded (of course you must know what these modules are and take care that when you plug a flash pen o a usb cdwriter usually hotplug loads some other modules). So you are compelled to load modules which you are not using... this is not a good thing.

Bye!


All times are GMT -5. The time now is 04:58 PM.