Commit 5792af9a by Peter Hutterer

Implement a quirks system to replace the udev property parsing

Previously, we had all extra device information ("This is an Apple Touchpad", "This touchpad causes pointer jumps", etc.) in the udev hwdb. The problem with the hwdb is that updating it is nontrivial for the average user and debugging when things go wrong is even harder. Plus, the hwdb has a matching scheme that is unpredictable unless one is familiar with the implementation. This patch set moves the hwdb entries into .ini style text files, with a simple line-based parser. A new libinput list-quirks tool can list the quirks applied to any given device, in --verbose mode it prints all matches as they apply or not apply. The data files are currently unused by libinput, that comes in a later patch. They're installed though, the defaults point to the /usr/share/libinput directory and for *temporary* local overrides the single file /etc/libinput/local-overrides.quirks. Failure to parse any file is a hard failure for the quirks system, but if the local override file doesn't exist that's fine. THIS IS NOT A CONFIGURATION INTERFACE! None of these settings are exposed via the libinput_device_config_* calls. There is no API guarantee for these files, think of them as source code. Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent be647fbb
[Serial Keyboards]
MatchUdevType=keyboard
MatchBus=ps2
AttrKeyboardIntegration=internal
[Lid Switch Ct9]
MatchName=*Lid Switch*
MatchDMIModalias=dmi:*:ct9:*
AttrLidSwitchReliability=reliable
[Lid Switch Ct10]
MatchName=*Lid Switch*
MatchDMIModalias=dmi:*:ct10:*
AttrLidSwitchReliability=reliable
[Trackball]
MatchName=*Trackball*
ModelTrackball=1
[Aiptek No Tilt Tablet]
MatchUdevType=tablet
MatchBus=usb
MatchVendor=0x08CA
ModelTabletNoTilt=1
[AlpsTouchpadDualPoint]
MatchUdevType=touchpad
MatchName=*AlpsPS/2 ALPS DualPoint TouchPad
ModelALPSTouchpad=1
[AlpsTouchpadGlidePoint]
MatchUdevType=touchpad
MatchName=*AlpsPS/2 ALPS GlidePoint
ModelALPSTouchpad=1
[Cyapa Touchpads]
MatchName=*Cypress APA Trackpad ?cyapa?
AttrPressureRange=10:8
[Elantech Touchpads]
MatchName=*Elantech Touchpad*
AttrResolutionHint=31x31
AttrPressureRange=10:8
# 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
[HUION PenTablet]
MatchUdevType=tablet
MatchBus=usb
MatchVendor=0x256C
ModelTabletNoProximityOut=1
# IBM/Lenovo Scrollpoint mouse. Instead of a scroll wheel these mice
# feature trackpoint-like sticks which generate a huge amount of scroll
# events that need to be handled differently than scroll wheel events
[IBM ScrollPoint Mouse 3100]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3100
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3103]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3103
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3105]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3105
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3108]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3108
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3109]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3109
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 6049]
MatchUdevType=mouse
MatchVendor=0x17EF
MatchProduct=0x6049
ModelLenovoScrollPoint=1
[Logitech M570]
MatchName=*Logitech M570*
ModelTrackball=1
[Logitech Marble Mouse Trackball]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x46D
MatchProduct=0xC408
ModelLogitechMarbleMouse=1
[Logitech K400]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x046D
MatchProduct=0x4024
ModelBouncingKeys=1
[Logitech K400r]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x046D
MatchProduct=0x404B
ModelBouncingKeys=1
[Logitech K830]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x046D
MatchProduct=0x404C
ModelBouncingKeys=1
[Logitech K400Plus]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x046D
MatchProduct=0x404D
ModelBouncingKeys=1
[Logitech Wireless Touchpad]
MatchBus=usb
MatchVendor=0x046D
MatchProduct=0x4011
AttrPalmPressureThreshold=400
[Microsoft Surface 3 Lid Switch]
MatchName=*Lid Switch*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:pnSurface3:*
AttrLidSwitchReliability=write_open
[Microsoft Surface 3 Type Cover Keyboard]
MatchName=*Microsoft Surface Type Cover Keyboard*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:pnSurface3:*
AttrKeyboardIntegration=internal
[Microsoft Nano Transceiver v2.0]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x045E
MatchProduct=0x8000
ModelBouncingKeys=1
[Razer Blade Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x1532
MatchProduct=0x0220
AttrKeyboardIntegration=internal
[Razer Blade Lid Switch]
MatchName=*Lid Switch*
MatchDMIModalias=dmi:*svnRazer:pnBlade*
AttrLidSwitchReliability=write_open
[Synaptics Serial Touchpads]
MatchUdevType=touchpad
MatchBus=ps2
MatchVendor=0x0002
MatchProduct=0x0007
ModelSynapticsSerialTouchpad=1
[Wacom Touchpads]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x056A
ModelWacomTouchpad=1
[Wacom Intuos Pro PTH660]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x056A
MatchProduct=0x0357
AttrPalmSizeThreshold=1
[Apple Touchpads USB]
MatchVendor=0x05AC
MatchBus=usb
MatchUdevType=touchpad
ModelAppleTouchpad=1
AttrSizeHint=104x75
AttrTouchSizeRange=150:130
AttrPalmSizeThreshold=800
[Apple Touchpads Bluetooth]
MatchVendor=0x05AC
MatchBus=bluetooth
MatchUdevType=touchpad
ModelAppleTouchpad=1
[Apple Internal Keyboard]
MatchName=*Apple Inc. Apple Internal Keyboard*
AttrKeyboardIntegration=internal
[Apple MagicMouse]
MatchUdevType=mouse
MatchBus=bluetooth
MatchVendor=0x05AC
MatchProduct=0x030D
ModelAppleMagicMouse=1
[Apple Magic Trackpad v1 (2010, clickpad)]
MatchUdevType=touchpad
MatchBus=bluetooth
MatchVendor=0x5AC
MatchProduct=0x030E
AttrSizeHint=130x110
AttrTouchSizeRange=20:10
AttrPalmSizeThreshold=900
[Apple Touchpad OneButton]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x5AC
MatchProduct=0x021A
ModelAppleTouchpadOneButton=1
[Apple Touchpad MacbookPro5,5]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x05AC
MatchProduct=0x0237
AttrPalmSizeThreshold=1000
[Asus X555LAB]
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnX555LAB:*
ModelTouchpadVisibleMarker=1
[Asus UX21E]
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKComputerInc.:pnUX21E:*
AttrPressureRange=24:10
# Acer Hawaii Keyboard, uses Chicony VID
[Acer Hawaii Keyboard]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x4F2
MatchProduct=0x1558
AttrTPKComboLayout=below
[Saitek Cyborg RAT5]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x06A3
MatchProduct=0x0CD5
ModelCyborgRat=1
[Dell Touchpads]
MatchName=* Touchpad
MatchDMIModalias=dmi:*svnDellInc.:*
ModelTouchpadVisibleMarker=1
[Dell Lattitude E6220]
MatchName=*AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6220:*
AttrPressureRange=100:90
[Dell XPS L322X]
MatchName=*CyPS/2 Cypress Trackpad
MatchDMIModalias=dmi:*svnDell*:XPSL322X*
AttrPressureRange=32:20
AttrPalmPressureThreshold=254
[Google Chromebook R13 CB5-312T]
MatchName=*Elan Touchpad*
MatchDeviceTree=*Chromebook R13 CB5-312T*
AttrPressureRange=6:4
[Google Chromebook CB5-312T]
MatchName=*Elan Touchpad*
MatchDeviceTree=*CB5-312T*
AttrPressureRange=6:4
[Google Chromebook Elm]
MatchName=*Elan Touchpad*
MatchDeviceTree=*Elm*
AttrPressureRange=6:4
[Google Chromebook Falco]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*pn*Falco*
ModelChromebook=1
[Google Chromebook Mario]
MatchUdevType=touchpad
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*pn*Mario*
ModelChromebook=1
[Google Chromebook Butterfly]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*pn*Butterfly*
ModelChromebook=1
[Google Chromebook Peppy]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*pn*Peppy*
ModelChromebook=1
[Google Chromebook ZGB]
MatchUdevType=touchpad
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*pn*ZGB*
ModelChromebook=1
[Google Chromebook Parrot]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*pn*Parrot*
ModelChromebook=1
[Google Chromebook Leon]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*bvn*coreboot*:pn*Leon*
ModelChromebook=1
[Google Chromebook Wolf]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*bvn*coreboot*:pn*Wolf*
ModelChromebook=1
[Google Chromebook Link]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*svn*GOOGLE*:pn*Link*
ModelChromebook=1
[Google Chromebook Alex]
MatchUdevType=touchpad
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*pn*Alex*
ModelChromebook=1
[Google Chromebook Lumpy]
MatchUdevType=touchpad
MatchName=Cypress APA Trackpad ?cyapa?
MatchDMIModalias=dmi:*svn*SAMSUNG*:pn*Lumpy*
ModelChromebook=1
[Google Chromebook Samus]
MatchUdevType=touchpad
MatchName=Atmel maXTouch Touchpad
MatchDMIModalias=dmi:*svn*GOOGLE*:pn*Samus*
ModelChromebook=1
[HP Compaq 6910p]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
ModelHP6910Touchpad=1
[HP Compaq 8510w]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
ModelHP8510Touchpad=1
[HP Pavillion dmi4]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPPaviliondm4NotebookPC*
ModelHPPavilionDM4Touchpad=1
[HP Stream 11]
MatchName=SYN1EDE:00 06CB:7442
MatchDMIModalias=dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
ModelHPStream11Touchpad=1
[HP ZBook Studio G3]
MatchName=AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*svnHP:pnHPZBookStudioG3:*
ModelHPZBookStudioG3=1
[Lenovo Thinkpad Touchpad]
MatchName=*Synaptics*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:*
AttrThumbPressureThreshold=100
[Lenovo x230 Touchpad]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
ModelLenovoX230=1
[Lenovo T440p Touchpad PS/2]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1
[Lenovo T440p Touchpad RMI4]
MatchName=Synaptics tm2964-001
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1
[Lenovo T440s Trackpoint]
MatchName=TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440s*
AttrTrackpointRange=30
[Lenovo T440s Trackpoint]
MatchName=TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT450s*
AttrTrackpointRange=50
[Lenovo P50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP50*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150
[Lenovo *50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??50*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150
[Lenovo *60 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??60*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150
[Lenovo X1 Carbon 3rd Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150
[Lenovo ThinkPad Compact USB Keyboard with TrackPoint]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x6047
AttrKeyboardIntegration=external
[Lenovo X280 Trackpoint]
MatchName=*ALPS TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX280:*
AttrTrackpointRange=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)
[Lenovo Thinkpad X1 Yoga]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Yoga1st:*
ModelTabletModeNoSuspend=1
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device)
[Lenovo Carbon X1 6th gen]
MatchName=Synaptics TM3288-010
MatchDMIModalias=dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:*
ModelLenovoCarbonX16th=1
[System76 Bonobo Professional]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnSystem76*pvrbonp5*
ModelSystem76Bonobo=1
[System76 Clevo]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*pnW740SU*rnW740SU*
ModelClevoW740SU=1
[System76 Galago Ultra Pro]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnSystem76*pvrgalu1*
ModelSystem76Galago=1
[System76 Kudu Professional]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnSystem76*pvrkudp1*
ModelSystem76Kudu=1
= libinput data file format =
This directory contains hardware quirks used by libinput to work around bugs
in the hardware, device behavior and to supply information not obtained
through the kernel device.
**THIS IS NOT STABLE API**
The data format may change at any time. If your data file is not part of the
libinput git tree, do not expect it to work after an update. Absolutely no
guarantees are made for backwards-compatibility.
**THIS IS NOT A CONFIGURATION API**
Use the `libinput_device_config_foo()` functions for device configuration.
The quirks are hardware quirks only.
== Data file naming ==
Data files are read in versionsort order, read order determines how values
override each other. A values read later override previously values. The
current structure is 10-generic-foo.quirks for generic settings,
30-vendor-foo.quirks for vendor-specific settings and 50-system-foo.quirks
for system vendors. This is not a fixed naming scheme and may change at any
time. It's an approximation only because some vendors are also system
vendors, e.g. Microsoft makes devices and laptops.
Laptop-specific quirks should always go into the laptop vendor's file.
== Sections, matches and values ==
A data file must contain at least one section, each section must have at
least one `Match` tag and at least one of either `Attr` or `Model`. Section
names are free-form and may contain spaces.
```
# This is a comment
[Some touchpad]
MatchBus=usb
# No quotes around strings
MatchName=*Synaptics Touchpad*
AttrSizeHint=50x50
ModelSynapticsTouchpad=1
[Apple touchpad]
MatchVendor=0x5AC
MatchProduct=0x123
ModelAppleTouchpad=1
```
Comments are lines starting with `#`.
All `Model` tags take a value of either `1` or `0`.
All `Attr` tag values are specific to that attribute.
== Parser errors ==
The following will cause parser errors and are considered invalid data
files:
* Whitespace at the beginning of the line
* Inline comments, e.g. `MatchBus=usb # oops, fail`
* Sections without at least one `Match*` entry
* Sections with the same `Match*` entry repeated
* Sections without at least one of `Model*` or `Attr` entries
* A `Model` tag with a value other than `1` or `0`
* A string property with enclosing quotes
== Debugging ==
When modifying a data file, use the `libinput list-quirks` tool to
verify the changes. The tool can be pointed at the data directory to
analyse, use `--verbose` to get more info. For example:
```
libinput list-quirks --data-dir /path/to/git/repo/data/ --verbose /dev/input/event0
```
/**
@page device-quirks Device quirks
libinput requires extra information from devices that is not always readily
available. For example, some touchpads are known to have jumping cursors
under specific conditions. libinput ships a set of files containting the
so-called model quirks to provide that information. Model quirks are usually
installed under `/usr/share/libinput/<filename>.quirks` and are standard
`.ini` files. A file may contain multiple section headers (`[some
identifier]`) followed by one or more `MatchFoo=Bar` directives, followed by
at least one of `ModelFoo=1` or `AttrFoo=bar` directive. See the
`data/README.md` file in the libinput source repository for more details on
their contents.
@note Model quirks are internal API and may change at any time. No
backwards-compatibility is guaranteed.
For example, a quirks file may have this content to label all keyboards on
the serial bus (PS/2) as internal keyboards:
@verbatim
[Serial Keyboards]
MatchUdevType=keyboard
MatchBus=serial
AttrKeyboardIntegration=internal
@endverbatim
The model quirks are part of the source distribution and should never be
modified locally. Updates to libinput may overwrite modifications or even
stop parsing any property. For temporary local workarounds, see @ref
device-quirks-local.
Device quirks are parsed on libinput initialization. A parsing error in the
device quirks disables **all** device quirks and may negatively impact
device behavior on the host. If the quirks cannot be loaded, an error
message is posted to the log and users should use the information in @ref
device-quirks-debugging to verify their quirks files.
@section device-quirks-local Installing temporary local device quirks
The model quirks are part of the source distribution and should never be
modified. For temporary local workarounds, libinput reads the
`/etc/libinput/local-overrides.quirks` file. Users may add a sections to
this file to add a device quirk for a local device but beware that **any
modification must be upstreamed** or it may cease to work at any time.
@note Model quirks are internal API and may change at any time. No
backwards-compatibility is guaranteed. Local overrides should only be used
until the distribution updates the libinput packages.
The `local-overrides.quirks` file usually needs to be created by the user.
Once the required section has been added, use the information from section
@ref device-quirks-debugging to validate and test the quirks.
@section device-quirks-debugging Debugging device quirks
libinput provides the `libinput list-quirks` tool to list and debug model
quirks that apply to one or more local devices.
@verbatim
$ libinput list-quirks /dev/input/event19
Device has no quirks defined
$ libinput list-quirks /dev/input/event0
AttrLidSwitchReliability
@endverbatim
When called with the `--verbose` argument, `libinput list-quirks` prints
information about all files and its attempts to match the device:
@verbatim
$ libinput list-quirks --verbose /dev/input/event0
quirks debug: /usr/share/share/libinput is data root
quirks debug: /usr/share/share/libinput/10-generic-keyboard.quirks
quirks debug: /usr/share/share/libinput/10-generic-lid.quirks
[...]
quirks debug: /usr/share/etc/libinput/local-overrides.quirks
quirks debug: /dev/input/event0: fetching quirks
quirks debug: [Serial Keyboards] (10-generic-keyboard.quirks) wants MatchBus but we don't have that
quirks debug: [Lid Switch Ct9] (10-generic-lid.quirks) matches for MatchName
quirks debug: [Lid Switch Ct10] (10-generic-lid.quirks) matches for MatchName
quirks debug: [Lid Switch Ct10] (10-generic-lid.quirks) matches for MatchDMIModalias
quirks debug: [Lid Switch Ct10] (10-generic-lid.quirks) is full match
quirks debug: property added: AttrLidSwitchReliability from [Lid Switch Ct10] (10-generic-lid.quirks)
quirks debug: [Aiptek No Tilt Tablet] (30-vendor-aiptek.quirks) wants MatchBus but we don't have that
[...]
quirks debug: [HUION PenTablet] (30-vendor-huion.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech Marble Mouse Trackball] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech K400] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech K400r] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech K830] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech K400Plus] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Logitech Wireless Touchpad] (30-vendor-logitech.quirks) wants MatchBus but we don't have that
quirks debug: [Microsoft Surface 3 Lid Switch] (30-vendor-microsoft.quirks) matches for MatchName
[...]
AttrLidSwitchReliability
@endverbatim
Note that this is an example only, the output may change over time. The tool
uses the same parser as libinput and any parsing errors will show up in the
output.
*/
......@@ -37,6 +37,7 @@
@page general General
- @subpage device-quirks
- @subpage udev_config
- @subpage seats
- @subpage timestamps
......
......@@ -181,6 +181,54 @@ libfilter = static_library('filter', src_libfilter,
include_directories : includes_include)
dep_libfilter = declare_dependency(link_with : libfilter)
############ libquirks.a #############
libinput_data_path = join_paths(get_option('prefix'), get_option('datadir'), 'libinput')
libinput_data_override_path = join_paths(get_option('prefix'),
get_option('sysconfdir'),
'libinput',
'local-overrides.quirks')
config_h.set_quoted('LIBINPUT_DATA_DIR', libinput_data_path)
config_h.set_quoted('LIBINPUT_DATA_OVERRIDE_FILE', libinput_data_override_path)
quirks_data = [
'data/10-generic-keyboard.quirks',
'data/10-generic-lid.quirks',
'data/10-generic-trackball.quirks',
'data/30-vendor-aiptek.quirks',
'data/30-vendor-alps.quirks',
'data/30-vendor-cyapa.quirks',
'data/30-vendor-elantech.quirks',
'data/30-vendor-huion.quirks',
'data/30-vendor-ibm.quirks',
'data/30-vendor-logitech.quirks',
'data/30-vendor-microsoft.quirks',
'data/30-vendor-razer.quirks',
'data/30-vendor-synaptics.quirks',
'data/30-vendor-wacom.quirks',
'data/50-system-apple.quirks',
'data/50-system-asus.quirks',
'data/50-system-chicony.quirks',
'data/50-system-cyborg.quirks',
'data/50-system-dell.quirks',
'data/50-system-google.quirks',
'data/50-system-hp.quirks',
'data/50-system-lenovo.quirks',
'data/50-system-system76.quirks',
]
install_data(quirks_data, install_dir : libinput_data_path)
src_libquirks = [
'src/quirks.c',
'src/quirks.h',
]
deps_libquirks = [dep_udev, dep_libinput_util]
libquirks = static_library('quirks', src_libquirks,
dependencies : deps_libquirks,
include_directories : includes_include)
dep_libquirks = declare_dependency(link_with : libquirks)
############ libinput.so ############
install_headers('src/libinput.h')
src_libinput = src_libfilter + [
......@@ -220,7 +268,8 @@ deps_libinput = [
dep_lm,
dep_rt,
dep_libwacom,
dep_libinput_util
dep_libinput_util,
dep_libquirks
]
libinput_version_h_config = configuration_data()
......@@ -317,6 +366,7 @@ if get_option('documentation')
meson.source_root() + '/doc/clickpad-softbuttons.dox',
meson.source_root() + '/doc/contributing.dox',
meson.source_root() + '/doc/device-configuration-via-udev.dox',
meson.source_root() + '/doc/device-quirks.dox',
meson.source_root() + '/doc/faqs.dox',
meson.source_root() + '/doc/gestures.dox',
meson.source_root() + '/doc/middle-button-emulation.dox',
......@@ -435,6 +485,22 @@ configure_file(input : 'tools/libinput-debug-events.man',
install_dir : join_paths(get_option('mandir'), 'man1')
)
libinput_list_quirks_sources = [ 'tools/libinput-list-quirks.c' ]
executable('libinput-list-quirks',
libinput_list_quirks_sources,