Kernel Mode Setting

原文:https://wiki.archlinux.org/index.php/Kernel_Mode_Setting

Kernel Mode Setting

  Kernel Mode Setting (KMS) is a method for setting display resolution and depth in the kernel space rather than user space.

  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.

  As of December 12th, 2010, the intelnouveau and radeon drivers support KMS for all chipsets. KMS is also enabled automatically for these drivers. The proprietary NVIDIA and ATI Catalyst drivers do not support KMS.

 

 


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+F1), 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 (Ctrl+Alt+F7).

  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.

  KMS is a new technology which is still considered experimental at this time due to its incomplete support for all video cards. It is usable and stable for many, but as with all newer software, the possibility of bugs exists.

 

 


 

Troubleshooting

 

Note that for any method you use, you should always disable any "vga=" options in your bootloader as these will conflict with the native resolution enabled by KMS. Also make sure to disable any "video=" lines that enable a framebuffer that conflicts with the driver. Any other framebuffer drivers (such asuvesafb) must also be disabled before enabling KMS.

My fonts are too tiny

See changing the default font for how change your console font to a large font. One font available from [extra] that is available in many sizes, including larger sizes, is the Terminus font.

 

 


 

Forcing modes

 

From the nouveau wiki:

A mode can be forced on the kernel command line. Unfortunately, the command line option video is poorly documented in the DRM case. Bit and pieces on how to use it can be found in

The format is: video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]

  • <conn>: Connector, e.g. DVI-I-1, see your kernel log.
  • <xres> x <yres>: resolution
  • M: compute a CVT mode?
  • R: reduced blanking?
  • -<bpp>: color depth
  • @<refresh>: refresh rate
  • i: interlaced (non-CVT mode)
  • m: margins?
  • e: output forced to on
  • d: output forced to off
  • D: digital output forced to on (e.g. DVI-I connector)

You can override the modes of several outputs using "video" several times, for instance, to force DVI to 1024x768 at 85 Hz and TV-out off: video=DVI-I-1:1024x768@85 video=TV-1:d

 

 

 

ps:

  Mode-setting can be done in kernel space or in user space. Doing mode-setting in kernel-space is more flexible and allows displaying of an error in the case of a fatal error in the kernel, even when using a user-space display server.      

User-space mode-setting would have needed superuser privileges for direct hardware access, so kernel-based mode-setting increases security because the user-space graphics server does not need superuser privileges.

 

 

 

發佈了14 篇原創文章 · 獲贊 5 · 訪問量 23萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章