Mode setting

From Wikipedia, the free encyclopedia
(Redirected from KMS (Linux kernel))
Jump to navigation Jump to search
Regulating access to the hardware is a fundamental kernel task. The Direct Rendering Manager and KMS are part of the Linux kernel. The KMS does only the mode setting.

Mode setting is a software operation that activates a display mode (screen resolution, color depth, and refresh rate) for a computer's display controller by using VESA BIOS Extensions or UEFI Graphics extensions (on more modern computers).

The display mode is set by the kernel. In user-space mode-setting (UMS), the display mode is set by a user-space process.

Kernel mode-setting is more flexible and allows displaying of an error in the case of a fatal system error in the kernel, even when using a user-space display server.

User-space mode setting would require superuser privileges for direct hardware access, so kernel-based mode setting shuns such requirement for the user-space graphics server.

On the hardware side, the GPU consists of multiple components, among which are render engine, i.e. the component of the GPU responsible for executing OpenGL/Vulkan commands, and the display engine, i.e. the component of the GPU responsible for sending a "video stream" to the screen, as opposed to the part performing rendering.[1]

To improve performance, many GPUs come with a feature called hardware planes. Planes can make the display engine perform the composition. This is called direct scan-out and allows the compositor to avoid copying entirely. libliftoff is a library making better use of such hardware ability.[1]

Implementation

[edit | edit source]

For "old" cards, support might change from distribution to distribution according to random criteria without apparent reason leaving the card unsupported.[2]

Microsoft Windows

[edit | edit source]

Microsoft Windows versions that are NT-based use kernel mode setting. The kernel error display made possible by kernel mode setting is officially called "bug check", but more commonly known as the Blue Screen of Death.

Linux

[edit | edit source]
The role of KMS (Kernel mode-setting), Linux example
The Linux Graphics Stack 2013
Wayland compositors require KMS (and also OpenGL ES and EGL)
The place of certain Linux kernel modules
evdev was the Linux kernel module that receives data from various Input devices such as Keyboard, Mouse, Touch-Pad, etc. Nowadays, this is the libinput module (for X and Wayland). The data is passed to the Display server (e.g. the X.Org Server or some Wayland compositor only to be passed further to the Wayland client respectively X client. Some applications require minimal latency.

The Linux kernel got the prerequisite for kernel-based mode setting by accepting Intel GEM in version 2.6.28, released in December 2008.[3] This will be[needs update] replaced by Tungstens Graphics TTM (Translation Table Maps) memory manager which supports the GEM API.[4] TTM was developed for the free and open-source drivers for Radeon and S3 Graphics graphic chipsets (see Free and open-source graphics device driver).[5] Support for Intel GMA graphic chipsets was accepted in version 2.6.29, released on March 23, 2009.[6] Support for pre-R600 ATI Radeon graphics cards was accepted in version 2.6.31, released on September 9, 2009.[7] Support for R600 and R700 was in development within DRM and was merged in version 2.6.32.[8] Support for Evergreen (R800) was merged in version 2.6.34. As Nvidia did not release all the needed documentation for its graphics chip, development proceeded under the nouveau project, which uses reverse engineering to build a working open-source driver for Nvidia cards. Nouveau was accepted in version 2.6.33 of the kernel, released on December 10, 2009. Kernel-based mode setting is not only supported by the nouveau driver, it is required.[9] Wayland compositors (e.g. Weston) and kmscon depend on kernel mode setting via ioctl.

FreeBSD

[edit | edit source]

FreeBSD has support for both kernel-based mode setting and GEM for later generations of Intel GPUs (IronLake, SandyBridge, and IvyBridge) starting with version 9.1.[10]

Support of Intel card is limited. Some random Intel cards such as Device 'Intel CometLake-S GT2 [UHD Graphics 630]' does not work with FreeBSD.[11] Some cards where driver is supported but not supported actively and does not work suffer such kind of issues.[12]

NetBSD

[edit | edit source]

NetBSD has support for kernel-based mode setting and accelerated graphics for Intel and Radeon devices. This implementation was introduced in version 7.0 by porting the Linux 3.15 DRM/KMS code.[13]

OpenBSD

[edit | edit source]

OpenBSD has kernel-based mode setting support for Intel and Radeon GPUs. Starting with version 5.4 of OpenBSD, support for Intel GPUs is available. With the release of version 5.5, the implementation has been extended to add support for Radeon chipsets as well.

Alternatives

[edit | edit source]

The following alternatives have been presented during the Linux Plumbers Conference 2013:

  • It was suggested to split GEM and KMS.[14]
  • Atomic Display Framework, by Google's Android-Team.[15][16]
  • Common Display Framework.[17]

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). This article incorporates text from this source, which is available under the CC BY 4.0 license.
  2. ^ https://linux-hardware.org/index.php?id=pci:8086-9bc8-1043-8694
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  11. ^ https://bsd-hardware.info/?id=pci:8086-9bc8
  12. ^ https://dgpu-docs.intel.com/devices/hardware-table.html#gpus-with-unsupported-drivers
  13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
[edit | edit source]