LinuxCommandLibrary

libinput

Configure, test, and debug input devices

TLDR

List all devices recognized by libinput

$ sudo libinput list-devices
copy

Print all libinput events
$ sudo libinput debug-events
copy

Show a GUI to visualize libinput's events
$ sudo libinput debug-gui
copy

Debug tablet axis values
$ sudo libinput debug-tablet
copy

Display help
$ libinput [[-h|--help]]
copy

SYNOPSIS

libinput COMMAND [OPTIONS]...

PARAMETERS

list-devices
    Lists all currently connected input devices recognized by libinput, along with their capabilities and properties.

record
    Records all input events from specified devices. Useful for debugging and reproducing input issues. Requires device specification or the default grabs all devices.

debug-events
    Displays the raw events generated by libinput. Similar to `record` but focuses on low-level event information for debugging.

--udev
    Specifies the udev seat to use. Defaults to the seat of the current session.

--device /dev/input/eventX
    Specifies the device to be used.

--help
    Displays help information about libinput options.

DESCRIPTION

The `libinput` command provides tools for interacting with devices handled by the libinput library. It allows listing connected input devices and their capabilities, recording device events for debugging or analysis, and testing device configurations.

This command is especially useful for developers working with input devices, system administrators troubleshooting input issues, or users wanting to understand how their input devices are recognized and handled by the system. By using `libinput`, you can quickly identify connected devices, determine supported gestures and buttons, and capture input events for detailed examination. The `record` option is invaluable for reproducing issues or developing device drivers. The utility helps in understanding the interaction between hardware and the Linux input stack.

CAVEATS

Requires root privileges for some operations, especially when recording events from specific devices. The output format may change between libinput versions.

TROUBLESHOOTING

If a device is not recognized by libinput, ensure the device is properly connected and that the necessary udev rules are in place. Check dmesg for any error messages related to the device. Also, verify that the device driver is loaded and functioning correctly.

HISTORY

libinput was developed as a replacement for the evdev X driver, aiming for better input handling and support for modern input devices like touchpads and touchscreens. It is a key component of modern Linux desktop environments such as GNOME and KDE.

SEE ALSO

xinput(1), evtest(1)

Copied to clipboard