LLMpediaThe first transparent, open encyclopedia generated by LLMs

evdev (Linux kernel)

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: libinput Hop 5
Expansion Funnel Raw 53 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted53
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
evdev (Linux kernel)
Nameevdev
Titleevdev (Linux kernel)
DeveloperLinus Torvalds, The Linux Foundation
Initial release1999
RepositoryLinux kernel
LicenseGNU General Public License

evdev (Linux kernel) is the generic input event interface in the Linux kernel that provides a unified framework for handling input devices such as keyboards, mice, touchscreens, and gamepads. It standardizes input event delivery from kernel drivers to user-space applications and libraries used by desktop environments like GNOME and KDE. The subsystem interoperates with window systems, input servers, and middleware including X.Org and Wayland compositors.

Overview

evdev serves as the canonical kernel-level input event device layer in the Linux kernel input subsystem. It exposes device nodes under /dev/input so user-space programs and frameworks such as libinput, SDL (software), Qt (software), and GTK can read a consistent stream of input events. The interface unifies disparate hardware and vendor implementations from manufacturers such as Logitech, Microsoft, and Sony into a coherent model for projects including X.Org Server, Weston, and Sway (window manager).

Architecture and API

The architecture centers on a kernel driver ABI that represents devices as character device nodes with an event-oriented API. Kernel components like udev and subsystems in the Linux kernel expose this to user-space via ioctl calls and read semantics. The API provides event structures, ioctl constants, and device metadata that frameworks such as PulseAudio, BlueZ, and systemd can query. It is implemented alongside kernel features maintained by contributors associated with Kernel.org and coordinated via mailing lists such as the Linux Kernel Mailing List.

Device Handling and Event Types

Device handling in evdev encompasses discovery, capability reporting, and the reporting of standardized event types: key events, relative motion, absolute position, multi-touch, and force sensing. It supports input classes used by vendors like Nintendo and Xbox controllers, touch controllers used in devices from Dell and Lenovo, and sensors in hardware from Intel and AMD. Event type constants mirror semantics understood by user-space projects such as XInput extensions and gaming stacks like Steam (service).

Kernel and User-space Interaction

Communication relies on device nodes, blocking and non-blocking reads, select/poll, and ioctl operations. User-space components including libevdev, libinput, and application toolkits interact with evdev to translate kernel events into gestures, pointer motion, and keycodes for desktop environments such as Unity (user interface), Cinnamon (desktop environment), and MATE (software) . Distribution-level components like Debian, Fedora, and Ubuntu package libraries and udev rules to manage device permissions and driver binding.

Configuration and Input Drivers

Configuration can occur in user-space via udev rules, libinput configuration, and compositor settings in projects like GNOME Shell and KDE Plasma. Kernel input drivers implementing evdev interfaces include platform drivers in the Linux kernel tree for i8042, hid, serio, and bluetooth HID stacks, with vendor support from Intel Corporation and Broadcom. Device-specific quirks and firmware workarounds are coordinated through upstream pull requests reviewed by maintainers such as those listed in MAINTAINERS (Linux kernel file). Hardware enablement for laptops from HP and Asus often involves kernel patches and collaboration with upstream maintainers.

Security and Access Control

Access to evdev device nodes is governed by UNIX file permissions and device management via udev and systemd-logind seat management. Security considerations intersect with platforms like SELinux and AppArmor where confinement policies restrict access to input devices to prevent keylogging and input spoofing. Cryptographic signing of kernel modules and Secure Boot policies promoted by Microsoft for OEM compatibility influence how input drivers are loaded on systems such as those certified under Windows Hardware Certification programs.

History and Development

Evdev evolved within the Linux kernel input subsystem to replace earlier, device-specific interfaces and to serve projects including X.Org and later Wayland compositors. Key development occurred through collaboration on mailing lists like the Linux Kernel Mailing List and via contributions tracked on Kernel.org and mirrored in repositories used by distributions such as Red Hat and Canonical (company). Its ongoing maintenance connects to broader initiatives in the Linux kernel community and standards efforts involving desktop projects such as freedesktop.org and hardware vendors like Intel Corporation and Microsoft.

Category:Linux kernel