Generated by GPT-5-mini| evdev | |
|---|---|
![]() This SVG diagram includes elements that have been taken or adapted from this ico · CC BY-SA 4.0 · source | |
| Name | evdev |
| Developer | Linux kernel development |
| Released | 2003 |
| Programming language | C (programming language) |
| Operating system | Linux |
| Genre | Input device driver |
evdev evdev is a Linux kernel input event interface that exposes input device events to user space. It provides a uniform API between kernel subsystems and userland software, enabling interaction with keyboards, mice, touchscreens and game controllers. Widely used across distributions and desktop environments, evdev underpins input handling in projects ranging from X.Org to Wayland compositors and embedded systems.
evdev implements an event-driven device model within the Linux kernel development tree to represent physical and virtual input devices. It standardizes event codes and device capabilities to allow user-space components such as systemd, udev, GNOME, KDE, X.Org, Wayland, PulseAudio and PipeWire to consume input with minimal platform-specific conditional logic. The interface cooperates with subsystems like Input/output control (ioctl), Unix device file semantics and Linux input layer conventions. Vendors such as Intel, AMD, NVIDIA and manufacturers of Logitech, Microsoft, Razer Inc. hardware rely on evdev-compatible drivers for consistent behavior across distributions like Debian, Ubuntu, Fedora, Arch Linux, Red Hat Enterprise Linux and SUSE Linux Enterprise.
evdev's architecture centers on a character device abstraction exported under /dev/input/eventX managed by udev. The design separates physical device drivers implemented in the Linux kernel—often in kernel subsystems for USB or PCI—from user-space consumers like X.Org Server and Weston compositors. Input event types follow standards codified by the kernel input API and interact with kernel facilities such as workqueue, kobject, sysfs and procfs. Support for capabilities like absolute axes, relative motion and key codes maps to arrays of bitmasks and ioctl queries, enabling desktop components such as GNOME Shell, KWin and Sway to discover device features. evdev design also considers concurrency via spinlock and wait queue primitives and integrates with power management stacks like ACPI and systemd-logind.
Kernel-space drivers for hardware families—i8042 controller, HID, USB HID, Serio, Bluetooth and I2C touch controllers—register with the evdev interface to present standardized events. The mapping of physical scancodes to keycodes often bridges firmware layers such as BIOS or UEFI keyboard tables and higher-level translators used by XKB or libinput. Input device hotplugging leverages udev rules and events emitted by udevadm monitored by session managers like logind or ConsoleKit. Third-party projects and vendors such as Valve Corporation, Steam, Canonical and Red Hat provide kernel patches and quirk tables to improve support for gamepads, touchpads and styluses within evdev.
Administrators configure device permissions and naming through udev rules, systemd seat management and tools like setxkbmap (for layouts integrated into X.Org), or libinput utilities used by Wayland compositors. Desktop environments such as GNOME, KDE, XFCE, LXQt and MATE expose settings that map onto evdev-provided capabilities for pointer acceleration, tapping, scrolling and key repeat. System integrators on platforms including Raspberry Pi, BeagleBone, NVIDIA Jetson and industrial controllers use evdev to interface with on-board peripherals and touchscreen controllers. Debugging uses utilities like evtest, libinput debug-events, xev and kernel logging through dmesg and journalctl provided by systemd-journald.
User-space libraries and frameworks such as libevdev, libinput, X.Org libinput, SDL, Qt, GTK and Rust crates wrap the raw evdev ioctl API to provide higher-level abstractions. Programming against evdev employs system calls including read, ioctl and select/poll for event retrieval and device capability queries. Projects like Wayland, X.Org Server, Android input subsystems and game engines like Unity and Unreal Engine integrate wrappers to translate evdev events into their internal event models. Contributors from organizations such as Canonical, Red Hat, collabora and independent maintainers collaborate on tooling, API stabilization, and bindings in languages including Python, C++, Go and Rust.
evdev emerged as part of efforts within Linux kernel development and the X.Org community to replace disparate input handling mechanisms in early Linux distributions. Adoption accelerated with integration into major distributions like Debian, Ubuntu, Fedora and Red Hat Enterprise Linux and by inclusion in device management stacks developed by systemd and udev. The interface influenced input handling in projects such as Wayland compositors, libinput and X.Org Server and saw contributions from corporations including Intel, Google, Samsung, Broadcom and Microsoft hardware teams. Over time, evdev became a de facto standard for Linux input, shaping support for modern devices from manufacturers like Asus, Acer, HP, Dell, Lenovo and Apple on laptops, desktops and embedded platforms.