# Do not edit this file, it will be overwritten on update
#
# This file contains hwdb matches for libinput model-specific quirks.
# The contents of this file are a contract between libinput, udev rules and
# the hwdb.
# IT IS NOT A STABLE API AND SUBJECT TO CHANGE AT ANY TIME

# The lookup keys are composed in:
#	90-libinput-model-quirks.rules
#
# Match string formats:
#	libinput:mouse:<modalias>
#	libinput:touchpad:<modalias>
#	libinput:name:<name>:dmi:<dmi string>
#	libinput:name:<name>:dt:<device-tree string>
#	libinput:name:<name>:fwversion:<version>
#
# Sort by brand, model

##########################################
# Chassis types 9 (Laptop) and 10
# (Notebook) are expected to have working
# lid switches
##########################################
libinput:name:*Lid Switch*:dmi:*:ct10:*
libinput:name:*Lid Switch*:dmi:*:ct9:*
 LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=reliable

##########################################
# Serial keyboards are internal
##########################################
libinput:keyboard:input:b0011v*
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal

##########################################
# ALPS
##########################################
libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:dmi:*
libinput:name:*AlpsPS/2 ALPS GlidePoint:dmi:*
 LIBINPUT_MODEL_ALPS_TOUCHPAD=1

libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
 LIBINPUT_ATTR_SIZE_HINT=100x55

##########################################
# Apple
##########################################
libinput:touchpad:input:b0003v05ACp*
libinput:touchpad:input:b0005v05ACp*
 LIBINPUT_MODEL_APPLE_TOUCHPAD=1
 LIBINPUT_ATTR_SIZE_HINT=104x75
 LIBINPUT_ATTR_TOUCH_SIZE_RANGE=150:130
 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=800

libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:*
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal

libinput:mouse:input:b0005v05ACp030D*
 LIBINPUT_MODEL_APPLE_MAGICMOUSE=1

# Apple Magic Trackpad v1 (2010, clickpad)
libinput:touchpad:input:b0005v05ACp030E*
 LIBINPUT_ATTR_SIZE_HINT=130x110
 LIBINPUT_ATTR_TOUCH_SIZE_RANGE=20:10
 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=900

libinput:touchpad:input:b0003v05ACp021A*
 LIBINPUT_MODEL_APPLE_TOUCHPAD_ONEBUTTON=1

##########################################
# Asus
##########################################
libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKCOMPUTERINC.:pnX555LAB:*
 LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER=1

##########################################
# Chicony
##########################################
# Acer Hawaii Keyboard, uses Chicony VID
libinput:touchpad:input:b0003v04F2p1558*
 LIBINPUT_ATTR_TPKBCOMBO_LAYOUT=below

##########################################
# Cyborg
##########################################
# Saitek Cyborg R.A.T.5 Mouse
libinput:mouse:input:b0003v06A3p0CD5*
 LIBINPUT_MODEL_CYBORG_RAT=1

##########################################
# Dell
##########################################
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnDellInc.:*
libinput:name:* Touchpad:dmi:*svnDellInc.:*
 LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER=1

libinput:name:*AlpsPS/2 ALPS GlidePoint:dmi:*svnDellInc.:pnLatitudeE6220:*
 LIBINPUT_ATTR_PRESSURE_RANGE=100:90

libinput:name:*CyPS/2 Cypress Trackpad:dmi:*svnDell*:*XPSL322X*
 LIBINPUT_ATTR_PRESSURE_RANGE=30:20
 LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=254

##########################################
# Elantech
##########################################
libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*
 LIBINPUT_ATTR_RESOLUTION_HINT=31x31
 LIBINPUT_ATTR_PRESSURE_RANGE=10:8

libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKComputerInc.:pnUX21E:*
 LIBINPUT_ATTR_PRESSURE_RANGE=24:10

libinput:name:*Elan Touchpad*:dt:*
 LIBINPUT_ATTR_PRESSURE_RANGE=10:8

libinput:name:*Elan Touchpad*:dt:*Chrombook R13*
libinput:name:*Elan Touchpad*:dt:*CB5-312T*
libinput:name:*Elan Touchpad*:dt:*Elm*
 LIBINPUT_ATTR_PRESSURE_RANGE=6:4

##########################################
# Google
##########################################

# The various chromebooks, info from modinfo chromeos_laptop, touchpad names
# extrapolated from the chromiumos touchad-tests repo
# https://chromium.googlesource.com/chromiumos/platform/touchpad-tests
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pnFalco:pvr*
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Mario*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Butterfly*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Peppy*
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*ZGB*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Parrot*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*bvn*coreboot*:pn*Leon*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*bvn*coreboot*:pn*Falco*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*bvn*coreboot*:pn*Wolf*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*svn*GOOGLE*:pn*Link*
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Alex*
libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*svn*SAMSUNG*:pn*Lumpy*
libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*
 LIBINPUT_MODEL_CHROMEBOOK=1

libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
 LIBINPUT_ATTR_PRESSURE_RANGE=10:8

##########################################
# HP
##########################################

# HP Compaq6910p
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
 LIBINPUT_MODEL_HP6910_TOUCHPAD=1

# HP Compaq 8510w
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
 LIBINPUT_MODEL_HP8510_TOUCHPAD=1

# HP Pavillion dm4
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPPaviliondm4NotebookPC*
 LIBINPUT_MODEL_HP_PAVILION_DM4_TOUCHPAD=1

# HP Stream 11
libinput:name:SYN1EDE:00 06CB:7442:dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
 LIBINPUT_MODEL_HP_STREAM11_TOUCHPAD=1

# HP Zbook Studio G3
libinput:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnHP:pnHPZBookStudioG3:*
 LIBINPUT_MODEL_HP_ZBOOK_STUDIO_G3=1

##########################################
# HUION
##########################################
#
# HUION PenTablet device. Some of these devices send a BTN_TOOL_PEN event
# with value 1 on the first event received by the device but never send the
# matching BTN_TOOL_PEN value 0 event. The device appears as if it was
# permanently in proximity.
#
# HUION re-uses USB IDs for its devices, not every HUION tablet is
# affected by this bug, libinput will auto-disable this feature
libinput:tablet:input:b0003v256Cp*
 LIBINPUT_MODEL_TABLET_NO_PROXIMITY_OUT=1

##########################################
# LENOVO
##########################################

# X220 after a bios update updating the touchpad firmware version to 8.1
# See https://bugzilla.redhat.com/show_bug.cgi?id=1264453 for details
# If the touchpad is unresponsive and dmesg includes this line
# 	psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1 [...]
# then copy the two lines below into a new file
# /etc/udev/hwdb.d/90-libinput-x220-touchpad-fw81.hwdb, then run
# sudo udevadm hwdb --update and reboot.
#
# Copy the two lines below:
#libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX220*
# LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81=1

# X230 (Tablet)
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230*
 LIBINPUT_MODEL_LENOVO_X230=1

# T440p on PS/2
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadT440p*
# T440p on RMI4
libinput:name:Synaptics tm2964-001:dmi:*svnLENOVO:*:pvrThinkPadT440p*
 LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1

# T440s trackpoint
libinput:name:TPPS/2 IBM TrackPoint:dmi:*svnLENOVO:*:pvrThinkPadT440s*
 LIBINPUT_ATTR_TRACKPOINT_RANGE=30

# T450s trackpoint
libinput:name:TPPS/2 IBM TrackPoint:dmi:*svnLENOVO:*:pvrThinkPadT450s*
 LIBINPUT_ATTR_TRACKPOINT_RANGE=50

# Lenovo T450/T460 and all other Lenovos of the *50 and *60 generation,
# including the X1 Carbon 3rd gen
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadP50*:
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*:
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*:
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
 LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
 LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=150

# Lenovo ThinkPad Compact USB Keyboard with TrackPoint
libinput:keyboard:input:b0003v17EFp6047*
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external

# Lenovo X280
libinput:name:*ALPS TrackPoint*:svnLENOVO:*:pvrThinkPadX280:*
 LIBINPUT_ATTR_TRACKPOINT_RANGE=70

# Lenovo Thinkpad X1 Yoga disables the keyboard anyway but has the same device
# use a windows key on the screen and volume rocker on the side (#103749)
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
##########################################
libinput:name:*Logitech M570*:dmi:*
 LIBINPUT_MODEL_TRACKBALL=1

# Logitech Marble Mouse trackball
libinput:mouse:input:b0003v046DpC408*
 LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE=1

# Logitech K400
libinput:mouse:input:b0003v046Dp4024*
 LIBINPUT_MODEL_LOGITECH_K400=1

##########################################
# Microsoft
##########################################
# Surface3 needs us to write the open lid switch event
libinput:name:*Lid Switch*:dmi:*svnMicrosoftCorporation:pnSurface3:*
 LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=write_open

# Surface 3 Type Cover keyboard
libinput:name:*Microsoft Surface Type Cover Keyboard*:dmi:*svnMicrosoftCorporation:pnSurface3:*
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal

# Microsoft Microsoft® Nano Transceiver v2.0"
libinput:mouse:input:b0003v045Ep0800*
 LIBINPUT_MODEL_MS_NANO_TRANSCEIVER=1

##########################################
# Razer
##########################################
libinput:keyboard:input:b0003v1532p0220*
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal

libinput:name:*Lid Switch*:dmi:*svnRazer:pnBlade*
 LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=write_open

##########################################
# Synaptics
##########################################
libinput:touchpad:input:b0011v0002p0007*
 LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1

##########################################
# System76
##########################################

# Bonobo Professional
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrbonp5*
 LIBINPUT_MODEL_SYSTEM76_BONOBO=1

# Clevo
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pnW740SU*rnW740SU*
 LIBINPUT_MODEL_CLEVO_W740SU=1

# Galago Ultra Pro
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrgalu1*
 LIBINPUT_MODEL_SYSTEM76_GALAGO=1

# Kudu Professional
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrkudp1*
 LIBINPUT_MODEL_SYSTEM76_KUDU=1

##########################################
# Wacom
##########################################
libinput:touchpad:input:b0003v056Ap*
 LIBINPUT_MODEL_WACOM_TOUCHPAD=1

##########################################
# Anything that has trackball in the name
##########################################
libinput:name:*Trackball*:dmi:*
 LIBINPUT_MODEL_TRACKBALL=1

