[PATCH] xf86ActivateDevice(): Add "Device Node" property to input devices

Peter Hutterer peter.hutterer at who-t.net
Mon May 10 22:57:56 PDT 2010


On Wed, May 05, 2010 at 01:56:46PM +0200, Peter Korsgaard wrote:
> >>>>> "Julien" == Julien Cristau <jcristau at debian.org> writes:
> 
> Hi,
> 
>  >> Add "Device Node" xinput property containing the device node path to
>  >> all input devices with a device property. This is useful to figure out
>  >> the relation between xinput ids and kernel devices.
>  >> 
>  Julien> Why is this something we should expose to clients?  They may
>  Julien> not be on the same machine anyway, and typically the device
>  Julien> path is not stable, so
> 
> It was requested by Peter Hutterer, see:
> 
> http://thread.gmane.org/gmane.comp.freedesktop.xorg.devel/7477/focus=7539

yeah, the reasoning is quite simple here. There's a distinct disconnect
between devices in xorg.conf and the list of devices provided by XI. In
short, you can't map one to the other, it just happens to work because the
device names are predictable with hal/udev.

the server only knows about the device node and can fill this in regardless.
So you have at least some method of mapping from a phys. device to the X
device.

With the phys path Peter proprosed, you get some stable identifier as well
and that can be filled in by the driver. So my idea was to have a property
that contains two strings.

"/dev/input/event0", "PNP0C0D/button/input0"

But phys isn't available on other platforms, so this is my main issue with
the whole lot now, I don't know how to work around this in a (for clients)
sane way. suggestions would be appreciated.

I'm not a big fan of just adding the evdev property, because synaptics and
wacom have the info available as well and I can see wacom making use of it
at some point (synaptics is rather unlikely, but who knows).

Cheers,
  Peter

>  Julien> it seems to me clients can't do much with that information?
> 
> I don't personally have a need for this. What I do need is a stable
> identifier (which xinput ids aren't) to be able to apply per-device
> transformation properties for multihead touchscreen setups - E.G. the
> EVIOCGPHYS stuff in the link above.
> 
> For the use case of this, see my earlier patch:
> 
> http://thread.gmane.org/gmane.comp.freedesktop.xorg.devel/7302
> 


More information about the xorg-devel mailing list