20

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

  • 1
    Do an lsmod and see which of those drivers is loaded. You might also want to read your /var/log/Xorg.0.log. – wingedsubmariner May 22 '14 at 1:24
  • this questions was a follow-up on my previous one. To be honest it looks like none is loaded. – banuy May 22 '14 at 1:39
31

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:

$ 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.

SOURCE: Getting started with uinput: the user level input subsystem

So then where's my touchpad drivers?

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
...

OK but where's the driver?

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:

        MatchDevicePath "/dev/input/event*"

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"
  • Very interesting! As I use mtrack xorg driver instead of synaptics, I found something different from what you said on the mtrack page: "Supports any trackpad whose kernel driver uses the slotted multitouch protocol." It seems the xorg driver does not really get direct touch with the hardware, but your answer seems conflicts with this statement... – xuhdev Jan 20 '15 at 21:41
  • I think xorg input driver is different from device driver. I ran journalctl -b 0 and then searched for touchpad, and I have this line (**) bcm5974: Applying InputClass "evdev touchpad catchall". Thus I know bcm5974 is the device driver – xuhdev Jan 20 '15 at 21:56
  • @xuhdev - the xorg driver is getting the motion data via the uinput kernel module (driver). What's not clear about this statement? – slm Jan 21 '15 at 0:05
  • @slm I think the OP is asking about the device driver, not the xorg driver. What you have showed is the xorg driver, which, per my understanding is totally different from device driver. uinput module is not directed related to hardware devices; it depends on hardware drivers to provide correct information, and then uinput provides a unified input interface to userland. The userland software, in this case the synaptics xorg driver, can connect xorg with kernel (and user input indirectly) by using uinput. Please correct me if I'm wrong, as I'm not an expert in this field.. – xuhdev Jan 28 '15 at 3:10
  • You should also include hid_multitouch in your list. I think that's what's managing the touchpad on my Dell Precision, and I don't have the uinput module loaded. – Cerin Sep 18 '18 at 21:11
1
$ cat /var/log/Xorg.0.log | grep "input driver"

On my laptop it shows:

...
[     9.054] (II) Using input driver 'synaptics' for 'Elan Touchpad'
...
  • 2
    Don't use cat | grep as you can directly use grep on files skipping the cat command. – Thomas Mar 24 '18 at 14:05
  • grep -e "input driver" /var/log/Xorg.0.log – masterwok Sep 12 '18 at 23:05
  • journalctl -u display-manager | grep "input driver" and xinput --list helped me to figure out I need to enable the "Elantech" kernel option when recompiling the kernel. – user7610 Mar 16 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.