Xorg (简体中文)

From ArchWiki
Revision as of 00:46, 26 April 2012 by Cnsworder (Talk | contribs) (安装)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-preferences-desktop-locale.png本页面需要更新翻译,内容可能已经与英文脱节。要贡献翻译,请访问简体中文翻译组Tango-preferences-desktop-locale.png

附注: please use the first argument of the template to provide more detailed indications.
摘要 help replacing me
安装和管理 Xorg 的全面总结
概览
Template:Graphical user interface overview (简体中文)
相关
Start X at boot (简体中文)
Execute commands after X start
Login Manager (简体中文)
Window Manager (简体中文)
Font Configuration (简体中文)
All Mouse Buttons Working
Desktop Environment (简体中文)
Wayland (简体中文)
专有视频驱动
NVIDIA (简体中文)
ATI Catalyst
自由视频驱动
Nouveau
ATI (简体中文)
Intel (简体中文)

Xorg 是 X11 窗口系统的一个开源实现。Xorg 在 Linux 用户中非常流行,已经成为图形用户程序的必备条件,所以大部分发行版都提供了它。详情参见 Xorg 维基文章或访问Xorg 网站

Contents

安装

首先,安装 位于官方软件仓库 的软件包 xorg-server,可能还需要安装位于 xorg-apps 组的有用工具。

udev 会自动检测硬件,evdev 可以用作绝大部分设备的即插即用驱动。xorg-server 依赖它们,所以不需要显式安装。

小贴士: X 环境默认没有被安装,可用选择安装 窗口管理器桌面环境

运行

参见: Start X at Boot (简体中文)

小贴士: 最简单的方法是使用 登录管理器 例如 GDM, KDM or SLiM.

如果不用登陆管理器启动 X,需要安装软件包 xorg-xinit。也可以选择使用 xorg-twm, xorg-xclockxterm 作为默认环境。

startxxinit 命令将启动 X 服务器和客户端(startx 脚本是更通用命令 xinit 的前端)。为了确定要运行的客户端,startx/xinit 先在用户目录解析 ~/.xinitrc 文件,如果 ~/.xinitrc 不存在,使用默认的 /etc/X11/xinit/xinitrc, 其中默认会使用 Twm 窗口管理器,XclockXterm.

更多信息请阅读 xinitrc (简体中文).

注意:
  • 如果出现问题,请检查日志文件 /var/log/Xorg.0.log. 看看有没有以(EE)(代表错误) 或 (WW) (代表警告)开头的内容。
  • 如果 $HOME 中有空 .xinitrc 文件,请删除或修改它。否则 X 会显示空白屏幕,而且 Xorg.0.log 中没有任何错误。删除它会运行一个默认的环境。

配置

Xorg 可以通过 /etc/X11/xorg.conf/etc/xorg.conf 和位于 /etc/X11/xorg.conf.d/ 的配置文件配置。Arch 在 /etc/X11/xorg.conf.d 提供了默认的配置文件。大部分系统不需要任何配置就能正常使用。用户可以创建自己的配置文件,需要以 XX- 开头(XX 是数字)并以.conf 结尾(例如 10 在 20 之前读取)。

此外,显卡驱动可能提供了自动配置工具,例如 NVIDIA 提供了 nvidia-xconfig,ATI 提供了 aticonfig

输入设备

触摸板和触摸屏

主页面:Touchpad Synaptics (简体中文)

如果您使用笔记本,需要安装触摸板驱动。官方软件仓库中提供了 xf86-input-synaptics 软件包。

安装后,/etc/X11/xorg.conf.d 目录会有 10-synaptics.conf 文件,可以安全的从 10-evdev.conf "InputClass" 行注释或删除 touchpad 有关的内容。

Disabling Input Hot-plugging

Since version 1.8 Xorg-server uses udev for device detection. The following will disable the use of udev.

Section "ServerFlags"
    Option "AutoAddDevices" "False"
EndSection
Warning: This will disable Xorg hot-plugging for all input devices and revert to the same behavior as xorg-server 1.4. It is much more convenient to let udev configure your devices. Therefore, disabling hot-plugging is not recommended!

键盘设置

Xorg 可能会探测键盘失败,这可能是没有正确设置键盘布局(keyboard layout)和键盘模型(keyboard model)。

想看keyboard models, layouts, variants and options的完整的列表, 请打开 /usr/share/X11/xkb/rules/xorg.lst

想要为当前的 Xorg 会话设定键盘映射:

# setxkbmap dvorak

Key repeat delay and rate

Use xset r rate DELAY RATE to change them, then use xinitrc to make it permanent.

Viewing Keyboard Settings

$ setxkbmap -print -verbose 10
 Setting verbose level to 10
 locale is C
 Applied rules from evdev:
 model:      evdev
 layout:     us
 options:    terminate:ctrl_alt_bksp
 Trying to build keymap using the following components:
 keycodes:   evdev+aliases(qwerty)
 types:      complete
 compat:     complete
 symbols:    pc+us+inet(evdev)+terminate(ctrl_alt_bksp)
 geometry:   pc(pc104)
 xkb_keymap {
         xkb_keycodes  { include "evdev+aliases(qwerty)" };
         xkb_types     { include "complete"      };
         xkb_compat    { include "complete"      };
         xkb_symbols   { include "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)"    };
         xkb_geometry  { include "pc(pc104)"     };
 };

Setting Keyboard Layout With Hot-Plugging

To permanently change your keyboard layout, add the following to xorg.conf:

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard	   "yes"
    Option	           "XkbLayout" "dvorak"
EndSection
Note: This is in an InputClass Section and not the InputDevice section for the keyboard.

Setting Keyboard Layout Without Hot-Plugging (deprecated)

Note: Changing the keyboard layout through this method requires disabling input hot-plugging.

在keyboard InputDevice section中使用XkbLayout选项来改变键盘布局。如果你有一个英文布局的键盘,如下所示:

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option "XkbLayout" "gb"
EndSection

在keyboard InputDevice section中使用XkbModel选项来改变键盘模型。如果你有一个 Microsoft 的无线多媒体键盘,如下所示:

Option "XkbModel" "microsoftmult"

Switching Between Keyboard Layouts

Note: You need to install xorg-xkbevd and add xkbevd to DAEMONS section of /etc/rc.conf.

To be able to easily switch keyboard layouts, modify the Options used in either of the above two methods. For example, to switch between a US and a Swedish layout using the Template:Keypress key, create a file /etc/X11/xorg.conf.d/01-keyboard-layout.conf with the following content:

Section "InputClass"
        Identifier "keyboard-layout"
        MatchIsKeyboard   "on"
        Option "XkbLayout"  "us, se"
        Option "XkbOptions" "grp:caps_toggle"
EndSection

You can get a list of possible options for grp: in /usr/share/X11/xkb/rules/xorg.lst (they start about mid way in the file).

As an alternative, you can add the following to your .xinitrc:

setxkbmap -layout "us, se" -option "grp:caps_toggle"

This is mainly useful if you run a Desktop Environment which does not take care of keyboard layouts for you.

Enable pointerkeys

Mouse keys is now disabled by default and has to be manually enabled:

/etc/X11/xorg.conf.d/20-enable-pointerkeys.conf
Section "InputClass"
    Identifier      "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option          "XkbOptions" "keypad:pointerkeys"
EndSection

You can also run:

$ setxkbmap -option keypad:pointerkeys

Both will make the Template:Keypress shortcut toggle mouse keys.

InputClasses

Taken from: https://fedoraproject.org/wiki/Input_device_configuration

InputClasses are a new type of configuration section that does not apply to a single device but rather to a class of devices, including hotplugged devices. An InputClass section's scope is limited by the matches specified – to apply to an input device, all matches must apply to a device. An example InputClass section is provided below:

Section "InputClass"
    Identifier      "touchpad catchall"
    MatchIsTouchpad "on"
    Driver           "synaptics"
EndSection

The next snippet might also be helpful:

Section "InputClass"
        Identifier "evdev touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

If this snippet is present in the xorg.conf or xorg.conf.d, any touchpad present in the system is assigned the synaptics driver. Note that due to precedence order (alphanumeric sorting of xorg.conf.d snippets) the Driver setting overwrites previously set driver options – the more generic the class, the earlier it should be listed. The default snippet shipped with the xorg-x11-drv-Xorg package is 00-evdev.conf and applies the evdev driver to all input devices.

The match options specify which devices a section may apply to. To match a device, all match lines must apply. The following match lines are supported (with examples):

  • MatchIsPointer, MatchIsKeyboard, MatchIsTouchpad, MatchIsTouchscreen, MatchIsJoystick – boolean options to apply to a group of devices.
  • MatchProduct "foo|bar": match any device with a product name containing either "foo" or "bar"
  • MatchVendor "foo|bar|baz": match any device with a vendor string containing either "foo", "bar", or "baz"
  • MatchDevicePath "/dev/input/event*": match any device with a device path matching the given patch (see fnmatch(3) for the allowed pattern)
  • MatchTag "foo|bar": match any device with a tag of either "foo" or "bar". Tags may be assigned by the config backend – udev in our case – to label devices that need quirks or special configuration.

An example section for user-specific configuration is:

Section "InputClass"
    Identifier     "lasermouse slowdown"
    MatchIsPointer "on"
    MatchProduct   "Lasermouse"
    MatchVendor    "LaserMouse Inc."
    Option         "ConstantDeceleration" 20
EndSection

This section would match a pointer device containing "Lasermouse" from "Lasermouse Inc." and apply a constant deceleration of 20 on this device – slowing it down by factor 20.

Some devices may get picked up by the X server when they really should not be. These devices can be configured to be ignored:

Section "InputClass"
    Identifier     "no need for accelerometers in X"
    MatchProduct   "accelerometer"
    Option         "Ignore" "on"
EndSection

Example configurations

The following subsections describe example configurations for commonly used configuration options. Note that if you use a desktop environment such as GNOME or KDE, options you set in the xorg.conf may get overwritten with user-specific options upon login.

Example: Wheel Emulation (for a Trackpoint)

If you own a computer with a Trackpoint (a Thinkpad for example) you can add the following to the xorg.conf to use the middle Button to emulate a mouse wheel:

Section "InputClass"
    Identifier     "Wheel Emulation"
    MatchIsPointer "on"
    MatchProduct   "TrackPoint"
    Option         "EmulateWheelButton" "2"
    Option "EmulateWheel" "on"
EndSection

For full support of TrackPoints (including horizontal scrolling) you can use the following:

Section "InputClass"
    Identifier	"Trackpoint Wheel Emulation"
    MatchProduct	"TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"
    MatchDevicePath	"/dev/input/event*"
    Option		"EmulateWheel"		"true"
    Option		"EmulateWheelButton"	"2"
    Option		"Emulate3Buttons"	"false"
    Option		"XAxisMapping"		"6 7"
    Option		"YAxisMapping"		"4 5"
EndSection
Example: Tap-to-click

Tap-to-click can be enabled in the mouse configuration dialog (in the touchpad tab) but if you need tapping enabled at gdm already, the following snippet does it for you:

Section "InputClass"
    Identifier "tap-by-default"
    MatchIsTouchpad "on"
    Option "TapButton1" "1"
EndSection
Example: Keyboard layout and model on Acer 5920G Laptop

Keyboard model and layout may be set in the file /etc/X11/xorg.conf.d/keyboard.conf or any other .conf file in the same directory.

  • MatchIsKeyboard "yes": set the input device to a keyboard
  • Option "XkbModel" "acer_laptop": set the keyboard model to an Acer * Option "XkbLayout" "be": set the keyboard layout to belgian. You may replace be with whatever layout you have.
  • Option "XkbVariant" "sundeadkeys": set the layout variant to Sun dead keys. You may omit the XkbVariant option if you stick with the default variant.

laptop keyboard. You may replace acer_laptop with your actual keyboard layout.

Note that a list of keyboard layouts and models can be found in /usr/share/X11/xkb/rules/base.lst

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option                 "XkbModel" "acer_laptop"
    Option                 "XkbLayout" "be"
    Option                 "XkbVariant" "sundeadkeys"
EndSection

图形

驱动安装

默认驱动为 Vesa (xf86-video-vesa),可以应用于大部分芯片组但没有任何 2d 或 3d 加速。要启动图形加速,需要安装显卡对应的驱动。

首先,确定显卡:

$ lspci | grep VGA

然后安装对应驱动。可以通过如下命令查找:

$ pacman -Ss xf86-video

常用开源驱动:

常用专有驱动:

Xorg 不用闭源驱动也能正常工作。只有需要一些高级功能时才需要这些闭源驱动,例如游戏的快速 3D 加速、多屏幕和电视输出等。

显示器设置

Getting started

Note: This step is OPTIONAL and should not be done unless you know what you are doing.
This step is NOT OPTIONAL if using dual monitors or the nouveau driver. See Nouveau#Configuration.

First, create a new config file, such as /etc/X11/xorg.conf.d/10-monitor.conf.

Insert the following code into the config file mentioned above:

Section "Monitor"
    Identifier    "Monitor0"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "vesa" #Choose the driver used for this monitor
EndSection

Section "Screen"
    Identifier    "Screen0"  #Collapse Monitor and Device section to Screen section
    Device        "Device0"
    Monitor       "Monitor0"
    DefaultDepth  16 #Choose the depth (16||24)
    SubSection "Display"
        Depth     16
        Modes     "1024x768_75.00" #Choose the resolution
    EndSubSection
EndSection

Multiple monitors/Dual screen

NVIDIA

Please see: NVIDIA#Multiple monitors.

More than one graphics card

You must define the correct driver to use and put the bus ID of your graphic cards.

Section "Device"
    Identifier      "Screen0"
    Driver          "nouveau"
    BusID           "PCI:0:12:0"
EndSection

Section "Device"
    Identifier      "Screen1"
    Driver          "radeon"
    BusID           "PCI:1:0:0"
EndSection

To get your bus ID:

$ lspci | grep VGA
01:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)

The bus ID here is 1:0:0.

Script to toggle internal/external display for laptops

Script can be used to the keyboard shortcut.

#!/bin/bash

IN="LVDS1"
EXT="VGA1"

if (xrandr | grep "$EXT" | grep "+")
    then
    xrandr --output $EXT --off --output $IN --auto
    else
        if (xrandr | grep "$EXT" | grep " connected")
            then
            xrandr --output $IN --off --output $EXT --auto
        fi
fi

Internal/external display names you can check:

# xrandr -q

If you do not have xrandr, install xorg-xrandr to use it.

Display Size and DPI

The DPI of the X server is determined in the following manner:

  1. The -dpi command line option has highest priority.
  2. If this is not used, the DisplaySize setting in the X config file is used to derive the DPI, given the screen resolution.
  3. If no DisplaySize is given, the monitor size values from DDC are used to derive the DPI, given the screen resolution.
  4. If DDC does not specify a size, 75 DPI is used by default.

In order to get correct dots per inch (DPI) set, the display size must be recognized or set. Having the correct DPI is especially necessary where fine detail is required (like font rendering). Previously, manufacturers tried to create a standard for 96 DPI (a 10.3" diagonal monitor would be 800x600, a 13.2" monitor 1024x768). These days, screen DPIs vary and may not be equal horizontally and vertically. For example, a 19" widescreen LCD at 1440x900 may have a DPI of 89x87. To be able to set the DPI, the Xorg server attempts to auto-detect your monitor's physical screen size through the graphic card with DDC. When the Xorg server knows the physical screen size, it will be able to set the correct DPI depending on resolution size.

To see if your display size and DPI are detected/calculated correctly:

$ xdpyinfo | grep -B2 resolution

Check that the dimensions match your display size. If the Xorg server is not able to correctly calculate the screen size, it will default to 75x75 DPI and you will have to calculate it yourself.

如果你对于屏幕显示的物理大小有要求,可以在 Xorg 配置文件中输入,这样显示尺寸就会设置为你所需要的DPI.在Monitor段中以毫米(mm)为单位设置显示大小:

Section "Monitor"
    Identifier "Monitor0"
    DisplaySize 286 179    # In millimeters
EndSection

If you only want to enter the specification of your monitor without creating a full xorg.conf create a new config file. For example (/etc/X11/xorg.conf.d/90-monitor.conf):

Section "Monitor"
    Identifier "<default monitor>"
    DisplaySize 286 179    # In millimeters
EndSection

If you do not have specifications for physical screen width and height (most specifications these days only list by diagonal size), you can use the monitor's native resolution (or aspect ratio) and diagonal length to calculate the horizontal and vertical physical dimensions. Using the Pythagorean theorem on a 13.3" diagonal length screen with a 1280x800 native resolution (or 16:10 aspect ratio):

echo 'scale=2;sqrt(1280^2+800^2)' | bc  # 1509.43698

This will give the pixel diagonal length and with this value you can discover the physical horizontal and vertical lengths (and convert them to millimeters):

echo 'scale=2;(13.3/1509)*1280*25.4' | bc  # 286.43072
echo 'scale=2;(13.3/1509)*800*25.4'  | bc  # 179.01920
Note: This calculation works for monitors with square pixels; however, there is the seldom monitor that may compress aspect ratio (e.g 16:10 aspect resolution to a 16:9 monitor). If this is the case, you should measure your screen size manually.
Setting DPI manually

DPI can be set manually if you only plan to use one resolution (DPI calculator):

Section "Monitor"
    Identifier "Monitor0"
    Option   "DPI" "96 x 96"
EndSection

如果你使用 nVidia 的显卡,你可以手动设置,添加下面两行到/etc/X11/xorg.conf.d/20-nvidia.confDevice段中即可:

Option "UseEdidDpi" "False"
Option  "DPI" "96 x 96"

For RandR compliant drivers, you can set it by:

xrandr --dpi 96

See Execute commands after X start to make it permanent.

DPMS

DPMS (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use. This will allow you to have your monitors automatically go into standby after a predefined period of time. See: DPMS

Composite

The Composite extension for X causes an entire sub-tree of the window hierarchy to be rendered to an off-screen buffer. Applications can then take the contents of that buffer and do whatever they like. The off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers.

The Composite extension can't be used simultaneously with Xinerama. However, it can be used simultaneously with Nvidia Twinview.

Disabling the extension

The composite extension is enabled by default. To disable it, add this to xorg.conf or a file in /etc/xorg.conf.d:

Section "Extensions"
    Option "Composite" "Disable"
EndSection

This may slightly improve your performance with some drivers.

See also

配置文件样例

Anyone who has an xorg.conf file written up that works, go ahead and post a link to it here for others to look at. Please do not in-line the entire configuration file; upload it somewhere else and link to it.

请只贴热插拔示例否则注明配置未使用热插拔 (Xorg 1.8 = udev)

示例1 : xorg.conf & /etc/X11/xorg.conf.d/10-evdev.conf

这是 /etc/X11/xorg.conf.d/10-evdev.conf 配置键盘布局的示例:

注意: "InputDevice" 部分已经注释掉,因为它们由 10-evdev.conf 负责。
xorg.conf: http://pastebin.com/raw.php?i=EuSKahkn
/etc/X11/xorg.conf.d/10-evdev.conf: http://pastebin.com/raw.php?i=4mPY35Mw
/etc/X11/xorg.conf.d/10-monitor.conf (VMware): http://pastebin.com/raw.php?i=fJv8EXGb
/etc/X11/xorg.conf.d/10-monitor.conf (KVM): http://pastebin.com/raw.php?i=NRz7v0Kn

技巧和窍门

调整 X 启动参数(/usr/bin/startx)

参看X的选项:

$ man Xserver

以下的选项可以附加在/usr/bin/startx文件的"defaultserverargs"变量中.

  • 为16位字体使能延缓字形加载:
-deferglyphs 16
注意: 如果你用kdm启动x, 则不会执行startx脚本。上述这些选项必须加在/usr/share/config/kdm/kdmrc文件的"ServerArgsLocal"或者"ServerCmd"变量中. 缺省kdm的选项是
ServerArgsLocal=-nolisten tcp 
ServerCmd=/usr/bin/X

Virtual X session

To start another X session in, for example, Template:Keypress, you need to type this on a console:

xinit /path/to/wm -- :1

Change "/path/to/wm" to your window manager start file or to your login manager like gdm, kdm, or slim.

Nested X session

To run a nested session of another desktop environment:

$ /usr/bin/Xnest :1 -geometry 1024x768+0+0 -ac -name Windowmaker & wmaker -display :1

This will launch a Window Maker session in a 1024 by 768 window within your current X session.

This needs the package xorg-server-xnest to be installed.

故障和修复

通用问题

如果你在使用Xorg中遇到问题,无法启动或者黑屏,鼠标键盘不能正常工作,那么先进行以下步骤:

  • 查看log日志文件:cat /var/log/Xorg.0.log
  • 需要安装输入驱动:(鼠标、键盘、触摸板等)
  • 最后,在ATI, IntelNVIDIA等文章中搜索常见问题。

Ctrl-Alt-Backspace无法退出X

There are two ways of restoring Template:Keypress; with and without input-hotplugging. Using hot-plugging is recommended.

使用input hot-plugging

System-wide

Within /etc/X11/xorg.conf.d/10-evdev.conf, simply add the following:

Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard	"yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
注意: 在KDE中,这种全局设置没有任何效果。恢复的方法是,通过Kickoff启动器 > 计算机 > 系统设置打开系统设置窗口。点击“输入设备”,在新窗口中选择“键盘”,然后点击“高级”标签页。点选“配置键盘选项”选框。展开“杀死X服务器的键盘序列”菜单,确定选中 Template:Keypress ,点击“应用”按钮然后关闭系统设置窗口。Template:Keypress 又回来啦。
User-specific

另外一种方法是加入以下内容到~/.xinitrc

setxkbmap -option terminate:ctrl_alt_bksp
Note: This setting has no effect on Gnome 3.

Without input hot-plugging

新版xorg缺省关闭了使用Template:Keypress+Template:Keypress+Template:Keypress组合键来注销X的功能。你可以在/etc/X11/xorg.conf加入以下内容:

Option  "XkbOptions" "terminate:ctrl_alt_bksp" 

到键盘的 InputDevice 段来打开它

Apple 的键盘问题

参见 Apple Keyboard

触摸板点击不正常

参见: Synaptics

额外的鼠标按键不工作

参见:Get All Mouse Buttons Working

无法用"su"以root身份启动X客户端

如果你遇到"Client is not authorized to connect to server",尝试将以下内容

 session        optional        pam_xauth.so

加入到/etc/pam.d/su文件中。pam_xauth 就可以正常设置环境变量以及处理 xauth 密钥了。

无法加载'(null)'字体

  • 一些程序无法运行,提示无法加载`(null)'字体.

这些软件包可能需要一些额外的字体。某些程序只能使用位图字体。 目前有两种主要的位图字体包:xorg-fonts-75dpixorg-fonts-100dpi。选择其中一个就可以了。通过下面这个命令查看显示设置:

$ xdpyinfo | grep resolution

根据显示信息选择合适dpi的字体即可(用75 或 100 代替XX):

# pacman -S xorg-fonts-XXdpi

无法运行在frambuffer模式下

如果X启动失败,日志中有以下信息:

 (WW) Falling back to old probe method for fbdev
 (II) Loading sub module "fbdevhw"
 (II) LoadModule: "fbdevhw"
 (II) Loading /usr/lib/xorg/modules/linux//libfbdevhw.so
 (II) Module fbdevhw: vendor="X.Org Foundation"
        compiled for 1.6.1, module version = 0.0.2
        ABI class: X.Org Video Driver, version 5.0
 (II) FBDEV(1): using default device
  
 Fatal server error:
 Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices

只需要卸载xf86-video-fbdev就可以了。

Matrox显卡的DRI功能失效

如果你使用的是Matrox显卡,在升级到Xorg7后它的DRI功能失效,试着在xorg.conf的显卡设备设置段Device section中加入下面一行:

Option "OldDmaInit" "On"

修复:在出现GUI登录界面之前,不启动Xorg

如果Xorg设置为自动启动并且出于某些原因你不想让它出现在 登录/显示 管理器之前(例如,你的/etc/rc.conf 文件配置有误导致Xorg没有认出你的鼠标或者键盘输入设备。),有两种办法。在Grub菜单你可以在kernel行指定运行级,方法是在kernel行尾添加一个数字来指定你想要的运行级。下面的例子设置运行级为3:

kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/..ro 3

如果你不止是/etc/rc.conf 配置有误导致Xorg不可用,并且还设置了grub菜单等待时间为零,或者其他某些原因没法使用grub来不让Xorg启动,那就必须用Arch Live CD了。启动Live CD并以root用户登录,你需要一个挂载点,例如 /mnt,并且要知道你想要挂载的分区名。

可以以root用户使用命令
# fdisk -l
来查看你的全部分区。通常你所要的那个是形如 /dev/sda1 这样的东东。然后,使用命令
# mount /dev/sda1 /mnt

挂载该分区至 /mnt。 这样你的文件系统就挂载在了 /mnt 下。例如,你的/etc/rc.conf文件就在 /mnt/etc/rc.conf 。这样你就可以删除 gdm 守护进程来阻止Xorg正常启动,或者做其他一些必需的改动。

X failed to start : Keyboard initialization failed

If your hard disk is full, startx will fail. /var/log/Xorg.0.log will end with:

(EE) Error compiling keymap (server-0)
(EE) XKB: Couldn't compile keymap
(EE) XKB: Failed to load keymap. Loading default keymap instead.
(EE) Error compiling keymap (server-0)
(EE) XKB: Couldn't compile keymap
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
Fatal server error:
Failed to activate core devices.
Please consult the The X.Org Foundation support  at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
 (II) AIGLX: Suspending AIGLX clients for VT switch

Make some free space on your root partition and X will start.