Xorg configuration: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
Line 19: Line 19:


== HAL / evdev ==
== HAL / evdev ==
* Even with evdev, you still need the mouse and keyboard X11 drivers. evdev only finds the devices, and does not provide drivers.


* If you use the evdev driver (you should with xorg-server-1.5.3 and later), the options in xorg.conf are not used. Instead you must create a HAL policy file (/etc/hal/fdi/policy/10-X11-input.fdi):
* If you use the evdev driver (you should with xorg-server-1.5.3 and later), the options in xorg.conf are not used. Instead you must create a HAL policy file (/etc/hal/fdi/policy/10-X11-input.fdi):

Revision as of 19:43, 19 May 2010

Xorg on Gentoo

  • With xorg-server-1.5.4, if you have the hal USE flag enabled, you must configure your input devices via evdev (at the kernel level) and they are autodiscovered / added by HAL. If you disable the hal USE flag, you will use the old way of setting those via the xorg.conf configuration file.

Initial Xorg configuration

  • You can use X -configure, xorgconfig, or xorgcfg. I recommand to use X -configure which creates an useful skeleton file that you can then edit to suit you needs.

Keyboard Layout

  • You should add the following lines to the Xorg configuration file to allow the login window (before KDE is started) to use the correct layout:
       Option "XkbLayout"      "fr"
       Option "XkbModel"       "pc105"

Note that a list of layouts can be found in /etc/usr/share/X11/xkb/symbols.

  • This is obsolete with an evdev xorg, see below.

HAL / evdev

  • Even with evdev, you still need the mouse and keyboard X11 drivers. evdev only finds the devices, and does not provide drivers.
  • If you use the evdev driver (you should with xorg-server-1.5.3 and later), the options in xorg.conf are not used. Instead you must create a HAL policy file (/etc/hal/fdi/policy/10-X11-input.fdi):
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
        <match key="info.capabilities" contains="input.keyboard">
                <merge key="input.x11_options.XkbLayout" type="string">fr</merge>
        </match>
</device>
<device>
        <match key="info.capabilities" contains="input.mouse">
                <merge key="input.x11_driver" type="string">evdev</merge>
                <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
                <merge key="input.x11_options.YAxisMapping" type="string">5 4</merge>
                <merge key="input.x11_options.Buttons" type="string">8</merge>
        </match>
</device>
</deviceinfo>
  • Note: this file is actually not needed, Xorg will work perfectly without it but may pick a wrong keyboard layout for instance.

Xrandr

  • With recent version of Xorg, manual configuration of the xorg.conf file is almost no longer needed. Xrandr kicks in, retrieves information from the monitor and configures Xorg accordingly.
  • The HorizSync, VertRefresh, Modes and Modeline options have been deprecated (although Modeline can still be used with the Option "Preferred Mode"); the only thing that is currently needed now is the Virtual option.
  • The xrandr command line is quite useful.

Nvidia Drivers

  • The current (February 2009) binary drivers don't support XRandR 1.2. To use multiple monitors the best is to use the proprietary TwinView Nvidia feature. It is best to use this via the nvidia-settings GUI application. This won't modify the Xorg configuration files.
  • RandR will appear to be enabled in the Xorg logs, but running xrandr will never show more than the main screen.

Bugs

  • Current Intel X drivers (2.9) have a bug in GEM that makes logout kill X (you return to the console instead of returning to KDM). One workaround is to set TerminateServer=true option in /usr/kde/3.5/share/config/kdm/kdmrc. UPDATE: This has now been fixed.