mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 13:30:27 +01:00
quirks: add a quirk to ignore unreliable tablet mode switch devices
On the Asus Vivobook Flip 14, the tablet mode switch is unreliable and always on. Instead of marking every device as 'do not suspend', just mark the tablet switch itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
89b9d1bc5a
commit
fdf896a764
5 changed files with 16 additions and 11 deletions
|
|
@ -144,6 +144,8 @@ ModelTouchpadVisibleMarker
|
|||
ModelTabletModeNoSuspend
|
||||
Indicates that the device does not need to be
|
||||
suspended in :ref:`switches_tablet_mode`.
|
||||
ModelTabletModeSwitchUnreliable
|
||||
Indicates that this tablet mode switch's state cannot be relied upon.
|
||||
ModelTrackball
|
||||
Reserved for trackballs
|
||||
ModelBouncingKeys
|
||||
|
|
|
|||
|
|
@ -20,12 +20,7 @@ AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
|
|||
|
||||
# Asus VivoBook Flip 14 TP412UA tablet switch seems misbehaving, always
|
||||
# indicating tablet position
|
||||
[Asus TP412UA Keyboard]
|
||||
MatchName=AT Translated Set 2 keyboard
|
||||
[Asus TP412UA Tablet Mode Switch]
|
||||
MatchName=*Intel Virtual Button*
|
||||
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:*
|
||||
ModelTabletModeNoSuspend=1
|
||||
|
||||
[Asus TP412UA Touchpad]
|
||||
MatchName=*ELAN*Touchpad*
|
||||
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:*
|
||||
ModelTabletModeNoSuspend=1
|
||||
ModelTabletModeSwitchUnreliable=1
|
||||
|
|
|
|||
12
src/evdev.c
12
src/evdev.c
|
|
@ -1785,9 +1785,15 @@ evdev_configure_device(struct evdev_device *device)
|
|||
}
|
||||
|
||||
if (libevdev_has_event_code(evdev, EV_SW, SW_TABLET_MODE)) {
|
||||
device->seat_caps |= EVDEV_DEVICE_SWITCH;
|
||||
device->tags |= EVDEV_TAG_TABLET_MODE_SWITCH;
|
||||
evdev_log_info(device, "device is a switch device\n");
|
||||
if (evdev_device_has_model_quirk(device,
|
||||
QUIRK_MODEL_TABLET_MODE_SWITCH_UNRELIABLE))
|
||||
evdev_log_info(device,
|
||||
"device is an unreliable tablet mode switch.\n");
|
||||
else
|
||||
device->tags |= EVDEV_TAG_TABLET_MODE_SWITCH;
|
||||
|
||||
device->seat_caps |= EVDEV_DEVICE_SWITCH;
|
||||
evdev_log_info(device, "device is a switch device\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ quirk_get_name(enum quirk q)
|
|||
case QUIRK_MODEL_SYSTEM76_GALAGO: return "ModelSystem76Galago";
|
||||
case QUIRK_MODEL_SYSTEM76_KUDU: return "ModelSystem76Kudu";
|
||||
case QUIRK_MODEL_TABLET_MODE_NO_SUSPEND: return "ModelTabletModeNoSuspend";
|
||||
case QUIRK_MODEL_TABLET_MODE_SWITCH_UNRELIABLE: return "ModelTabletModeSwitchUnreliable";
|
||||
case QUIRK_MODEL_TABLET_NO_PROXIMITY_OUT: return "ModelTabletNoProximityOut";
|
||||
case QUIRK_MODEL_TABLET_NO_TILT: return "ModelTabletNoTilt";
|
||||
case QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER: return "ModelTouchpadVisibleMarker";
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ enum quirk {
|
|||
QUIRK_MODEL_SYSTEM76_GALAGO,
|
||||
QUIRK_MODEL_SYSTEM76_KUDU,
|
||||
QUIRK_MODEL_TABLET_MODE_NO_SUSPEND,
|
||||
QUIRK_MODEL_TABLET_MODE_SWITCH_UNRELIABLE,
|
||||
QUIRK_MODEL_TABLET_NO_PROXIMITY_OUT,
|
||||
QUIRK_MODEL_TABLET_NO_TILT,
|
||||
QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue