This is simultaneously caused by the kernel input subsystem not using
the new driver core, and the changes to udev to obsolete the /etc/dev.d
and /etc/hotplug.d directories.
With the new driver core the driver has an opportunity to add
environment to the uevent[0] generated along with the sysfs information
before the event is sent to userspace via the netlink socket and, for
backwards compatibility, the /proc/sys/kernel/hotplug interface.
However the input subsystem isn't yet doing this, so the sysfs-generated
event doesn't carry any of the PRODUCT, EV, KEY, etc. environment
variables describing the input device.
Instead the input subsystem has its own function to generate the
environment for a call to the /proc/sys/kernel/hotplug helper. This is
done in drivers/input.c input_call_hotplug().
Because this isn't related to the sysfs event, there's no way for it to
include the DEVPATH variable that points to the path in the sysfs
filesystem.
There are patches starting to float around now to update the kernel to
use the new driver core; at this point udev will be able to
drop /proc/sys/kernel/hotplug compatibility completely as all events
will come from the netlink socket and be well-formed.
udev *used* to handle this; when it received an event without the
required variables it would skip any udev.rules processing and just run
the old /etc/hotplug.d/ scripts.
udev-0.059 dropped direct support for these scripts, and instead
included a "udev_run_hotplugd" helper that distributions could chose to
ship alongside and add a udev.rules entry to run it.
This also meant that support for the "malformed" uevents was dropped at
the same time, as there's no way to perform udev.rules checking with
them.
The right solution, long-term, is for the kernel to use the new driver
core for the input subsystem. This will mean all sorts of hacks will go
away, and bring us one step closer to world peace and stuff.
The short term solution we've adopted in Ubuntu is the attached patch
that handles input subsystem events that are missing a devpath by
directly execing udev_run_hotplugd and letting that deal with it.
Scott
[0] the new name for what used to be hotplug events.
--=20
Scott James Remnant
<email address hidden>
Message-Id: <email address hidden>
Date: Sat, 24 Sep 2005 00:13:07 +0100
From: Scott James Remnant <email address hidden>
To: <email address hidden>, Debian Kernel Team <email address hidden>,
Marco d'Itri <email address hidden>
Subject: udev: main: action, subsystem or devpath missing
--=-zi1zEZaOeXx 0Q2S2xJcF "=-HS/xhRS6lqwU ixJxEXED"
Content-Type: multipart/mixed; boundary=
--=-HS/ xhRS6lqwUixJxEX ED Transfer- Encoding: quoted-printable
Content-Type: text/plain
Content-
This is simultaneously caused by the kernel input subsystem not using
the new driver core, and the changes to udev to obsolete the /etc/dev.d
and /etc/hotplug.d directories.
With the new driver core the driver has an opportunity to add kernel/ hotplug interface.
environment to the uevent[0] generated along with the sysfs information
before the event is sent to userspace via the netlink socket and, for
backwards compatibility, the /proc/sys/
However the input subsystem isn't yet doing this, so the sysfs-generated
event doesn't carry any of the PRODUCT, EV, KEY, etc. environment
variables describing the input device.
Instead the input subsystem has its own function to generate the kernel/ hotplug helper. This is hotplug( ).
environment for a call to the /proc/sys/
done in drivers/input.c input_call_
Because this isn't related to the sysfs event, there's no way for it to
include the DEVPATH variable that points to the path in the sysfs
filesystem.
There are patches starting to float around now to update the kernel to kernel/ hotplug compatibility completely as all events
use the new driver core; at this point udev will be able to
drop /proc/sys/
will come from the netlink socket and be well-formed.
udev *used* to handle this; when it received an event without the
required variables it would skip any udev.rules processing and just run
the old /etc/hotplug.d/ scripts.
udev-0.059 dropped direct support for these scripts, and instead
included a "udev_run_hotplugd" helper that distributions could chose to
ship alongside and add a udev.rules entry to run it.
This also meant that support for the "malformed" uevents was dropped at
the same time, as there's no way to perform udev.rules checking with
them.
The right solution, long-term, is for the kernel to use the new driver
core for the input subsystem. This will mean all sorts of hacks will go
away, and bring us one step closer to world peace and stuff.
The short term solution we've adopted in Ubuntu is the attached patch
that handles input subsystem events that are missing a devpath by
directly execing udev_run_hotplugd and letting that deal with it.
Scott
[0] the new name for what used to be hotplug events.
--=20
Scott James Remnant
<email address hidden>
--=-HS/ xhRS6lqwUixJxEX ED Description: Disposition: inline; filename= hotplug_ input_events Transfer- Encoding: base64
Content-
Content-
Content-Type: text/x-patch; charset=UTF-8
Content-
ZGlmZiAtcnVOcCB 1ZGV2LTA2MC5vcm lnL3VkZXYuYyB1Z GV2LTA2MC91ZGV2 LmMNCi0tLSB1ZGV 2 kZXYuYwkyMDA1LT A5LTIzIDIzOjA4O jI1LjM3NDg4MzAw MCArMDEwMA0KKys r kZXYuYwkyMDA1LT A5LTIzIDIzOjIyO jQ1LjAzNDE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
--=-HS/ xhRS6lqwUixJxEX ED--
--=-zi1zEZaOeXx 0Q2S2xJcF pgp-signature; name=signature.asc Description: This is a digitally signed message part
Content-Type: application/
Content-
-----BEGIN PGP SIGNATURE-----
iFMl4yK4RAhKOAJ wPHCWelljZT0EE1 qNl8uFoKFx10QCb BT2C LsjLX3BsGU4Sv0=
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBDNIwDSnQ
irWEYokp/
=qIgA
-----END PGP SIGNATURE-----
--=-zi1zEZaOeXx 0Q2S2xJcF- -