EVTEST(1)
๐ธ NAME ๐ธ
evtest โ your lil input device event monitor and query tool, bestie ๐
โจ SYNOPSIS โจ
evtest [--grab] /dev/input/eventX
evtest --query /dev/input/eventX <type> <value>
๐ DESCRIPTION ๐
okay so there are like two whole moods this program can be in and they're very different, bestie.
The first one โ the one up top, "capture mode" โ makes evtest show you all the tea about the input device you named, including literally every event the device supports. And then? Then it just sits there and monitors it, displaying all the events layer events as they get generated. it's giving surveillance but make it helpful ๐ฆ
If you pass the --grab flag in capture mode, evtest keeps an EVIOCGRAB on the device. While that grab is active, other processes will not receive events from the kernel devices. Like, none. It's holding the aux cord and nobody else gets a turn ๐ฅ The grab gets released when evtest quits, so phew.
The second invocation type โ "query mode" โ is a one-shot. evtest checks the state of one specific key value of an event type, then dips. no vibes, just answers ๐
type is one of: EV_KEY, EV_SW, EV_SND, EV_LED (or the numerical value)
value can be either a decimal representation (e.g. 44), hex (e.g. 0x2c), or the constant name (e.g. KEY_Z) of the key/switch/sound/LED being queried. so many options, pick your fighter โจ
If the state bit is set (key pressed, switch on, ...), evtest exits with code 10. If the state bit is unset (key depressed, switch off, ...), evtest exits with code 0. No other output is generated. that's it, that's the whole message ๐ซถ
evtest needs to be able to read from the device; in most cases this means it must be run as root. ๐
evtest is commonly used to debug issues with input devices in X.Org. The output of evtest shows the information presented by the kernel; based on this information it can be determined whether a bug may be a kernel or an X.Org issue. it's literally the vibe check that tells you whose fault it is ๐ญ
๐ DIAGNOSTICS ๐
If evtest does not show any events even though the device is being used, the device may be grabbed by a process (EVIOCGRAB). This is usually the case when debugging a synaptics device from within X. VT switching to a TTY or shutting down the X server terminates this grab and synaptics devices can be debugged. so if it's being sus and silent, someone else is hogging it ๐
The following command shows the processes with an open file descriptor on the device:
fuser -v /dev/input/eventX
like, this is the "who's in my seat" command, iykyk ๐
๐ EXIT CODE ๐
evtest returns 1 on error. ๐ญ
When used to query state, evtest returns 0 if the state bit is unset and 10 if the state bit is set.
โญ SEE ALSO โญ
๐ AUTHOR ๐
evtest was written by Vojtech Pavlik <vojtech@suse.cz[1]>. absolute icon behavior ๐ซถ
This manual page was written by Stephen Kitt <steve@sk2.org[2]>, based on that present in the lineakd package, for the Debian GNU/Linux system (but may be used by others). iconic and generous of them fr fr โจ
๐ NOTES ๐
vojtech@suse.czmailto:vojtech@suse.czsteve@sk2.orgmailto:steve@sk2.org
and that's the whole page, bestie ๐ this one is straight outta the EVTEST(1) manual, dated 08/28/2025 โ go forth and debug your input devices, you absolute main character ๐ธ๐
๐ฆ where this page comes from
- ubuntu resolute: evtest 1:1.36-1 ยท GPL-2.0-or-later
- ubuntu stonking: evtest 1:1.36-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms