Monthly Archives: October 2009

Using synaptics Touchpad via hal

When reinstalling my notebook, I wanted the Xorg-Server to use the event based device system, but also have the advantage of the synaptics driver.

Easiest approach to realize that, is using the hardware abstraction layer to detect X11 input devices.

First of all we need evdev and synaptics as input devices, as well as the hal and dbus useflag in our make.conf.


USE="${USE} hal dbus"
INPUT_DEVICES="synaptics evdev"

Now remerge the xorg-packages if use flags have changed:

emerge -uNDav --oneshot xorg-drivers xorg-server

Although they should start automatically, it’s no bad idea to add hald and dbus to a runlevel.

rc-update add hald boot
rc-update add dbus boot

Next step is to tell hal what to do with input devices. Fortunatelly gentoo ships predefined rules we can copy:

cp /usr/share/hal/fdi/policy/10osvendor/{10-x11-input.fdi,11-x11-synaptics.fdi} /etc/hal/fdi/policy/

These two files define the X11 options for every detected keyboard, mouse and synaptics touchpad. If you want your old xorg configuration, it’s necessary to rewrite the Options of your xorg.conf input related sections into these files.

For example to activate clicking by tapping for the synaptics touchpad, the line

Option "TapButton1" "1"

of the xorg.conf will now move to 11-x11-synaptics.fdi:

<merge key="input.x11_options.TapButton1" type="string">1</merge>

Anyhow, on my system this tweak didn’t work correctly, so i had to add a little startup script:


synclient TapButton1=1
syndaemon -i1 -k -t -d

Don’t forget to make it executable:

chmod a+x ~/.kde4/Autostart/synaptics

If you’re not using kde4, you may place these lines in your ~/.xinitrc

Note: syndaemon is a utility that locks the touchpad while typing, feel free to leave this line out if you don’t like that.

Now comes the fun part, commenting out every input related section of the xorg.conf, because all this is now managed by hald. In my case, the new /etc/X11/xorg.conf looks like this:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
#    InputDevice    "Keyboard0" "CoreKeyboard"
#    InputDevice    "Mouse0" "CorePointer"
    Option "AllowEmptyInput" "true"
#Section "InputDevice"
#    # generated from data in "/etc/conf.d/gpm"
#    Identifier     "Mouse0"
#    Driver         "mouse"
#    Option         "Protocol" "ImPS/2"
#    Option         "Device" "/dev/input/mice"
#    Option         "Emulate3Buttons" "no"
#    Option         "ZAxisMapping" "4 5"

#Section "InputDevice"
#    # generated from default
#    Identifier     "Keyboard0"
#    Driver         "evdev"
#    Option         "XkbModel"   "pc105"
#    Option         "XkbLayout"  "de"
#    Option         "XkbVariant" "nodeadkeys"
#    Option         "AutoRepeat" "500 30"

I had some strange results when starting X the first time, so i set the “AllowEmptyInput” Option, that fixed it for me.

That’s it. Now reboot and enjoy.

VN:F [1.9.22_1171]
Rating: 5.5/10 (2 votes cast)
Wir benutzen Cookies um die Nutzerfreundlichkeit der Webseite zu verbessen. Durch Deinen Besuch stimmst Du dem zu.