Difference between revisions of "Xorg"

From ArchWiki
Jump to navigation Jump to search
(→‎Running Xorg: Added a note about the empty .xinitrc that Arch installs by default and causes X to stall with seemingly no errors)
(Disable mousekeys in X)
Line 281: Line 281:
  
 
  Option "XkbModel" "microsoftmult"
 
  Option "XkbModel" "microsoftmult"
 +
 +
=====Disable mousekeys permanently=====
 +
To disable the mousekeys permanenly and prevent Shift+NumLock or Shift+Alt+NumLock to enable, edit:
 +
/usr/share/X11/xkb/compat/complete
 +
and comment out:
 +
augment "mousekeys"
 +
augment "accessx(full)"
  
 
===Proprietary drivers===
 
===Proprietary drivers===

Revision as of 15:37, 3 February 2010

Template:Article summary start Template:Article summary text Template:Article summary heading Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end Xorg is the public, open-source implementation of the X window system version 11. Since Xorg is the most popular choice among 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.

Contents

Installing

Before beginning, make sure you do the following:

  1. pacman is configured and refreshed ( pacman -Syy )
  2. Take note about third-party drivers (e.g., NVIDIA or ATI drivers)

First install the complete 'xorg' group:

# pacman -S xorg

The default 'vesa' driver, though widely compatible with nearly all available chip sets, is merely a fall-back (not accelerated and does not support many resolutions). Therefore, a proper video driver should be installed if possible. This command will list all open source video drivers available:

# pacman -Ss xf86-video

Look for the appropriate driver for your card and install it with Template:Codeline.

To discover which card is in your system:

$ lspci | grep "VGA"

You can also install hwdetect (Template:Codeline) or Template:Package AUR (available in the Arch User Repository):

$ hwdetect -s

or:

$ lshw -short

Changes with modular Xorg

This section serves as a reference for those accustomed to older versions of Xorg. Most users can skip to #Configuring.

Most common packages

Make sure you install drivers for mouse, keyboard and video card. For mouse and keyboard, xf86-input-evdev should be sufficient. If not, xf86-input-keyboard and xf86-input-mouse should be installed. Other xf86-input-* packages are available for different input devices.

For the video card, find out which driver is required and install the corresponding xf86-video-* package.

To install all drivers in one run, the xorg-input-drivers and xorg-video-drivers are available.

OpenGL 3D acceleration

X.Org 7.0 on Arch Linux uses a modular design for mesa, the OpenGL rendering system. Several implementations are available:

  • libgl-dri: Open-source DRI OpenGL implementation. Falls back to software rendering when no DRI driver is installed
  • Some other driver providing libGL (ati, nvidia)

When pacman installs an application that needs mesa, it will install one of these packages. To be sure about the right library for your setup, install the library you want prior to installing Xorg. Installing the right package afterwards is also possible, though this gives some dependency errors sometimes, which can be ignored with the -d switch.

glxgears and glxinfo

These applications are included in the Template:Package Official package.

# pacman -S mesa

Changed paths and configuration

Xorg now installs everything in /usr, where the older versions installed in /usr/X11R6. Needed changes in Template:Filename:

Also note that some X configuration tools might stop working. The easiest way to configure Xorg is by installing the correct driver packages and running Template:Codeline, which results in a Template:Filename which only needs modification in the resolutions, mouse configuration and keyboard layouts.

Some packages have hard-coded references to /usr/X11R6. These packages need fixing. In the meantime, look what packages install files in /usr/X11R6, uninstall those, make a symlink from /usr to /usr/X11R6 and reinstall the affected packages. Another option is to move the contents of /usr/X11R6 to /usr and make the symlink.

Or you can just add a second module path via:

ModulePath   "/usr/X11R6/lib/modules"

This example works for Nvidia 76.76.

Note: See this entry for additional upgrade information: http://www.archlinux.org/blog/2006/01/02/how-to-upgrade-xorg/

Configuring

Before you can run Xorg, you may need to configure it so that it knows about your graphics card, monitor, mouse and keyboard. Current versions of Xorg effectively auto-detects (with the help of HAL) most hardware without previous configuration. Because of these improvements, it is recommended that you start without a Template:Filename and add sections only as required.

Follow the directions in #Running Xorg first to determine if configuring Xorg is a necessity for normal functioning. If X works as expected and you still want to have a base Template:Filename file, it is now possible to create it from Xorg's log file.

Xorg -configure

You can use:

# Xorg -configure

or:

# X -configure

The command automatically generates Template:Filename. You can change the output to the current path:

# X -configure ./xorg.conf.new

and copy it to Template:Filename.

hwd

Note: hwd has been updated (ver. 5.5) to work with xorg-server-1.5.x and 1.6.x. Currently, it disables HAL-based input device hot-plugging and instead generates a traditional Template:Filename including input devices.

Perhaps the easiest way of getting Xorg up and running quickly is to use hwd, a tool written by users in the Arch Linux community. It is a hardware-detection tool that has multiple uses, one of which is setting up Xorg. Fortunately, hwd is much more streamlined than xorgconf and does not require any input at all.

First, install the hwd package from the AUR.

Then, simply run the following command to generate a default Template:Filename file:

# hwd -xa

This will overwrite any existing Template:Filename file with a practical set of defaults, based on what hwd detected for your hardware.

Alternatively, you can generate a sample Xorg configuration (Template:Filename) without overwriting your existing settings. To do so, run hwd with the Template:Codeline flag instead:

# hwd -x

Sample result:

/etc/X11/xorg.conf.ati
/etc/X11/xorg.conf.vesa

Your sample file(s) ready, rename 'xorg.conf'.
If unsure first try 'vesa' (default).

To use the sample configuration(s), you must manually rename it. Sample:

# mv /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf

nvidia-xconfig

NVIDIA users can also use

# nvidia-xconfig

when they have official nvidia drivers installed.

Comment the line:

 Load           "type1"

in the Template:Codeline section, since recent Xorg versions do not include the type1 font module (completely replaced by freetype).

From the Xorg.0.log file

If you managed to start X without any xorg.conf file, you can find the default Xorg configuration in Template:Filename. Just copy the text between lines like

(==) --- Start of built-in configuration ---

and

(==) --- End of built-in configuration ---

to your new Template:Filename file.

Manual configuration

Refer to HAL and Template:Codeline to familiarize yourself with Xorg's manual configuration syntax.

Monitor settings

Depending on your hardware, Xorg may fail to detect your monitor capabilities correctly, or you may simply wish to use a lower resolution than your monitor is capable of. You might want to look up the following values in your monitor's manual before setting them. The following settings are specified in section 'Monitor', file Template:Filename:

  • Horizontal sync
HorizSync 28-64
  • Refresh rate
VertRefresh 60

The following are specified in the Screen section:

  • Color depth
Depth 24
  • Resolution
Modes "1280x1024" "1024x768" "800x600"
Display size and DPI

In order to get correct dots per inch (DPI) set, the display size must 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 (an 10.3" diagonal monitor would be 800x600, a 13.2" monitor 1024x768). Now days screens can be of any number of DPI and this may not match horizontal and vertically. 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 dimensions
$ xdpyinfo | grep "dots per inch"

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 do not have specifications for horizontal and physical screen width and height (most specifications these days only list by diagonal size), you can use the monitors 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=5;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 it to millimeters):

echo 'scale=5;(13.3/1509)*1280*25.4' | bc  # 286.43072
echo 'scale=5;(13.3/1509)*800*25.4' | bc   # 179.01920
Note: This calculation works for most monitor sizes, however there is the seldom cheaper 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 you screen size manually.

In the case X ignores your Template:Codeline setting (because of this (bug), add the following line to the Template:Codeline section:

  Option   "NoDDC" "true"

DPI can be set too if you only plan to use one resolution:

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

If for some odd reason that the nvidia drivers don't set the correct DPI, you can turn off auto-detection:

  Option   "UseEdidDpi" "false"

For RandR compliant drivers, you can set it by:

xrandr --dpi 96

You can add that command to your Template:Filename to have the DPI settings applied when you start X manually.

Multi-monitor setups

The easiest way to achieve a working multi-monitor setup is using xrandr after X starts. First, run (from any account):

xrandr -q

This will list all your available video outputs, with some information about them. Assume your output names are VGA-0, DVI-0 and S-video. Then, to merge screens connected to DVI-0 and VGA-0 outputs, you just need to run:

xrandr --output DVI-0 --right-of VGA-0

If this command works for you, just add it to your ~/.xinitrc file.

See HowToRandR12 for more information on multi-monitor setup.

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
Input hot-plugging
Note: 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 configure devices through HAL instead of xorg.conf. See: Xorg Input Hotplugging

Normally, Xorg tries to configure your keyboard using the xf86-input-evdev driver (which in turn uses dbus and HAL) instead of using your configuration settings in xorg.conf. This may result in an undesired auto-configured keyboard layout. The fastest workaround is to disable the hot-plugging mechanism by adding the following section to your xorg.conf:

Section "ServerFlags"
    Option "AutoAddDevices" "False"
EndSection
Keyboard layout
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

Then open Template:Filename and edit "us" in input.xkb.layout to what you want and, if necessary, edit input.xkb.variant too.

For the changes in /etc/hal/fdi/policy/10-keymap.fdi to take effect, you should restart HAL:

# /etc/rc.d/hal restart

and restart Xorg

If this is not working for you, the following command (with your keyboard layout instead of pl), executed in X, should switch to your keyboard layout.

# setxkbmap pl 

To make it permanent you can e.g. add this command to Template:Filename file (before starting the window manager).

Through xorg.conf (deprecated)
Note: Changing the keyboard layout through xorg.conf 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 English layout:

Option "XkbLayout" "gb"

To be able to easily switch keyboard layouts, for example between a US and a Swedish layout use this instead:

Option "XkbLayout" "us, se"
Option "XkbOptions" "grp:caps_toggle"

This makes your Caps Lock key switch between the different layouts. This is mainly useful if you do not run a Desktop Environment which takes care of keyboard layouts for you.

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"
Disable mousekeys permanently

To disable the mousekeys permanenly and prevent Shift+NumLock or Shift+Alt+NumLock to enable, edit:

/usr/share/X11/xkb/compat/complete

and comment out:

augment "mousekeys"
augment "accessx(full)"

Proprietary drivers

If you wish to use third-party graphics drivers, do check that the X server runs OK first. Xorg should run smoothly without official drivers, which are typically needed only for advanced features such as 3D-accelerated rendering for games, dual-screen setups, and TV-out. Refer to the NVIDIA and ATI for help with driver installation.

Fonts

There some tips for setting up fonts in Font Configuration.

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.

Running Xorg

Warning: Unless you have disabled input hot-plugging (not recommended), the HAL daemon needs to be started before running Xorg.

Add hal to the DAEMONS array of Template:Filename:

DAEMONS=(syslogng hal network netfs crond)

Start hal:

# /etc/rc.d/hal start

Finally, start Xorg:

$ startx

or

$ xinit
Note: If you just installed Xorg, there is an empty .xinitrc file in your $HOME that you need to either delete or edit 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.

The default X environment is rather bare, and you will typically seek to install window managers or desktop environments to supplement X. A list of suitable options is present in Common Applications#Window Managers (WM).

If a problem occurs, then view the log at Template:Filename. Be on the lookout for any lines beginning with Template:Codeline which represent errors, and also Template:Codeline which are warnings that could indicate other issues.

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 Template:Codeline in the Template:Filename file:

  • Prevent X from listening on tcp:
-nolisten tcp
Note: This seems to be the default option now in Template:Filename.
  • Getting rid of the gray weave pattern while X is starting and let X set a black root window:
-br
Note: There seems to be no need for that in recent releases of Xorg.
  • 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 Template:Codeline or Template:Codeline in the Template:Filename 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 and slim.

Troubleshooting

This section contains mostly outdated directions involving Template:Filename and updates from ancient Xorg versions. Modifications to Template:Filename for the purpose of input device settings have been deprecated in favor of using HAL rules. Consult HAL, Xorg Input Hotplugging and Synaptics for more information, and read #Common problems before pursuing more exotic solutions.

Translating xorg.conf rules to HAL format

The syntax for HAL Template:Filename files is similar to xorg.conf. For instance:

Option "RightEdge" "5300"

becomes:

<merge key="input.x11_options.RightEdge" type="string">5300</merge>

Common problems

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

  • Run Xorg configure scripts:
# X -Configure
 # pacman -S wgetpaste && wgetpaste /var/log/Xorg.0.log
  • Make sure that HAL has been started prior to running Xorg:
 # /etc/rc.d/hal start
  • Install keyboard and mouse drivers:
 # pacman -S xf86-input-evdev xf86-input-{mouse,keyboard}
  • Finally, search for common problems in ATI, Intel and NVIDIA articles.

Blank screen after starting

Warning: adding users to hal and dbus isn't needed, nor recommended because of possible security breaches resulting from doing so.

Check if the user is in hal and dbus groups:

$ groups username

If not,

# gpasswd -a user hal
# gpasswd -a user dbus

and restart Xorg.

Unrecognized supported resolutions

When restricted to low resolutions, such as 640x480 and 320x480, use Template:Package AUR in the AUR to find the horizontal sync value; Template:Codeline, and add it to the Template:Codeline section in Template:Filename. Other values, Template:Codeline being a likely culprit, might be required for proper functioning.

The following:

Option "ModeValidation" "NoEdidModes"
Option "UseEdid"        "false"

might also be needed (untested).

To switch between layouts with Template:Keypress+Template:Keypress:

Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"

Apple keyboard issues

See: Apple Keyboard

Bitstream-Vera conflict

If you see a message that ttf-bitstream-vera conflicts with Xorg:

  1. Exit the pacman session by answering no.
  2. Remove Xorg, sync pacman and reinstall Xorg:
pacman -Rd xorg && pacman -Syu && pacman -S xorg
3. Update paths in Template:Codeline

/usr/include conflict

The symlinked directories removed by this operation are replaced by real directories in the new Xorg package, causing these file conflicts to appear.

If you see messages about file conflicts in Template:Filename and Template:Filename:

# rm /usr/include/{GL,X11} && pacman -Su

libgl-dri conflict

Note: nvidia-legacy has been replaced by nvidia-71xx and nvidia-96xx. See NVIDIA for further details on which driver to use.

Getting a message similar to:

:: libgl-dri conflicts with nvidia-legacy. Remove nvidia-legacy? [Y/n]

is due to multiple OpenGL implementations conflicting with one another; pacman is attempting to install libgl-dri to satisfy this dependency, in parallel to attempting an upgrade for your existing video drivers, causing a conflict. To solve, try:

  • updating your video driver before a full system update:
# pacman -S nvidia-legacy
# pacman -Syu
  • If that does not work, remove your existing video driver, do the update, then reinstall your driver:
# pacman -Rd nvidia-legacy
# pacman -Syu
# pacman -S nvidia-legacy
:: nvidia-legacy conflicts with libgl-dri. Remove libgl-dri? [Y/n] Y

Mouse wheel not working

The Template:Codeline protocol does not seem to work properly with newer versions of Xorg any more. In the Template:Codeline section for mice, change:

Option         "Protocol" "auto"

to

Option         "Protocol" "IMPS/2"

or

Option         "Protocol" "ExplorerPS/2"

If you were using Template:Codeline to configure your touchpad mouse and its mouse wheel, you will have to start using the synaptics driver instead. The mouse wheel will then be included on the right-hand area of the touchpad.

In Template:Codeline, add:

Load "synaptics"

In Template:Codeline, add:

Driver "synaptics"
Protocol "auto-dev"

Touchpad tap-click issues

Previous versions of Xorg allowed to use the Template:Codeline protocol to configure your mouse, and tapping was enabled, too. Now you have to specify the driver and explicitly enable tapping.

In Template:Codeline, add:

Load "synaptics"

In Template:Codeline, add:

Driver "synaptics"
Protocol "auto-dev"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"

Extra mouse buttons not recognized

See also: Get All Mouse Buttons Working

Intellimouse (ExplorerPS/2) users might find their scroll and side buttons are not behaving as they used to. Previously, Template:Codeline needed:

Option      "Buttons" "7"
Option      "ZAxisMapping" "6 7"

and users also had to run xmodmap to get the side buttons working:

xmodmap -e "pointer=1 2 3 6 7 4 5"

Now, xmodmap is no longer required. Instead, amend Template:Filename:

Option      "Buttons" "5"
Option      "ZAxisMapping" "4 5"
Option      "ButtonMapping" "1 2 3 6 7"

and the side buttons on a 7-button Intellimouse will work like they used to, in addition to not needing to run xmodmap.

Keyboard

Switching to tty1 doesn't work

This problem could be caused by an incorrect auto-generated Template:Filename, wrong layout names in said files, or old xfree86 references.

Auto-generated xorg.conf

Auto-generated Template:Filename files may cause you problems. If you cannot get to tty1 by holding Template:Keypress+Template:Keypress and pressing Template:Keypress, or cannot get the £ sign, check to see if the following entries are in Template:Filename:

Option "XkbLayout"  "uk"         #"uk" is not a real layout, look in /usr/share/X11/xkb/symbols/ for a list of real ones.
                                 #Try "gb" if you want a UK keyboard layout
Option "XkbRules"   "xfree86"    #this should be "xorg"
Option "XkbVariant" "nodeadkeys" #This line is also known to cause the problems described, try commenting it out.
Layout names

If you're not able to:

the problem is that the keyboard layout names have changed and Template:Filename is referring to unexisting files. In this example, sk_qwerty layout does not exist anymore. So replacing:

Option         "XkbLayout" "us,sk_qwerty"

with

Option         "XkbLayout" "us,sk"
Option         "XkbVariant" ",qwerty"

corrected the issues.

Transition from xfree86

You will need to change:

Option         "XkbRules" "xfree86"

to

Option         "XkbRules" "xorg"

AltGr (compose key) stopped functioning

If after an update you cannot use Template:Keypress as expected, try adding this to your keyboard section:

Option      "XkbOptions" "compose:ralt"

This is not the correct way to activate Template:Keypress on a German keyboard (for example, to use the '|' and '@' keys on German keyboards). Just choose a valid keyboard variant for it to work again, for a German keyboard it would be:

Option      "XkbLayout" "de"
Option      "XkbVariant" "nodeadkeys"

The solutions above do not work on an Italian keyboard. To activate Template:Keypress on an Italian keyboard, make sure you have the following lines set up properly:

Driver          "kbd"
Option          "XkbRules"      "xorg"
Option          "XkbVariant"    ""

This might still not be enough for a Swedish keyboard. Try the above, but with lv3 instead of compose;

Option "XkbLayout" "se"
Option "XkbVariant" "nodeadkeys"
Option "XkbOptions" "lv3:ralt_switch"

qwerty layouts with setxkbmap ceased working

If after an update, there are no qwerty layouts (sk_qwerty is missing, for example).

The syntax has changed. If you want to switch your present keyboard layout to any qwerty keyboard layout, use this command:

$ setxkbmap NAME_OF_THE_LAYOUT qwerty

for sk_qwerty, use:

$ setxkbmap sk qwerty

After an update, trying the above command might result in "Error loading new keyboard description". This is because the xserver does not have the rights to write, execute and read in the Template:Filename directory.

Give appropiate permissions to that directory:

# chmod u+rwx /var/tmp

Restart the xserver and you will have deadkeys back. Afterwards, set a layout (e.g., it layout):

$ setxkbmap -layout it

French canadian (old ca_enhanced) layout can't be used

Enabling this layout can be done with hot-plugging or without. The former is recommended.

Enabled hot-plugging

To set the layout without manually changing the HAL FDI policies, use Template:Codeline. Change the X keyboard layout to french canadian with this command:

#setxkbmap ca -variant fr

To make it change automatically, add the following to Template:Filename:

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Keymap French Canadian
Comment=
Exec=setxkbmap ca -variant fr
StartupNotify=false
Terminal=false
Hidden=false

This is confirmed to work with for Xfce4 and LXDE.

Disabled hot-plugging

With newer versions of Xorg, "ca_enhanced" does not exist. Modify Template:Filename by changing:

       Option          "XkbLayout"     "ca_enhanced"

to:

       Option          "XkbLayout"     "ca"
       Option          "XkbVariant"    "fr"

This is presumably similar to the older layout. See also: Gentoo HowTo

Missing libraries

  • Error message: "libX... does not exist"

In most cases, all you need to do is take the name of the library (e.g., Template:Filename), convert it all to lowercase, remove the extension, and install it:

# pacman -S libxau

Packages fail to build; missing X11 includes

Reinstall the packages xproto and libx11:

# pacman -S xproto libx11

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 and xorg-fonts-100dpi. 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

xorg-server 1.5 update: KDE4 Konsole crashes and/or systray icons disappear on right-click

Replace:

Option "BackingStore" "True"

with;

Option "BackingStore" "False"

in Template:Filename.

Updating from "testing" to "extra": missing files

If you have updated from Xorg in testing to Xorg in extra and are finding that many files seem to be missing (including startx, /usr/share/X11/rgb.txt, and others), you may have lost many files due to the xorg-clients package splitting from a single package into many smaller sub packages.

You need to reinstall all the packages that are dependencies of xorg-clients:

# pacman -S xorg-apps xorg-font-utils xorg-res-utils xorg-server-utils \
            xorg-twm xorg-utils xorg-xauth xorg-xdm xorg-xfs xorg-xfwp \
            xorg-xinit xorg-xkb-utils xorg-xsm

Missing MIME types in desktop environment

If you noticed icons missing and cannot click-open files in desktop environments, add the following lines to /etc/profile or your preferred init-script and reboot:

XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share
export XDG_DATA_DIRS

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.

Clients under Xephyr stop functioning

If the client cannot start, a possibility is that connections are being rejected by the X server's security mechanism. You can find a complete explanation and solution in the Debian wiki.

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 Template:Filename. Template:Codeline will then properly set environment variables and handle Template:Codeline keys.

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

Ctrl-Alt-Backspace doesn't work

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

With input hot-plugging

In most situations, using user-specific configuration might be preferred over system-wide.

System-wide

If you are using HAL to manage your keyboard, you must add the following to Template:Filename to enable this behavior. If that file does not exist, copy it from the template at Template:Filename:

# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/10-keymap.fdi

Check for a line resembling this:

<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

If the Template:Codeline line already exists, add Template:Codeline to the existing line:

<merge key="input.xkb.options" type="string">grp:alt_shift_toggle,terminate:ctrl_alt_bksp</merge>

Afterwards, Restart HAL and Xorg.

User-specific

Another way is to add the following line to Template:Filename

setxkbmap -option terminate:ctrl_alt_bksp
Note: If you use a login/display manager like (K/G/X)DM or Slim, you will need to run the above setxkbmap command around your WM/DE's login time. ~/.config/autostart is usually respected for such (using .desktop files). It may also work in ~/.bashrc.

Without input hot-plugging

New Xorg disables zapping with Template:Keypress+Template:Keypress+Template:Keypress by default. You can enable it by adding the following line to Template:Filename,

Option  "XkbOptions" "terminate:ctrl_alt_bksp" 

to Template:Codeline section for keyboard.

Shift-Backspace exits X

In order to disable this feature, add the following to the Template:Codeline section in Template:Filename:

Option    "DontZap"    "off"

To swap from Template:Keypress+Template:Keypress to Template:Keypress+Template:Keypress+Template:Keypress, set the Template:Codeline option to False and use one of the above ways to set the key combination.

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 Template:Filename 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/vmlinuz26 root=/dev/disk/by-uuid/..ro 3
  • If you have not only a faulty Template:Filename 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 Arch live CD. Boot up the live CD and login as root. You need a mount point, such as Template:Filename, 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 Template:Filename. Then, to mount this to Template:Filename, use
 # mount /dev/sda1 /mnt
Then your file-system will show up under Template:Filename. So your Template:Filename file, for example, would be in Template:Filename. From here you can delete the Template:Codeline module to prevent Xorg from booting up normally, or make any other necessary changes.

See also