Some devices require special tagging to apply device-dependent configuration in X. One example are the Dell Mini touchpads that have the buttons inside the active touchpad area, causing cursor jumps and other inconveniences. X checks INPUT_ID.tags for matches in the xorg.conf.d snippets, so check the product_name and apply the tag accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@xxxxxxxxx> --- I kind-of expect some more tags like this to appear in the future, so I figured the generic name touchpad-quirks is better than have a dell-specific one. Would something like this be appreciated in the upstream repo? Looking at the Ubuntu sources for the synaptics driver, the choice there is to simply tag with the model name (e.g. "inspiron_1011") and then have the xorg.conf hook onto this. There's two sides to it, the Ubuntu approach is more flexible if other configuration options are needed too, the approach here only requires updating udev for new models but not Xorg. Any preferences? Makefile.am | 1 + extras/input_id/70-touchpad-quirks.rules | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 extras/input_id/70-touchpad-quirks.rules diff --git a/Makefile.am b/Makefile.am index 8d13f19..18da70a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -242,6 +242,7 @@ dist_udevrules_DATA += extras/floppy/60-floppy.rules extras_input_id_input_id_SOURCES = extras/input_id/input_id.c extras_input_id_input_id_LDADD = libudev/libudev-private.la libexec_PROGRAMS += extras/input_id/input_id +dist_udevrules_DATA += extras/input_id/70-touchpad-quirks.rules # ------------------------------------------------------------------------------ # path_id - compose identifier of persistent elements of the parent buses diff --git a/extras/input_id/70-touchpad-quirks.rules b/extras/input_id/70-touchpad-quirks.rules new file mode 100644 index 0000000..6c65c29 --- /dev/null +++ b/extras/input_id/70-touchpad-quirks.rules @@ -0,0 +1,15 @@ +ACTION!="add|change", GOTO="touchpad_quirks_end" +KERNEL!="event*", GOTO="touchpad_quirks_end" + +ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="touchpad_quirks_end" + +# model specific quirks + +# Dell Minis have a touchpad where the buttons and the touchpad area +# overlap. Clicking a button thus moves the pointer, this requires special +# Xorg configuration. + +ATTR{[dmi/id]product_name}=="Inspiron 1011|Inspiron 1012", \ + ENV{ID_INPUT.tags}="touchpad_button_overlap" + +LABEL="touchpad_quirks_end" -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html