input woes

Well, you can't say I didn't try. If you look at this question on AskUbuntu, you can certainly say I tried. I tried hard. I tried to exhaust every tool at my disposal to make my new Logitech T630 Ultrathin Bluetooth Touch mouse behave properly in Ubuntu. Unfortunately, it doesn't behave properly and respond to all the things it should, including suggestions from X input hacker Peter Hutterer (who I greatly thank for so generously taking random private messages from me on IRC). I think officially I'm ready to give up.

The verdict: one of three things needs to happen for this to be solved:

  1. hack the device firmware
  2. reverse engineer the non-Linux device drivers
  3. fix how the kernel deals with the mouse

Unfortunately I think part of the problem lies in the fact that the mouse is partially a keyboard. When the gestures happen, keyboard events are the result. It seems to me that this is ripe for the same multitouch treatment the Apple Magic Mouse got.

Oh well.

That's not to say I didn't learn a lot about the whole input process works. That's always helpful for the troubleshooting. Here's a brief run down:

  • First, there's a lot of utilities that have "keyboard" in the name. That doesn't mean they don't work for mice. Yeah, I know: weird.
  • It all starts at the kernel. You can see the currently registered input devices with lsinput. Like with all kernel-level commands, you'll need to sudo.
  • Input events are recorded in /dev/input/eventN where N is some integer. These events can be probed with evemu-record from the evemu-tools package.
  • The kernel registers scancodes. The keymap (accessible from input-kbd from the input-utils package) registers the keycodes (and keynames, like KEY_LEFTCTRL) that should be output in response to the scan codes.
  • Next layer up is the X server. As a general rule, your input device (no matter what kind it is) will be run by evdev (on other Linux systems without HAL, you'll use the mouse and kbd drivers), a generic input driver. Of course, you may have some device that has its own driver, but that's the exception rather than the rule.
  • Since the options of such a driver can only be modified when the server starts, we have xinput which allows us to tweak options on the fly. Don't need sudo, either.

…or at least that's how it should work.

Read and Post Comments