Mode setting
Kernel mode-setting enables error display and removes superuser requirements.
Mode setting is a software operation that activates a display mode—comprising screen resolution, color depth, and refresh rate—for a computer's display controller. It is performed using VESA BIOS Extensions or, on more modern computers, UEFI Graphics extensions. The display mode can be set either by the kernel (kernel mode-setting, KMS) or by a user-space process (user-space mode-setting, UMS). Kernel mode-setting is notable for its flexibility, including the ability to display an error during a fatal system error even when a user-space display server is in use, and it eliminates the need for superuser privileges in the user-space graphics server.
- Linux kernel kms prerequisite
- Intel GEM accepted in version 2.6.28 (December 2008)
- Intel gma support accepted
- version 2.6.29 (March 23, 2009)
- Pre-r600 ati radeon support accepted
- version 2.6.31 (September 9, 2009)
- R600 r700 support merged
- version 2.6.32
- Evergreen r800 support merged
- version 2.6.34
- Nouveau accepted
- version 2.6.33 (December 10, 2009)
- Freebsd intel gpu kms start
- version 9.1
Lore & Background
The Linux kernel gained the prerequisite for kernel-based mode-setting by accepting Intel GEM in version 2.6.28, released in December 2008. This was later replaced by Tungstens Graphics TTM memory manager, which supports the GEM API and was developed for free and open-source drivers for Radeon and S3 Graphics chipsets. Support for Intel GMA chipsets followed in version 2.6.29, pre-R600 ATI Radeon cards in version 2.6.31, R600 and R700 in version 2.6.32, and Evergreen (R800) in version 2.6.34. For Nvidia, the nouveau project used reverse engineering to build an open-source driver, which was accepted in version 2.6.33 and requires kernel mode-setting. On the hardware side, the GPU includes a render engine for executing OpenGL/Vulkan commands and a display engine for sending video streams to the screen. Many GPUs feature hardware planes that allow the display engine to perform composition directly, a capability called direct scan-out, which avoids copying; the library libliftoff makes better use of this hardware ability.
Reader's Guide
Kernel mode-setting has become a foundational component in modern operating systems, enabling more robust error handling and simplifying graphics stack architecture. On Microsoft Windows NT-based versions, it is used to produce the 'bug check' (commonly known as the Blue Screen of Death). On Linux, it is required by Wayland compositors such as Weston and by kmscon, which depend on it via ioctl. FreeBSD supports KMS and GEM for later Intel GPU generations starting with version 9.1, though support for some Intel cards is limited and may not work. NetBSD introduced KMS and accelerated graphics for Intel and Radeon devices in version 7.0 by porting Linux 3.15 DRM/KMS code. OpenBSD added Intel GPU support in version 5.4 and Radeon support in version 5.5. Alternatives discussed at the Linux Plumbers Conference 2013 included splitting GEM and KMS, the Atomic Display Framework by Google's Android team, and the Common Display Framework. For older cards, support may change unpredictably between distributions, leaving the card unsupported.
Did You Know?
- Kernel mode-setting allows displaying a fatal kernel error even when a user-space display server is in use.
- User-space mode-setting requires superuser privileges for direct hardware access, which kernel mode-setting avoids.
- The nouveau driver for Nvidia cards was developed through reverse engineering and requires kernel mode-setting.
- libliftoff is a library that makes better use of hardware planes for direct scan-out composition.
More in Graphics Hardware 1-24
Spotted an error? Know more?
Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced
