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

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 22 21:36:16 PDT 2015


On Mon, Apr 20, 2015 at 02:29:45PM -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>
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> changes in v4:
> - renamed the file as 90-libinput-model-quirks.rules to give some space for
>   users to add their rules too.

for the archives:
I split the patch out into the bits that add the infrastructure:
http://lists.freedesktop.org/archives/wayland-devel/2015-April/021505.html
so the rest can be rebased on that (v1, anyway, seems like that's what ppl
prefer) and applied as one patch with the udev rules and the accel method in
one go.

Cheers,
   Peter

> 
>  udev/90-libinput-model-quirks.rules |   14 ++++++++++++++
>  udev/Makefile.am                    |    4 +++-
>  2 files changed, 17 insertions(+), 1 deletions(-)
>  create mode 100644 udev/90-libinput-model-quirks.rules
> 
> diff --git a/udev/90-libinput-model-quirks.rules b/udev/90-libinput-model-quirks.rules
> new file mode 100644
> index 0000000..1ff4a05
> --- /dev/null
> +++ b/udev/90-libinput-model-quirks.rules
> @@ -0,0 +1,14 @@
> +ACTION!="add|change", GOTO="libinput_model_quirks_end"
> +KERNEL!="event*", GOTO="libinput_model_quirks_end"
> +
> +# model specific quirks
> +
> +# Lenovo X230 have a special touchpad with a low resolution
> +
> +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"
> +
> +LABEL="libinput_model_quirks_end"
> diff --git a/udev/Makefile.am b/udev/Makefile.am
> index 3691172..9a645c0 100644
> --- a/udev/Makefile.am
> +++ b/udev/Makefile.am
> @@ -6,4 +6,6 @@ libinput_device_group_CFLAGS = $(LIBUDEV_CFLAGS) $(GCC_CFLAGS)
>  libinput_device_group_LDADD = $(LIBUDEV_LIBS)
>  
>  udev_rulesdir=$(UDEV_DIR)/rules.d
> -dist_udev_rules_DATA = 80-libinput-device-groups.rules
> +dist_udev_rules_DATA = \
> +	80-libinput-device-groups.rules \
> +	90-libinput-model-quirks.rules
> -- 
> 1.7.1
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list