Skip to content

Kernel ModeSetting (short: KMS)

KernelModesetting

Translation(s): none

Kernel ModeSetting (short: KMS)

Contents

Kernel ModeSetting (short: KMS)
    Intel GfxCards
    AMD/ATI GfxCards
    nVidia GfxCards
    Disabling KMS
    Setting via Grub
    Resources

Kernel Mode Setting (KMS) provides faster mode switching for X and console. It also provides native-resolution VTs on some laptops and netbooks which, prior to this, would use some standard mode, e.g. 800×600 on a 1024×600 panel.

To enable, you need:

a kernel image ≥ 2.6.29 (in Sid since 2009-04-04)

supported graphics card 

Intel GfxCards

i915 driver

From xserver-xorg-video-intel version 2:2.9.1-2, KMS is enabled by default on Linux, by the way of the file /etc/modprobe.d/i915-kms.conf. So from Squeeze on, no hand modification should be necessary anymore.

Known bugs

vbetool

    Running this will cause X to fail to start up (black screen except for a static cursor at the top left, can't switch vt), and may cause other problems. (This is a kernel bug.) To avoid this, set SAVE_VBE_STATE=false in /etc/default/acpi-support. 
linux-2.6
    Do not load any framebuffer drivers other than inteldrmfb (which is provided by i915) if you enable KMS, else you will probably see hard lockups when trying to start X.
    If you launch your kernel with a vga=xxx option on the boot line, it will fail (black screen). 
945GM and 82865G

    In my system (HP/Compaq nx7300 with 945GM) enabling of KMS when loading the i915 module caused blank screen (seems not to be related to incorrect mode, rather the system got suspended or hibernated) when booting the system. Problem could be cured by changing of /etc/modprobe.d/i915-kms.conf to options i915 modeset=0. What's interesting, booting with acpi=off also cured the problem. The same problem occured in a desktop system with 82865G (link)

    After last (ca. 20th October 2010) update of my debian/testing systems, the xserver-xorg-video-intel stopped to work with i915 modeset set to 0. Therefore the workaround mentioned in the previous point was not applicable any more. Setting of i915 modeset to 1 still caused blank screen, as soon as the i915 module is loaded. After more investigations I've found, that the problem is related to framebuffer console. If KMS is switched on, the framebuffer console support must be selected. In my systems (self compiled kernel without initial ramdisk) I had to to set CONFIG_FRAMEBUFFER_CONSOLE=y, CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y . Maybe with initial ramdisk, compiling it as module would be sufficient, but I've not checked it. Unfortunately the kernel "make menuconfig" doesn't check if the framebuffer console support is selected when CONFIG_DRM_I915_KMS is set to "y" (LKML, 601558, 600802). 

    [Another report:] On my 945GM, CONFIG_FRAMEBUFFER_CONSOLE must be built-in, and not built as a module (this will require building-in AGP / DRM / Intel / Consoleframebuffer) Kernel Bugzilla 

AMD/ATI GfxCards

radeon driver

From xserver-xorg-video-radeon version 1:6.12.192-2, KMS is enabled by default on Linux, by the way of the file /etc/modprobe.d/radeon-kms.conf. So from Squeeze on, no hand modification should be necessary anymore.

Known bugs

radeonhd Xorg driver (xserver-xorg-video-radeonhd)

    Incompatible with KMS (575226). 

nVidia GfxCards

nouveau driver

KMS is enabled by default on Linux in Debian kernels from Squeeze on, so no hand modification should be necessary. KMS is required for using the xserver-xorg-video-nouveau package.

Known bugs

nv (xserver-xorg-video-nv) and VESA (xserver-xorg-video-vesa) Xorg driver, and the proprietary 3D driver (nvidia-glx) are incompatible with KMS. 

Disabling KMS

On Intel and Radeon cards KMS is disabled at run time in Debian kernel images by default.1 It is enabled via modprobe configuration files provided by the xserver-xorg-video-intel and xserver-xorg-video-radeon packages. nVidia cards have KMS enabled in the kernel by default.

To disable KMS for Intel and Radeon cards, either:

Boot with the nomodeset kernel command line parameter.

Edit /etc/modprobe.d/i915-kms.conf or /etc/modprobe.d/radeon-kms.conf accordingly. 

To disable KMS for nVidia cards, either:

Boot with the nomodeset kernel command line parameter.
Blacklist the nouveau kernel module, e.g. with

echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf

and create a minimal /etc/X11/xorg.conf specifying the desired driver, e.g.

Section "Device"
        Identifier      "n"
        Driver          "nv"
EndSection

If you want to use the proprietary driver, the nvidia-kernel-common package blacklists nouveau for you.

Setting via Grub

Configuring the KMS via Grub can be done via the /etc/default/grub config file by doing something similar to the following:

echo "GRUB_GFXPAYLOAD_LINUX=1152x864x24" >> /etc/default/grub

update-grub

Resources

KMS with the Intel GMA at the Gentoo Wiki

Fedora KMS page

Nouveau KMS page

radeonBuildHowTo 

"Bits from the kernel team: Kernel Mode Setting transition" (debian-devel-announce mailing list, 2009-10-19) (1)

https://wiki.debian.org/KernelModesetting