[PATCH evdev] Export device node as property.

Peter Hutterer peter.hutterer at who-t.net
Mon Feb 7 14:56:07 PST 2011


On Fri, Feb 04, 2011 at 06:04:29AM -0800, Dan Nicholson wrote:
> On Fri, Feb 4, 2011 at 5:17 AM, Peter Korsgaard <jacmet at sunsite.dk> wrote:
> >>>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:
> >
> > Hi,
> >
> >  >> I obviously like the concept, but this assumption basically breaks
> >  >> remote X. What I think we really need is a unique identifier for XI
> >  >> devices (to be able to reapply properties at next login), and with
> >  >> hotplugging, the device node isn't really a good choice.
> >  >>
> >  >> For evdev I still think our best bet for a unique identifier is
> >  >> EVIOCGPHYS, like I did back then:
> >  >>
> >  >> http://peter.korsgaard.com/patches/xorg/evdev-add-phys-property-EVIOCGPHYS-as-stable-identifer-v2.patch
> >  >>
> >  >> E.G. use something like usb-0000:00:1d.1-1/input0 rather than
> >  >> /dev/input/event14.
> >
> >  Peter> the reasons why I chose the device node (after some feedback
> >  Peter> from Lennart)
> >
> >  Peter> were:
> >
> >  Peter> - the device node is the only reliable identifier we have in the
> >  Peter>   driver. on any system, irregardless of the platform, the device
> >  Peter>   node will be avaible.
> >
> > Also on Windows / Cygwin?
> >
> >  Peter> - the device node can be tracked back to the configuration
> >  Peter>   backend and the configuration. I configure devices in the
> >  Peter>   xorg.conf with /dev/input/eventX, not through the phys.
> >
> > True. But most people presumably don't hand edit xorg.conf, but rather
> > use gnome-mouse-preferences or whatever.
> >
> > The question is perhaps what the use case for this property is? To
> > easily figure out what xinput id corresponds to a config entry in
> > xorg.conf? The reason I wanted the property was slightly different. As
> > the xinput ids are not stable, I wanted a stable identifier so I can
> > reapply xinput settings at login time (E.G. for the coordinate
> > transformation matrix for multihead touchscreens) through
> > gnome-settings-daemon, similar to how it does for the xrandr setup.
> 
> Maybe another property is needed to satisfy that. What about "Device
> UID", which is string setup by the driver. On evdev, it uses
> EVIOCGPHYS, but it's up to the driver since it has the most details
> about the device. I still think "Device Node" is useful, but I see
> your point about needing a unique identifier. Then
> gnome-settings-daemon can look at the combination of DISPLAY hostname
> and "Device UID" to know which cached settings to grab.

Ok, I missed that we're trying to solve two different use-cases.
Punting a unique device ID into the properties is be quite useful, I've been
struggling for a while with figuring out how to make per-device
configuration work in a sane manner.

However, is the phys path enough here? Users think in physical devices and
we should (if we can) allow for the same device being plugged into a
different port.
 
Cheers,
  Peter


More information about the xorg-devel mailing list