Kernel mode setting - ArchWiki
Packages
Forums
Wiki
GitLab
Security
AUR
Jump to content
From ArchWiki
Related articles
ATI
Intel graphics
Nouveau
This article or section needs expansion.
Reason:
KMS and rootless X (1.16), see
Talk:Kernel mode setting
and
Xorg#Rootless Xorg
. (Discuss in
Talk:Kernel mode setting
Kernel
Mode Setting
(KMS) is a method for setting display resolution and depth in the kernel space rather than user space.
The Linux kernel's implementation of KMS enables native resolution in the framebuffer and allows for instant console (tty) switching. KMS also enables newer technologies (such as
DRI2
) which will help reduce artifacts and increase 3D performance, even kernel space power-saving.
Note
The proprietary
NVIDIA
driver (since 364.12) also implements kernel mode-setting, but it does not use the built-in kernel implementation and a fbdev driver for the high-resolution console is only present as an opt-in experimental feature (since 545.29)
Background
Previously, setting up the video card was the job of the X server. Because of this, it was not easily possible to have fancy graphics in
virtual consoles
. Also, each time a switch from X to a virtual console was made (
Ctrl+Alt+F2
), the server had to give control over the video card to the kernel, which was slow and caused flickering. The same "painful" process happened when the control was given back to the X server (
Alt+F7
when X runs in VT7).
With Kernel Mode Setting (KMS), the kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.
Configuration
At first, note that for
any
method you use, you should
always
disable:
Any
vga=
options in your
boot loader
as these will conflict with the native resolution enabled by KMS.
Any
video=
lines that enable a framebuffer that conflicts with the driver.
This article or section is out of date.
Reason:
Arch
officially supported kernels
have
simpledrm
KMS driver inbuilt
[1]
for years now. Which means Arch users
always
have early KMS start. So this section is more about "when
simpledrm
transfers control to another driver". (Discuss in
Talk:Kernel mode setting
This article or section needs expansion.
Reason:
Mention
simpledrm
and its ability to work as a generic graphics driver. (Discuss in
Talk:Kernel mode setting
Late KMS start
Intel
Nouveau
ATI
and
AMDGPU
drivers already enable KMS automatically for all chipsets, so you do not need to do anything.
The proprietary
NVIDIA
driver supports KMS (since 364.12), which has to be
manually enabled
Early KMS start
Tip
If you encounter problems with the resolution, you can check whether
enforcing the mode
helps.
KMS is typically initialized after the
initramfs stage
. However, it is possible to enable KMS already during the initramfs stage. Add the required module for the
video driver
to the initramfs configuration file:
amdgpu
for
AMDGPU
, or
radeon
when using the legacy
ATI
driver.
i915
for
Intel graphics
nouveau
for the open-source
Nouveau
driver.
nvidia nvidia_modeset nvidia_uvm nvidia_drm
for the out-of-tree
NVIDIA
drivers. See
NVIDIA#DRM kernel mode setting
for details.
mgag200
for Matrox graphics.
Depending on
QEMU
graphics in use (
qemu
option
-vga
type
or
libvirt