分类: LINUX
2011-05-30 14:41:21
Kernel mode-setting (KMS) shifts responsibility for selecting and setting up the graphics mode from X.org to the kernel. When X.org is started, it then detects and uses the mode without any further mode changes. This promises to make booting faster, more graphical, and less flickery.
KMS is enabled by default for the -intel, -ati, and -nouveau drivers. It is not available for any other drivers at this time.
If you need to manually adjust mode settings, the video= boot parameter is used. For example,
video=LVDS-1:d -- Disables the LVDS video=VGA-1:e -- Enables VGA-1
If you need to turn KMS *off* do the following depending on the hardware in question:
# ATI Radeon: echo options radeon modeset=0 > /etc/modprobe.d/radeon-kms.conf # Intel: echo options i915 modeset=0 > /etc/modprobe.d/i915-kms.conf # Nvidia (this should revert you to using -nv or -vesa): echo options nouveau modeset=0 > /etc/modprobe.d/nouveau-kms.conf
For some users (particularly users with encrypted volumes) KMS is enabled very early in the boot process and in order to pick up these changes you need to run sudo update-initramfs -u.
Some drivers, like nouveau, only support KMS as mentioned above. In these cases, debugging is best done by setting parameter drm.debug=0x04 which will cause the kernel to print extra debugging information.
Once you've disabled KMS, if you *still* find you have problems, you can then pick a different driver (e.g. -vesa, -nv, etc.), by creating an xorg.conf with the following contents:
# /etc/X11/xorg.conf Section "Device" Identifier "Configured Video Device" Driver "vesa" # Change this to the driver you want EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection
If you want to use KMS but for some reason the regular driver is causing problems, you can also try just using the framebuffer -fbdev driver. This is a generic featureless driver like -vesa but works under KMS (-vesa does not work with KMS). To use it, create an xorg.conf like this:
# /etc/X11/xorg.conf Section "Device" Identifier "Configured Video Device" Driver "fbdev" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection
Additionally, if you want to have a high resolution splash available much earlier in the boot process, run these commands in a terminal
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash sudo update-initramfs -u