Sunday, December 11, 2011

KMS (Kernel Mode Setting), how to disable

The short answer


Just edit the file /etc/modprobe.d/radeon-kms.conf so it says:
options radeon modeset=0
And reboot.

And now, the super-long-winded answer


First, what is KMS and why would you want to turn it off? Kernel mode-setting refers to the modern Linux kernel's ability to detect (via EDID signals) a modern monitor's native screen resolution and other parameters, and use them "automagically". When you have a modern monitor connected directly to your computer's graphics card/motherboard, that's a good thing.

Now, imagine that you've got a somewhat modern ATI Radeon graphics adapter in your system. X rocks at your LCD monitor's full native resolution. But the Linux console is not displaying properly. Maybe this is because you are using a KVM Extender that doesn't propagate the EDID information your monitor is sending. So it has no way of finding out the monitor's native or optimal resolution.

Anyway, that's what was happening on my Debian "squeeze" system. The KMS (Kernel Mode Setting) code was not getting the right information on what resolution to use.

My monitor's native resolution is 1920x1200, but when I ran
hwinfo --framebuffer
a slew of supported resolutions was displayed, but 1920x1200 was not one of them. Logically, then, the resolution it decided to use did not display correctly on my monitor. Using the Linux console had become a source of constant frustration.

So, I thought, just turn KMS off. Disable KMS. But how? Turns out it's very easy. Just edit /etc/modprobe.d/radeon-kms.conf so it says:
options radeon modeset=0
And reboot. In my case, it reverted to a low-resolution setting, which was blurry on the big, wide LCD monitor. But it was better than what I was getting before.

Apparently, there is another way to turn off KMS – add the nomodeset parameter to the kernel command line. I have not tested this, however.

So there you have it.

In the end, I turned KMS back on and set the correct resolution by adding video=1920x1200 to the kernel command line.

No comments:

Post a Comment