X-Server-Xorg 1.6 and Input-Hotplug

328

Little more than a month ago Debian unstable was hit by  Xserver-Xorg 1.6 which brings about some changes and new features.
The main changes are with input device handling (mouse, keyboard, touchpad, etc.), which from now on can be handled by HAL instead of X.org.
HAL (hardware abstraction layer) or more precisely hald (hal-daemon) is a service that governs connected devices in realtime (see [2]).

The most important new feature is input-hotplugging (i-h), which handles input devices dynamically.
This results in a considerably simpler and leaner xorg.conf.
After a few weeks of experience with the new features I recommend switching to input-hotplug.  Unfortunately there is no tool yet to handle switching, so depending on your system there might be more or less manual changes needed.

The following howto  explains the most common cases (desktops and notebooks with 1 monitor connected) Part 2 is soon to come and will describe how to handle more than 1 monitor with xrandr and xorg.conf.
Please also read the related links under Web-Links all down the page, I cannot cover the complexity of the matter in this howto.

First of all we save our “current” xorg.conf:

     # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old

Now we can clean up xorg.conf, it will look (depending on your graphics card) something like:

Section “ServerFlags”
        Option          “DontZap”       “0”
EndSection

Section “Device”
    Identifier    “Device 0”
    Driver        “radeon”
    BoardName    “ATI Technologies Inc M52 [Mobility Radeon X1300]”
    BusID        “PCI:1:0:0”
EndSection

As you can see all input device sections are gone.

WARNING:
Do not copy the above example but modify your own xorg.conf!

The stanza “DontZap”  in the Section “ServerFlags” provides that the key combination  “Ctrl-Alt-Backspace” to restart the x-server still works.
If you do not want that option, set it to  “1”  (instead of “0”) or delete Section “ServerFlags”  completely.
Depending on your graphics device you may or even have to add additional options in Section “Device” (e.g. UXA 3D-Acceleration, TV-Out, etc.).

 To enable touchpads we need to copy a file, depending if your make is Synaptics or Alps.

In the appendix you find a synaptics.fdi file, which needs to be copied to/etc/hal/fdi/policy.
Alternativlly the package xserver-xorg-input-synaptics has a .fdi file as well (see [3]).
The synaptic.fdi in the appendix (as well as the other .fdi files in there) is generic.
For touchpads you might want to install gsynaptics to easily enable and change values after copying the file.

      # cp synaptics.fdi /etc/hal/fdi/policy  (synaptic.fdi is in the appendix)
       or
      # cp /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi /etc/hal/fdi/policy

In [4] there are some example fdi files:
– for touchpads
– for tablets
– for activating  special keys with e.g HP and other notebooks (see [5])

Unfortunatelly not all input devices have working fdi files yet.
Should your touchpad be from Alps please use the file alps.fdi from the appendix.
Accordingly for tablets by Wacom please use wacom.fdi  from the appendix or the fdi file in [6].

Web-Links:

[2] /usr/share/doc/hal-doc/spec/hal-spec.html
[3] /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi
[4] /usr/share/hal/fdi/policy/
[5] /usr/share/hal/fdi/information/10freedesktop/30-keymap-hp.fdi
[6] /usr/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi
X-StrikeForce Input Hotplug Guide
sidux wiki xorg howto
Brice Goglin’s Blog – X.org Howto

Appendix:

synaptics.fdi
wacom.fdi
alps.fdi