touchpad. Then control+c the process and note the output.
An example output is below:
-@code
+@verbatim
$> sudo touchpad-edge-detector /dev/input/event4
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event4
Move one finger around the touchpad to detect the actual edges
EVDEV_ABS_35=2445:4252:<x resolution>
EVDEV_ABS_36=3464:4071:<y resolution>
-@endcode
+@endverbatim
Note the discrepancy between the coordinate range the kernels advertises vs.
what the touchpad sends.
In most cases the match can and should be trimmed to the system vendor (svn)
and the product version (pvr), with everything else replaced by a wildcard
-(*). In this case, a Lenovo T440s, a suitable match string would be: @code
+(*). In this case, a Lenovo T440s, a suitable match string would be: @verbatim
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadT440s*
-@endcode
+@endverbatim
@note hwdb match strings only allow for alphanumeric ascii characters. Use a
wildcard (* or ?, whichever appropriate) for special characters.
The actual axis overrides are in the form:
-@code
+@verbatim
# axis number=min:max:resolution
EVDEV_ABS_00=2445:4252:42
-@endcode
+@endverbatim
or, if the range is correct but the resolution is wrong
-@code
+@verbatim
# axis number=::resolution
EVDEV_ABS_00=::42
-@endcode
+@endverbatim
Note the leading single space. The axis numbers are in hex and can be found
in *linux/input-event-codes.h*. For touchpads ABS_X, ABS_Y,
always a good idea. If the match string is correct, the new properties will
show up in the
output of
-@code
+@verbatim
udevadm info /sys/class/input/event4
-@endcode
+@endverbatim
Adjust the command for the event node of your touchpad.
A udev builtin will apply the new axis ranges automatically.
process below. A successful build requires the @ref
building_dependencies to be installed before running meson.
-@code
+@verbatim
$> git clone https://gitlab.freedesktop.org/libinput/libinput
$> cd libinput
$> meson --prefix=/usr builddir/
$> ninja -C builddir/
$> sudo ninja -C builddir/ install
-@endcode
+@endverbatim
When running libinput versions 1.11.x or earlier, you must run
-@code
+@verbatim
$> sudo udevadm hwdb --update
-@endcode
+@endverbatim
Additional options may also be specified. For example:
-@code
+@verbatim
$> meson --prefix=/usr -Ddocumentation=false builddir/
-@endcode
+@endverbatim
We recommend that users disable the documentation, it's not usually required
for testing and reduces the number of dependencies needed.
The ```prefix``` or other options can be changed later with the
```mesonconf``` command. For example:
-@code
+@verbatim
$> mesonconf builddir/ -Dprefix=/some/other/prefix -Ddocumentation=true
$> ninja -C builddir
$> sudo ninja -C builddir/ install
-@endcode
+@endverbatim
Running ``mesonconf builddir/`` with no other arguments lists all
configurable options meson provides.
To rebuild from scratch, simply remove the build directory and run meson
again:
-@code
+@verbatim
$> rm -r builddir/
$> meson --prefix=....
-@endcode
+@endverbatim
@subsection verifying_install Verifying the install
usually harmless. To definitely remove all files, run the following command
from the libinput source directory:
-@code
+@verbatim
$> sudo ninja -C builddir/ uninstall
# WARNING: Do not restart the computer/X/the Wayland compositor after
# uninstall, reinstall the system package immediately!
-@endcode
+@endverbatim
The following commands reinstall the current system package for libinput,
overwriting manually installed files.
To avoid this issue, restore the SELinux context for any system files.
-<pre>
+@verbatim
$> sudo restorecon /usr/lib*/libinput.so.*
-</pre>
+@endverbatim
This issue is tracked in https://github.com/mesonbuild/meson/issues/1967.
itself. libwacom is required by default but can be skipped when @ref
building.
-@code
+@verbatim
$> meson --prefix=/usr -Dlibwacom=false builddir
-@endcode
+@endverbatim
It is not recommended to disable libwacom unless libinput is used in an
environment where tablet support is not required. libinput provides tablet
not available, the build will fail. If the feature is not required, use the
``--disable-debug-gui`` argument when @ref building.
-@code
+@verbatim
$> meson --prefix=/usr -Ddebug-gui=false builddir
-@endcode
+@endverbatim
@subsection building_autotools Building with autotools
requires the @ref building_dependencies to be installed at configure
time.
-@code
+@verbatim
$> git clone https://gitlab.freedesktop.org/libinput/libinput
$> cd libinput
$> ./autogen.sh --prefix=/usr --libdir=/usr/lib64
$> make
$> sudo make install
$> sudo udevadm hwdb --update
-@endcode
+@endverbatim
@note On Debian-based distributions including Ubuntu and its derivatives skip the
```--libdir=/usr/lib64``` argument.
To uninstall libinput as detailed in section @ref reverting_install, run
-@code
+@verbatim
$> sudo make uninstall
# WARNING: Do not restart the computer/X/the Wayland compositor after make
# uninstall, reinstall the system package immediately!
-@endcode
+@endverbatim
To disable libwacom as detailed in section @ref building_libwacom, run
-@code
+@verbatim
$> ./autogen.sh --disable-libwacom --prefix=/usr --libdir=/usr/lib64
-@endcode
+@endverbatim
To disable the graphical helper tool as detailed in section @ref
building_debug_gui, run
-@code
+@verbatim
$> ./autogen.sh --disable-debug-gui --prefix=/usr --libdir=/usr/lib64
-@endcode
+@endverbatim
@section building_against Building against libinput
Otherwise, the most rudimentary way to compile and link a program against
libinput is:
-@code
+@verbatim
gcc -o myprogram myprogram.c `pkg-config --cflags --libs libinput`
-@endcode
+@endverbatim
For further information on using pkgconfig see the pkg-config documentation.
with ````udevadm info /sys/class/input/eventX```, with the correct event
node for your device. An example output is below:
-@code
+@verbatim
$ udevadm info /sys/class/input/event4
P: /devices/platform/i8042/serio1/input/input5/event4
N: input/event4
E: MINOR=68
E: SUBSYSTEM=input
E: USEC_INITIALIZED=5463031
-@endcode
+@endverbatim
@section evemu Recording devices with evemu
evemu-record takes a <tt>/dev/input/eventX</tt> event node, but without arguments
it will simply show the list of devices and let you select:
-@code
+@verbatim
$ sudo evemu-record > scroll.evemu
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event18: Integrated Camera
/dev/input/event19: TPPS/2 IBM TrackPoint
Select the device event number [0-19]:
-@endcode
+@endverbatim
Select the device that triggers the issue, then reproduce the bug and Ctrl+C
the process. The resulting recording, ("scroll.evemu" in this example) will
To verify that the recording contains the bug, you can replay it on your
device. For example, to replay the sequence recorded in the example above:
-@code
+@verbatim
$ sudo evemu-play /dev/input/event4 < scroll.evemu
-@endcode
+@endverbatim
If the bug is triggered by replaying on your device, attach the recording to
the bug report.
tests. This is useful when trying to figure out if a specific test is
run for a device.
-@code
+@verbatim
$ ./test/libinput-test-suite-runner --list
...
pointer:left-handed:
mouse-wheel-tilt
mouse
...
-@endcode
+@endverbatim
In the above example, the "pointer:left-handed" suite contains multiple
tests, e.g. "pointer_left_handed_during_click" (this is also the function
The `--filter-test` argument enables selective running of tests through
basic shell-style function name matching. For example:
-@code
+@verbatim
$ ./test/libinput-test-suite-runner --filter-test="*1fg_tap*"
-@endcode
+@endverbatim
The `--filter-device` argument enables selective running of tests through
basic shell-style device name matching. The device names matched are the
litest-specific shortnames, see the output of `--list`. For example:
-@code
+@verbatim
$ ./test/libinput-test-suite-runner --filter-device="synaptics*"
-@endcode
+@endverbatim
The `--filter-group` argument enables selective running of test groups
through basic shell-style test group matching. The test groups matched are
litest-specific test groups, see the output of `--list`. For example:
-@code
+@verbatim
$ ./test/libinput-test-suite-runner --filter-group="touchpad:*hover*"
-@endcode
+@endverbatim
The `--filter-device` and `--filter-group` arguments can be combined with
`--list` to show which groups and devices will be affected.
output, see libinput_log_set_priority() for details. The `LITEST_VERBOSE`
environment variable, if set, also enables verbose mode.
-@code
+@verbatim
$ ./test/libinput-test-suite-runner --verbose
$ LITEST_VERBOSE=1 ninja test
-@endcode
+@endverbatim
*/
tool and prints its instructions on the commandline. Example output from
this tool is below:
-@code
+@verbatim
$ sudo libinput measure trackpoint-range
This tool measures the commonly used pressure range of the
trackpoint. Push the trackpoint:
several times to get an idea of the common range.
Trackpoint sends: max x: 19, max y: 23 samples [121, 121]
-@endcode
+@endverbatim
Once sufficient samples have been collected, the tool prints a simplified
histogram for x and y axis deltas. This histogram should be used to
<b>estimate</b> the appropriate trackpoint range. For example, let's look at
the histogram below:
-@code
+@verbatim
Histogram for x axis deltas, in counts of 5
-30:
-29:
32:
33:
34:
-@endcode
+@endverbatim
The 0 delta is the neutral state, each + represents 5 events with that
delta value. Note how the curve is distributed, it's not a classic bell