[PATCH evdev] Export device node as property.

Peter Korsgaard jacmet at sunsite.dk
Tue Feb 8 02:55:26 PST 2011


>>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:

Hi,

 >> 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.

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

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

Well, it's atleast part of the identification. Again, we basically have
2 use cases:

1: User plugs in USB device to a different port and wants SAME settings
   applied between sessions

2: User has several of same devices (E.G. my use case is multihead with
   same type of touchscreens) and want DIFFERENT settings for each (but
   persistent over sessions).

For 1, our best bet is probably using the device name as provided by
xinput already, but for 2 we need to look at the phys path (E.G. USB
port for usb devices) to be able to handle the common case of USB
devices without a unique serial number (so EVIOCGUNIQ doesn't give
anything).

The question is if we can come up with a sensible logic for choosing
between name/phys/uniq?

-- 
Bye, Peter Korsgaard


More information about the xorg-devel mailing list