evdev: disable pressure on the Asus UX302LA touchpad

This touchpad stops sending pressure data after the first frame of the second
finger down. If the initial pressure is too light, the finger doesn't get
detected even when the pressure increases in the future.

This thing is from 2014, so let's just disable the pressure axes on it
and skip the pressure-based touch detection code. Let's hope that it doesn't
also have ghost touches on light interactions...

Fixes #145

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-09-20 09:20:18 +10:00
parent 4bf471f514
commit b6195694d8
4 changed files with 21 additions and 0 deletions

View file

@ -9,3 +9,8 @@ ModelTouchpadVisibleMarker=1
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKComputerInc.:pnUX21E:*
AttrPressureRange=24:10
[Asus UX302LA]
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnUX302LA:*
ModelAsusUX302LATouchpad=1

View file

@ -1976,6 +1976,20 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
EV_ABS,
ABS_MT_TOOL_TYPE);
/* Asus UX302LA touchpad doesn't update the pressure values once two
* fingers are down. So let's just pretend it doesn't have pressure
* at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145
*/
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD)) {
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_MT_PRESSURE);
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_PRESSURE);
}
/* Generally we don't care about MSC_TIMESTAMP and it can cause
* unnecessary wakeups but on some devices we need to watch it for
* pointer jumps */

View file

@ -231,6 +231,7 @@ quirk_get_name(enum quirk q)
case QUIRK_MODEL_APPLE_MAGICMOUSE: return "ModelAppleMagicMouse";
case QUIRK_MODEL_APPLE_TOUCHPAD: return "ModelAppleTouchpad";
case QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON: return "ModelAppleTouchpadOneButton";
case QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD: return "ModelAsusUX302LATouchpad";
case QUIRK_MODEL_BOUNCING_KEYS: return "ModelBouncingKeys";
case QUIRK_MODEL_CHROMEBOOK: return "ModelChromebook";
case QUIRK_MODEL_CLEVO_W740SU: return "ModelClevoW740SU";

View file

@ -58,6 +58,7 @@ enum quirk {
QUIRK_MODEL_APPLE_MAGICMOUSE,
QUIRK_MODEL_APPLE_TOUCHPAD,
QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON,
QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD,
QUIRK_MODEL_BOUNCING_KEYS,
QUIRK_MODEL_CHROMEBOOK,
QUIRK_MODEL_CLEVO_W740SU,