evtest

evtest displays information on the input device specified on the command line, including all the events supported by the device. It then monitors the device and displays all the events layer events generated.

How to get the log file

Here are the general steps to follow. Note these steps somewhere, as you will not be able to see this window when you enter a VT.

How to use the tool?

evtest is not installed by default in Ubuntu installation. Instead you must install it by using apt-get.

sudo apt-get install evtest 

evtest should be used outside of X. This is because the X-driver grabs the device when active. This means that the kernel delivers hw events to the driver itself and not to any other device opener (ie-evtest). This is why we should switch to a VT so that the X-driver ungrabs the device node allowing others to receive events. (Thanks to Mattia Dongili and Peter Hutterer for help on this, in an email)

evtest needs to be able to read from the device; in most cases this means it must be run as root.

When to use the tool?

This tool is extremely useful when we need to verify what events kernel is generating in response to device specific hardware events. Thus if the events are not as expected then the bug is right inside the kernel and in the other case the bug is somewhere above kernel in X or in some other driver.

DebuggingTouchpadDetection/evtest (last edited 2019-02-26 06:51:01 by anthonywong)