Nepherte (dot) be

X.org 7.4 and Hot Pluggable Input Devices

A few weeks ago, X.org 7.4 entered the Arch Linux repositories. The X server has drastically changed compared to its previous version. It is focussed on enabling true hot plugging for input devices. This means that input devices like keyboards, mices and touchpads should no longer be hard coded in your xorg.conf file, but instead will be taken care off by hal. Whenever you plug in an input device, hal will notice it and load the appropriate xml config file. However, the default xml configuration files don’t perfectly suit your input device. This requires you to edit them yourself to fit your devices.

This caused a lot of havoc in the Arch Linux user community. Suddenly a lot of people were having issues with their keyboards, mices and touchpads and were complaining,  although they had been notified by the official site, during upgrading and provided with solid documentation on the wiki. I was very disappointed to see, that instead of reading the information available and solving the problem, they quickly disabled hot plugging. So once and for all, I’ll explain how you can get everything to work again.

Note that these instructions also account for other linux distrubtions. A lot of distros still didn’t include X.org 7.4 but later on you might face the same problems.

General: First of all, you will need the package xf86-input-evdev and if you have a touchpad, you will need xf86-input-synaptics as well. Remove all InputDevice sections and remove them from your ServerLayout and Modules section (always keep a backup file somewhere). When input hotplugging is enabled, X will purge any input devices setup in xorg.conf that are using the kbd, mouse and synaptics driver so it’s pointless to have them. It will only confuse you even more.

Keyboard: The default layout of the xml keyboard file is set to “us” so you’ll likely want it to change. Copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy/10-keymap.fdi. The things you might want to change, are “input.xkb.layout” and “input.xkb.variant. Other options you can change, are “input.xkb.rules”, “input.xkb.model” and “input.xkb.options”. When you use GNOME or KDE,  set your keyboard to “Evdev managed keyboard” in the keyboard preferences of your desktop.

Mouse: They generally don’t need extra configuration. It even recognized most buttons of my Logitech MX Revolution. You can configure it the same way as the keyboard but with the same appropriate options as you would have put in xorg.conf

Touchpad: Copy /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi to /etc/hal/fdi/policy/11-x11-synaptics.fdi. Touchpads require some more attention. You explicitly have to set each option you want (e.g. horizontal and vertical scrolling, tapping, pointer speed, …). For the sake of simplicity, I simply provide my xml config file. If that one doesn’t work, you can look for other examples on the internet.

Now that everything is set, the next time you will start your computer you will have hotplugging enabled and all devices working. Making changes afterwards only requires you restart the hal service. If something still doesn’t work, I recommend you take a look at the Arch Linux wiki about Hot Plugging or do a search on their forums.

1 Comment

    Thanks for the hint on telling KDE about the “Evdev managed keyboard”! Guess what happened to me before I had configured this: AltGr didn’t work, Left had the same functionality as AltGr, and many other cursor keys didn’t work at all.

Leave a Reply