Xorg - ParabolaWiki

# Xorg

Summary
An all-inclusive overview about installing and managing Xorg
Overview
The Xorg project provides a free software implementation of the X Window System – the foundation for a graphical user interface. Desktop environments such as E17, GNOME, KDE, LXDE, and Xfce provide a complete graphical environment. Various window managers offer alternative and novel environments, and may be used standalone to conserve system resources. Display managers provide a graphical login prompt.
Related
Start X at boot
Execute commands after X start
Login Manager
Window Manager
Font Configuration
X11 Cursors
Get All Mouse Buttons Working
Desktop Environment
Wayland
Free Video Drivers
Nouveau
ATI
Intel

Xorg is the public, free software implementation of the X window system version 11. Since Xorg is the most popular choice among GNU/Linux users, its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions. See the Xorg Wikipedia article or visit the Xorg website for more details.

## Installation

First, you will need to install the X server with the package xorg-server, available in the Official Repositories. You may also want the useful utilities cointained in the xorg-apps group.

udev will detect your hardware and evdev will act as the hotplugging input driver for almost all devices. Both of them are already required by xorg-server, so there is no need to explicitly install their packages.

Tip: The default X environment is rather bare, and you will typically seek to install a window manager or a desktop environment to supplement X.

## Running

See also: Start X at boot

Tip: The easiest way to start X is by using a display manager such as GDM, KDM or SLiM.

If you want to start X without a display manager, install the package xorg-xinit. Optionally, the packages xorg-twm, xorg-xclock and xterm allows for a default environment, as described below.

The startx and xinit commands will start the X server and clients (the startx script is merely a front end to the more versatile xinit command). To determine the client to run, startx/xinit will first look to parse a ~/.xinitrc file in the user's home directory. In the absence of ~/.xinitrc, it defaults to the global file /etc/X11/xinit/xinitrc, which defaults to starting a basic environment with the Twm window manager, Xclock and Xterm.

For more information, see xinitrc.

Note:

- If a problem occurs, then view the log at /var/log/Xorg.0.log. Be on the lookout for any lines beginning with (EE), which represent errors, and also (WW), which are warnings that could indicate other issues.
- If there is an empty .xinitrc file in your $HOME, either delete or edit it in order for X to start properly. If you do not do this X will show a blank screen with what appears to be no errors in your Xorg.0.log. Simply deleting it will get it running with a default X environment.

## Configuring

Xorg can be configured via /etc/X11/xorg.conf or /etc/xorg.conf and configuration files located in /etc/X11/xorg.conf.d/. Parabola supplies default configuration files in /etc/X11/xorg.conf.d, and no extra configuration is necessary for most setups. You are free to create new configuration files, but they must start with XX- (where XX is a number) and have a .conf suffix (10 is read before 20, for example).

## Input devices

Installing input drivers is not needed for most hardware. Nevertheless, if evdev does not support your device, install the needed driver from the xorg-drivers group (try pacman -Sg xorg-drivers for a listing).

You should have 10-evdev.conf in the /etc/X11/xorg.conf.d directory, which manages the keyboard, the mouse, the touchpad and the touchscreen.

### Touchpad Synaptics

Main page: Touchpad Synaptics

If you have a laptop, you need to install the touchpad driver provided by the xf86-input-synaptics package in the Official Repositories.

After installation, you can find 10-synaptics.conf in the /etc/X11/xorg.conf.d directory. It is safe to comment out/delete the InputClass line regarding the touchpad in 10-evdev.conf.

### 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!

### Keyboard settings

Xorg may fail to detect your keyboard correctly. This might give problems with your keyboard layout or keyboard model not being set correctly.

To see a full list of keyboard models, layouts, variants and options, open /usr/share/X11/xkb/rules/xorg.lst.

To set the keymap for the current Xorg session:

    # 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" "us"
        Option                 "XkbVariant" "colemak"
    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.

To change the keyboard layout, use the XkbLayout option in the keyboard InputDevice section. For example, if you have a keyboard with the English (Great Britain) layout, your keyboard InputDevice section might look similar to this:

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

To change the keyboard model, use the XkbModel option in the keyboard InputDevice section. For example, if you have a Microsoft Wireless Multimedia Keyboard:

    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 Caps Lock 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 Shift+Num Lock 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

##### Example: Third button emulation (for all attached mice)

Third button emulation allows you to use the 1 and 2 buttons (left and right click) together to produce a button 3 event (middle-click), which is really useful for copy and paste in X.

We will modify the mouse input catchall in /etc/X11/xorg.conf.d/10-evdev.conf

    Section "InputClass"
            Identifier "evdev pointer catchall"
            MatchIsPointer "on"
            MatchDevicePath "/dev/input/event*"
            Driver "evdev"
            Option "Emulate3Buttons"     "True"
            Option "Emulate3Timeout"     "25"
    EndSection

Here you see the Option "Emulate3Buttons" "True" and Option "Emulate3Timeout" "25" options that specify that 3 buttons should be emulated and the delay to recognize both buttons down as a middle click is 25ms.

## Graphics

### Driver installation

The default graphics driver is vesa (xf86-video-vesa), which handles a large number of chipsets but does not include any 2D or 3D acceleration. To enable graphics acceleration, you will need to install and use the driver specific to your graphics card.

First, identify your card:

    $ lspci | grep VGA

Then, install an appropriate driver. You can search for these packages with the following command:

    $ pacman -Ss xf86-video

Common Free software drivers:

- NVIDIA: xf86-video-nouveau (see Nouveau)
- Intel: xf86-video-intel (see Intel)
- ATI: xf86-video-ati (see ATI)

### Monitor settings

#### 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 and 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

##### 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.

If you have specifications on the physical size of the screen, they can be entered in the Xorg configuration file so that the proper DPI is calculated:

    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

If you use an NVIDIA card, you can manually set the DPI adding the options bellow on /etc/X11/xorg.conf.d/20-nouveau.conf (inside Device section):

    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

### Sample xorg.conf Files

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. Please post input hotplugging configurations only, otherwise note that your config is not using input hotplugging. (Xorg 1.11 = udev)

##### - Sample One: xorg sections in separate files

This is a sample of configurations files using separate sections (keyboards, monitors, screens, drivers, etc). Note: The sections are commented out. because is more practical to configure it, example: /etc/X11/xorg.conf.d/50-monitor.conf is taking care of monitor settings.

    /etc/X11/xorg.conf.d/00-xorg-base.conf: http://pastebin.com/raw.php?i=GdnGQZQk
    /etc/X11/xorg.conf.d/10-serverlayout-layout0.conf: http://pastebin.com/raw.php?i=0f1rytQf
    /etc/X11/xorg.conf.d/10-serverlayout-layout1.conf: http://pastebin.com/raw.php?i=PYbmcgtz
    /etc/X11/xorg.conf.d/10-serverlayout-layout2.conf: http://pastebin.com/raw.php?i=rVrgN8rC
    /etc/X11/xorg.conf.d/10-serverlayout-layout3.conf: http://pastebin.com/raw.php?i=Rq9CJ5pi
    /etc/X11/xorg.conf.d/20-inputclass-keyboards.conf: http://pastebin.com/raw.php?i=mqCvaFKv
    /etc/X11/xorg.conf.d/30-screen-screen0.conf: http://pastebin.com/raw.php?i=XFCvUyuU
    /etc/X11/xorg.conf.d/30-screen-screen1.conf: http://pastebin.com/raw.php?i=qSr97KhB
    /etc/X11/xorg.conf.d/30-screen-screen2.conf: http://pastebin.com/raw.php?i=7n5t1gN7
    /etc/X11/xorg.conf.d/30-screen-screen3.conf: http://pastebin.com/raw.php?i=nFudQ2tw
    /etc/X11/xorg.conf.d/40-device-nouveau.conf: http://pastebin.com/raw.php?i=Lk5SM21e
    /etc/X11/xorg.conf.d/50-monitor.conf: http://pastebin.com/raw.php?i=sR05xAeU
    /etc/X11/xorg.conf.d/51-modes.conf: http://pastebin.com/raw.php?i=Me6kFgLa

## Tips and tricks

### X startup (/usr/bin/startx) tweaking

For X's option reference see:

    $ man Xserver

The following options have to be appended to the variable "defaultserverargs" in the /usr/bin/startx file:

- Enable deferred glyph loading for 16 bit fonts:

    -deferglyphs 16

Note: If you start X with kdm, the startx script does not seem to be executed. X options must be appended to the variable "ServerArgsLocal" or "ServerCmd" in the /usr/share/config/kdm/kdmrc file. By default kdm options are:

    ServerArgsLocal=-nolisten tcp
    ServerCmd=/usr/bin/X

### Virtual X session

To start another X session in, for example, Ctrl+Alt+F8, 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.

### Starting GUI Programs Remotely

To start up a program that uses X when logged in remotely (such as through ssh), you need to type this in from the remote login Bash shell:

    export DISPLAY=:0

Then invoke the program the way you would locally from the shell.

Hint: Add that line to ~/.bashrc to have it happen automatically every time you log in.

## Troubleshooting

### Common problems

If Xorg will not start, the screen is completely black, the keyboard and mouse are not working, etc., first take these simple steps:

- Check the log file: cat /var/log/Xorg.0.log
- Install input driver (keyboard, mouse, joystick, tablet, etc...):
- Finally, search for common problems in ATI, Intel and Nouveau articles.

### Ctrl+Alt+Backspace does not work

There are two ways of restoring Ctrl+Alt+Backspace; with and without input-hotplugging. Using hot-plugging is recommended.

#### With 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

Note: On KDE, this system-wide setting has no effect. To restore, go to Kickoff > Computer > System Settings which will open up the System Settings window. Click on 'Input Devices'. In this new window click the Keyboard tab and then click on the advanced tab. In this new window, click the box for 'Configure keyboard options.' Expand the entry for 'Key sequence to kill the X server' and ensure Ctrl+Alt+Backspace is checked. Click Apply and close the System Settings window. You now have your Ctrl+Alt+Backspace back in KDE.

##### User-specific

Another way is to put this line in xinitrc:

    setxkbmap -option terminate:ctrl_alt_bksp

Note: This setting has no effect on Gnome 3.

#### Without input hot-plugging

New Xorg disables zapping with Ctrl+Alt+Backspace by default. You can enable it by adding the following line to /etc/X11/xorg.conf,

    Option             "XkbOptions" "terminate:ctrl_alt_bksp"

to InputDevice section for keyboard.

### Apple keyboard issues

  See: Apple Keyboard

### Touchpad tap-click issues

  See: Synaptics

### Extra mouse buttons not recognized

  See: Get All Mouse Buttons Working

### X clients started with "su" fail

If you are getting "Client is not authorized to connect to server", try adding the line:

    session        optional        pam_xauth.so

to /etc/pam.d/su. pam_xauth will then properly set environment variables and handle xauth keys.

### Program requests "font '(null)'"

- Error message: "unable to load font `(null)'."

Some programs only work with bitmap fonts. Two major packages with bitmap fonts are available, xorg-fonts-75dpi-libre and xorg-fonts-100dpi-libre. You do not need both; one should be enough. To find out which one would be better in your case, try this:

    $ xdpyinfo | grep resolution

and use what is closer to you (75 or 100 instead of XX)

    # pacman -S xorg-fonts-XXdpi-libre

### Frame-buffer mode problems

If X fails to start with the following log messages,

    (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

uninstall fbdev:

    # pacman -R xf86-video-fbdev

### DRI with Matrox cards stops working

If you use a Matrox card and DRI stops working after upgrading to Xorg, try adding the line:

    Option "OldDmaInit" "On"

to the Device section that references the video card in xorg.conf.

### Recovery: disabling Xorg before GUI login

If Xorg is set to boot up automatically and for some reason you need to prevent it from starting up before the login/display manager appears (if /etc/rc.conf is wrongly configured and Xorg does not recognize your mouse or keyboard input, for instance), you can accomplish this task with two methods.

- From the GRUB menu, you can specify the runlevel in the kernel line by adding a number to the end of the kernel line specifying the run level you want. The following example sets the run level to 3:

     kernel /boot/vmlinuz-linux-libre root=/dev/disk/by-uuid/..ro 3

- If you have not only a faulty /etc/rc.conf to make Xorg unusable, but you have also set the GRUB menu wait time to zero, or cannot otherwise use GRUB to prevent Xorg from booting, you can use the Parabola live CD. Boot up the live CD and login as root. You need a mount point, such as /mnt, and you need to know the name of the partition you want to mount.

  You can use the command,

     # fdisk -l

  to see your partitions. Usually, the one you want will be resembling /dev/sda1. Then, to mount this to /mnt, use

     # mount /dev/sda1 /mnt

  Then your filesystem will show up under /mnt. So your /etc/rc.conf file, for example, would be in /mnt/etc/rc.conf. From here you can delete the gdm daemon to prevent Xorg from booting up normally or make any other necessary changes to the configuration.

### 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.

## Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.
Category:

- X Server