IT lexicon › Infra & Ops › Kernel Mode Setting (KMS)

Kernel Mode Setting (KMS)

Infra & Ops På svenska → Updated: 2026-10-10

Moving display mode configuration — resolution, refresh rate, which outputs are lit — from the X server's drivers into the Linux kernel, which made flicker-free boot, panics on a graphical console and rootless X possible, and without which Wayland could not have existed.

Until 2009 the X server's driver programmed the graphics card's display controller itself, from user space, as root. That worked until something else wanted the screen: every switch to a text console was a full mode change with a black screen, a kernel panic was invisible because the kernel had no idea how the display was set up, and suspend frequently broke because nobody could restore the mode. The fix was to make the kernel's DRM subsystem, which DRI already used for rendering, responsible. Intel went first, with support in Linux 2.6.29 in March 2009; Radeon followed the same year and Nouveau in early 2010.

The model describes the hardware as framebuffers, planes, CRTCs, encoders and connectors, and a client with access to /dev/dri/card0 — X, a Wayland compositor or the kernel itself — configures them through ioctls. Atomic mode setting in Linux 4.2 in 2015 allowed the whole configuration to be swapped in one step, or tested without being applied. With mode switching out of X, the server no longer needed root, which X.Org 1.16 took advantage of in 2014, and the generic modesetting driver, which speaks KMS and renders through Glamor, gradually replaced the vendors' own DDX drivers. Wayland compositors skip X entirely and talk KMS directly. The modelines in xorg.conf became a memory at the same time.

← Back to the lexicon