I would like to know how to determine which driver (out of those below) is handling my touchpad:
appletouch.ko.gz, cyapa.ko.gz, sermouse.ko.gz, synaptics_usb.ko.gz, bcm5974.ko.gz, psmouse.ko.gz, synaptics_i2c.ko.gz, vsxxxaa.ko.gz
It's likely that none of them are doing it. On my system for example where I'm using Fedora 19 and a Thinkpad 410 with a Synaptic touchpad I have no Kernel driver as well.
$ lsmod|grep -iE "apple|cyapa|sermouse|synap|psmouse|vsxx|bcm"
So then what's taking care of this device? Well it's actually this Kernel module:
$ lsmod|grep -iE "input" uinput 17672 0
If you want to see more about this module you can use
$ modinfo uinput filename: /lib/modules/3.13.11-100.fc19.x86_64/kernel/drivers/input/misc/uinput.ko version: 0.3 license: GPL description: User level driver support for input subsystem author: Aristeu Sergio Rozanski Filho alias: devname:uinput alias: char-major-10-223 ...
As it turns out input devices such as these are often dealt with at a higher level, in this case the actual drivers are implemented at the X11 level.
uinput is a linux kernel module that allows to handle the input subsystem from user land. It can be used to create and to handle input devices from an application. It creates a character device in /dev/input directory. The device is a virtual interface, it doesn't belong to a physical device.
They're in X11's subsystem. You can see the device using the
xinput --list command. For example, Here's the devices on my Thinkpad laptop:
$ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=9 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint id=13 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)] ↳ ThinkPad Extra Buttons id=14 [slave keyboard (3)]
Notice that my TouchPad shows up in this list. You can find out additional info about these devices through
/proc, for example:
$ cat /proc/bus/input/devices ... I: Bus=0011 Vendor=0002 Product=0007 Version=01b1 N: Name="SynPS/2 Synaptics TouchPad" P: Phys=isa0060/serio1/input0 S: Sysfs=/devices/platform/i8042/serio1/input/input5 U: Uniq= H: Handlers=mouse0 event4 B: PROP=9 B: EV=b B: KEY=6420 30000 0 0 0 0 B: ABS=260800011000003 ...
Digging deeper if your system is using a Synaptic touchpad (which I believe they make ~90% of all touchpads), you can do a
locate synaptics | grep xorg which should reveal the following files:
$ locate synaptics | grep xorg /usr/lib64/xorg/modules/input/synaptics_drv.so /usr/share/X11/xorg.conf.d/50-synaptics.conf /usr/share/doc/xorg-x11-drv-synaptics-1.7.1 /usr/share/doc/xorg-x11-drv-synaptics-1.7.1/COPYING /usr/share/doc/xorg-x11-drv-synaptics-1.7.1/README
The first results there is the actual driver you're asking about. It get's loaded into X.org via the second file here:
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" EndSection
And this line:
Is what associates the physical devices with this driver. And you're probably asking yourself, how can this guy be so sure? Using this command shows the device associated with my given Synaptic TouchPad using
id=12 from the
xinput --list output I showed earlier:
$ xinput --list-props 12 | grep "Device Node" Device Node (251): "/dev/input/event4"
$ cat /var/log/Xorg.0.log | grep "input driver"
On my laptop it shows:
... [ 9.054] (II) Using input driver 'synaptics' for 'Elan Touchpad' ...