[PATCH libinput] evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 Carbon 6th gen

Benjamin Tissoires benjamin.tissoires at gmail.com
Fri Apr 20 06:54:31 UTC 2018


On Thu, Apr 19, 2018 at 5:19 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> This device randomly decides that a touch is now a palm, based on
> the moon phase, the user's starsign and possibly what the dog had for
> breakfast. Since libinput assumes that a touchpad that labels a touch as palm
> has reasons to do so, let's unassume this for this device by disabling that
> axis altogether and relying on the touch pressure only.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1565692
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---

LGTM:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>

Cheers,
Benjamin

>  src/evdev.c                        | 8 ++++++++
>  src/evdev.h                        | 1 +
>  udev/90-libinput-model-quirks.hwdb | 4 ++++
>  3 files changed, 13 insertions(+)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 2a4682c7..95351082 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -1285,6 +1285,7 @@ evdev_read_model_flags(struct evdev_device *device)
>                 MODEL(MS_NANO_TRANSCEIVER),
>                 MODEL(TABLET_NO_TILT),
>                 MODEL(TABLET_MODE_NO_SUSPEND),
> +               MODEL(LENOVO_CARBON_X1_6TH),
>  #undef MODEL
>                 { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL },
>                 { NULL, EVDEV_MODEL_DEFAULT },
> @@ -1908,6 +1909,13 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
>                 libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_X);
>                 libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_Y);
>         }
> +
> +       /* Lenovo Carbon X1 6th gen sends bogus ABS_MT_TOOL_TYPE events for
> +        * MT_TOOL_PALM */
> +       if (device->model_flags & EVDEV_MODEL_LENOVO_CARBON_X1_6TH)
> +               libevdev_disable_event_code(device->evdev,
> +                                           EV_ABS,
> +                                           ABS_MT_TOOL_TYPE);
>  }
>
>  static void
> diff --git a/src/evdev.h b/src/evdev.h
> index 5495e94d..d1290610 100644
> --- a/src/evdev.h
> +++ b/src/evdev.h
> @@ -113,6 +113,7 @@ enum evdev_device_model {
>         EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10),
>         EVDEV_MODEL_LOGITECH_K400 = (1 << 11),
>         EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12),
> +       EVDEV_MODEL_LENOVO_CARBON_X1_6TH = (1 << 13),
>         EVDEV_MODEL_CYBORG_RAT = (1 << 14),
>         EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16),
>         EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
> diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
> index 33676d4e..9dcb38e3 100644
> --- a/udev/90-libinput-model-quirks.hwdb
> +++ b/udev/90-libinput-model-quirks.hwdb
> @@ -245,6 +245,10 @@ libinput:name:*ALPS TrackPoint*:svnLENOVO:*:pvrThinkPadX280:*
>  libinput:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:*pvrThinkPadX1Yoga1st:*
>   LIBINPUT_MODEL_TABLET_MODE_NO_SUSPEND=1
>
> +# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device)
> +libinput:name:Synaptics TM3288-010:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:*
> + LIBINPUT_MODEL_LENOVO_CARBON_X1_6TH=1
> +
>  ##########################################
>  # Logitech
>  ##########################################
> --
> 2.14.3
>


More information about the wayland-devel mailing list