Skip to content

Commit

Permalink
evdev: disable pressure on the Asus UX302LA touchpad
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
whot committed Sep 26, 2018
1 parent 4bf471f commit b619569
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quirks/50-system-asus.quirks
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions src/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions src/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions src/quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b619569

Please sign in to comment.