© 2011 Warren Block

Last updated 2011-10-15

Available in HTML or PDF. Links to all my articles here. Created with AsciiDoc.


In January of 2009, a workaround for input problems with the new version of Xorg was entered in /usr/ports/UPDATING. It suggested adding Option "AllowEmptyInput" "off" to xorg.conf.

The very next day, the problem was fixed, but people are still turning off AllowEmptyInput, or recommending it to others. That would be fine, except now it causes problems.

Xorg Input Device Detection

xorg-server 1.5.3 was able to use hald to auto-detect keyboards and mice. Of course, you have to be running hald, and a lot of FreeBSD users were not. Xorg hadn’t needed it before, and entering input device sections in xorg.conf had always been adequate.

Because of the earlier problems, people became convinced that turning off AllowEmptyInput was the way to prevent xorg-server from using hald. In some configurations, that works. Other times, particularly if hald is running, typed characters don’t show up on the screen until the mouse is moved, and mouse movement itself is jerky and doesn’t react smoothly.

What To Do

First, see the FreeBSD Handbook chapter on X11 Configuration and decide if you want to use hald. Some people consider it bumbling but harmless and potentially useful, some consider it pure concentrated evil. Others could not be reached for comment, although their secretaries swore they’d call back.

Using hald For Input Device Detection

To use hald, let it do the work. You don’t need input device sections in xorg.conf at all. xorg-server gets everything from hald. Users with non-English keyboards may have to edit some hald config files as shown in the Handbook to get the correct keymap.

Manual Input Device Definitions

If you run hald but don’t want to use it for input device autodetection, or don’t run hald at all, turn off AutoAddDevices in xorg.conf. You can put the entry in the ServerLayout section, or add a whole new ServerFlags section if you feel the need to complicate things.

Option "AutoAddDevices" "Off"

InputDevice sections will be needed for the keyboard and mouse, and InputDevice entries in the ServerLayout section.


Option "AllowEmptyInput" "Off" (and fire) bad, Option "AutoAddDevices" "Off" good.

If your opinion of hald leans more toward "meh" than "a formless horror which embraces and extends", you don’t need either of the options, just let xorg-server use hald by default.

What AllowEmptyInput Really Means

Option "AllowEmptyInput" "On" means the server may start without any input devices.

Option "AllowEmptyInput" "Off" means the server must have configured input devices at startup.

Attempts to keep old configurations working and a maze of exceptions obscure these meanings. Thanks to Peter Hutterer for clearing it up!

Appendix: Other Reasons AllowEmptyInput Is Bad

AEI hates kittens and puppies and will throw garbage on your lawn.

AEI borrows your stuff and never returns it.

AEI causes trouble and says it was your idea.

AEI cheats at cards.

AEI votes the opposite of you in every election.

AEI hates the music you like.

AEI gives your phone number to telemarketers.

AEI makes fun of your hair.

AEI takes bites out of your sandwich when you’re not looking.

AEI claims to be a good driver, but is not.

AEI recommends buying the extended warranty.

AEI chews with its mouth open. Loudly.