[PATCH libinput 3/3] udev: add a custom udev rule for X230 touchpads

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 13 15:36:43 PDT 2015


On Mon, Apr 13, 2015 at 04:11:22PM -0400, Benjamin Tissoires wrote:
> On Thu, Apr 9, 2015 at 11:45 PM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > On Thu, Apr 09, 2015 at 01:30:39PM -0400, Benjamin Tissoires wrote:
> >> X230 touchpads should be tagged as LIBINPUT_MODEL_LENOVO_X230 by udev to
> >> apply a different acceleration profile.
> >>
> >> Signed-off-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>
> >> ---
> >>  udev/99-x230.rules |   14 ++++++++++++++
> >>  udev/Makefile.am   |    4 +++-
> >>  2 files changed, 17 insertions(+), 1 deletions(-)
> >>  create mode 100644 udev/99-x230.rules
> >>
> >> diff --git a/udev/99-x230.rules b/udev/99-x230.rules
> >> new file mode 100644
> >> index 0000000..40f08a5
> >> --- /dev/null
> >> +++ b/udev/99-x230.rules
> >> @@ -0,0 +1,14 @@
> >> +ACTION!="add|change", GOTO="x230_touchpad_quirks_end"
> >> +KERNEL!="event*", GOTO="x230_touchpad_quirks_end"
> >> +
> >> +ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="x230_touchpad_quirks_end"
> >> +
> >> +# model specific quirks
> >> +
> >> +# Lenovo X230 have a special touchpad with a low resolution
> >> +
> >> +ATTR{[dmi/id]product_version}=="ThinkPad X230*", \
> >> +  ENV{ID_PATH}=="platform-i8042-serio-*", \
> >> +  ENV{LIBINPUT_MODEL_LENOVO_X230}="1"
> >> +
> >> +LABEL="x230_touchpad_quirks_end"
> >
> > I think this is a bit too specific to the x230, as with the other patch I
> > expect more specific quirks to be necessary. How about naming this file
> > 99-libinput-model-quirks.rules, leave the first two lines in place and make
> > the rule itself:
> >
> > ATTR{[dmi/id]product_version}=="ThinkPad X230*", \
> >   ENV{ID_INPUT_TOUCHPAD}!="", \
> >   ENV{ID_PATH}=="platform-i8042-serio-*", \
> >   ENV{LIBINPUT_MODEL_LENOVO_X230}="1", \
> >   GOTO="libinput_model_quirks_end"
> 
> Works for me (tested on the X230t, and it gets applied).
> 
> Do you want me to resend the series with your changes?

yes please, I just typed that into the email, I didn't test/create a proper
patch. let's way until Friday though to see if we can come up with any
numbers that work better out of the box.

Cheers,
   Peter


More information about the wayland-devel mailing list