Bought a shiny new mouse today: the wireless optical Logitech LX7. Everything worked great out of box, until at around 11:30pm I decided to google around to see how to configure the tilt-wheel and back and forward buttons to work in Linux.

Big mistake.

It’s now 1:35am, and I finally have my solution. The trick is to use the evdev X.org input driver, as for some reason the mouse driver can’t handle all of my buttons. I followed sections 1 and 2 of this howto for the general idea of setting up evdev.

The problem is, none of the howtos I dug up really worked. Things sort of worked, but there seemed to be confusion about the number of buttons (xmodmap reported 9, while xev dumped events from up to #12). Also, the tilt wheel mapping seemed to be reversed. At this point, I began to suspect something was going awry, so I started looking over /var/log/Xorg.0.log. Here’s what I found:

For some reason, X seemed to be adding a new <default mouse> InputDevice with the message “No default mouse found, adding one.” This mouse used the standard mouse input driver, and somehow was jumping in front of my configured mouse settings as the default mouse. Oddly, running xinput list showed that my properly configured evdev device was loaded perfectly (with 20 buttons!), but apparently wasn’t being used as the primary mouse.

I persisted twiddling with X config settings and checking the logs, but for some reason, this default mouse would always be created. At this point I started googling this strange “no default mouse found” message. The only apropos result, and my solution, was in this blog post. It seems that someone decided to write a failsafe hack in 7.2 where if no InputDevice using the mouse driver exists in xorg.conf, the server adds one.

As Zaitcev writes, as apparent from the code, this hack has one exception, in which if some InputDevice invokes the driver void, it assumes that the user (as the code states) “probably wants to run footless”, and no default mouse is instantiated. Thus, the solution:

Section "InputDevice"
Identifier    "Configured Mouse"
	Driver        "evdev"
	Option        "CorePointer"
	Option        "Device"        "/dev/input/event2"
EndSection

Section "InputDevice"
	Identifier  "IHATEKLUDGERS"
	Driver      "void"
EndSection

[...]

Section "ServerLayout"
	[...]
	InputDevice    "Configured Mouse"
	InputDevice    "IHATEKLUDGERS"
EndSection

Unbelievable.

Apparently, this will be fixed in 7.3.