usb drive not recognized, maybe timing?
Eugene Crosser
crosser at average.org
Tue Sep 13 11:15:17 PDT 2005
Kay Sievers wrote:
>>>>I have hal 5.0.4 running (with --retain-privileges) on kernel 2.6.13,
>>>>with udev 0.64. When a usb drive is inserted, hald recognizes is as
>>>>"usb_noserial", not as a block device with a filesystem. I suspect that
>>>>it has something to do with "Cannot open" messages in the HAL debug
>>>>output (attached). If I start hald when the USB drive is already
>>>>unserted, it *is* recognized and appears in `lshal' output.
>>>>
>>>>Now, the interesting part. When I manually cat the sys files that hald
>>>>could not open, a few seconds later, most of them are in place and
>>>>perfectly readable. On the other hand, if I watch dmesg, I can see that
>>>>there is a several seconds' pause between "usb-storage: device found at
>>>>20" and final "usb-storage: device scan complete" message. Maybe hald
>>>>is trying to open sysfs files while the kernel did not create them yet?
>>>
>>>
>>>That should be covered by udev managing the whole hotplug process.
>>>Does:
>>> cat /proc/sys/kernel/hotplug
>>>print /sbin/udevsend?
>>
>>Nope, not really. If I put /sbin/udevsend into
>>/proc/sys/kernel/hotplug, USB insertion information never gets to
>>messagebus at all, even as "usb_noserial". This is hald output that I get:
>
> HAL can't work if /proc/sys/kernel/hotplug is not set to /sbin/udevsend
> And the hotplug multiplexing or the udev rules need to plug HAL into the event
> processing. HAL also depends on a specific udev version to be able to "coldplug"
> on startup.
Having read some maillist archieves, I now understand that udev has to
be set up to run "legacy" hotplug scripts, until udev rules are in place
to completely replace "old" hotplug handling. My system (Slackware) is
*not* set up this way (yet?).
> The things are getting more complex and the interdependencies are
> growing with every release. I think the effort for a single person to get it
> running from scratch is much too high, you may better start of with a
> working setup with the packages your distro provides and try to replace
> it part by part if you want to hack on it.
As I already wrote, this is exactly what I am trying to do: make the
setup that comes with my distribution actually *work*. So far, I did
not need to replace any package with a self-compiled one, just tweaking
setup scripts and config files was sufficient.
The trouble is that Slackware comes without HAL. As it does not include
Gnome too, nobody actually needs it. Unless you try to install third
party Gnome (FRG in my case). When you do, you notice that Slackware's
udev does not run in a way required by HAL. Slackware runs
/sbin/hotplug first, and udevsend via
/etc/hotplug.d/default/10-udev.hotplug symlink (the "old way" as I
figure now). Right now, if I put /sbin/udevsend into /proc/.../hotplug,
everything breaks apart (USB modules are not loaded etc.)
Until Patrick can be persuaded to bring this setup up to date, I need
some way make FRG's HAL interoperate with Slackware's udev/hotplug. Now
that I understand more about relation between hotplug and udev, I think
that I'll be able to do that eventually.
Eugene
More information about the hal
mailing list