Xorg-server 1.8 Upgrade Guide
Xorg can detect input devices using udev, deprecating its HAL support.
Users are strongly encouraged to migrate to udev.
Xorg's configuration is now much more flexible thanks to generic match
options and multiple-file merging capabilities.
Migrating to udev hotplugging
Enabling udev support
Enabling udev just requires building xorg-server with USE="udev".
Match rules usage
Now that Xorg is able to get a list of available input devices using udev
instead of HAL, Xorg's configuration system was changed to make things easier
for users and distribution maintainers alike. With HAL hot-plugging, device
configuration had to be specified using HAL's XML configuration system (the
infamous .fdi files) for Xorg to pick up user preferences such as the
keyboard map or the mouse pointer acceleration.
Since moving those options from HAL to udev seemed like an even worse idea, it
was decided to move them back to Xorg, and make Xorg's configuration much more
Config is stored in xorg.conf or xorg.conf.d
files but the detection is done by udev. So make sure you turn that useflag on.
A new configuration section called InputClass is introduced. It is very
similar to the InputDevice section but can match (and therfore
configure) multiple devices.
The InputClass works by matching one or more properties from the devices
retrieved with udev, using the following match rules:
MatchDevicePath uses fnmatch(3) when available, so you can use wildcard
patterns (eg, Option "MatchDevicePath" "/dev/input/event*").
Code Listing 2.1: Configuring all touchpads to use synaptics driver
Option "RTCornerButton" "2"
Option "HorizEdgeScroll" "true"
Code Listing 2.2: Configuring all keyboards to use specified config
Option "XkbLayout" "us,cz"
Option "XkbVariant" ",qwerty"
Option "XkbOptions" "grp:alt_shift_toggle,grp:switch,compose:rwin,terminate:ctrl_alt_bksp"
XkbOptions shown in the example file are not to be copied directly to your configs. One of
really suprising results for you will be non-working AltGr if you do so.
Code Listing 2.3: Configuring all mice to use specified config
If you do not want to use udev nor HAL, you can either build xorg-server
with USE="-udev -hal" or you can turn the AutoAddDevices option off in
the ServerFlags section of your xorg.conf (or in some file stored
Code Listing 2.4: Turning AutoAddDevices off
Option "AutoAddDevices" "false"
Both options will allow the X server to use the legacy mouse and
Usage of xorg.conf.d
The xorg.conf.d is an additional folder where users can store
adjustments to Xorg's configuraion without touching the main
The order of inheritance is quite simple. If present, xorg.conf be
loaded, then the xorg.conf.d/**.conf files will be parsed next, in
ASCII alphabetical order (so numbers will be first).
Code Listing 3.1: example folder listing for xorg.conf.d
/etc/X11/xorg.conf.d $ ls
50-ati.conf 96-synaptics.conf 97-evdev.conf
Code Listing 3.2: example content of 96-synaptics.conf
Option "AutoServerLayout" "on"
As you can see the code is same as for xorg.conf itself. Only one
addition is the "AutoServerLayout" option. With this option enabled the
device does not need to be referenced in ServerLayout section.
The InputClass section automatically enables the AutoServerLayout option,
you do not need to specify it.
Lenovo HDAPS sensor
For more info see upstream bug.
Code Listing 4.1: Disabling HDAPS accelerometer driver
Identifier "ThinkPad HDAPS blacklist"
MatchProduct "ThinkPad HDAPS accelerometer data"
Option "Ignore" "on"
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.