Ubuntu 13.04: Finally Fixing my Touchpad

On my Ubuntu 13.04 installation, I have had trouble getting the touchpad to work.  The driver just wouldn’t install.  I finally figured it out.

So, here’s where I left off:

Ubuntu 13.04 and the Fight for the Mouse

The error message now is:

too few arguments to function ‘input_mt_init_slots’

Dave Turvene has his driver published on GitHub:

GitHub: dkms module for psmouse

It’s easy to install if you have git already installed:

[sourcecode]git clone https://github.com/emmanuelthome/psmouse-alps.git[/sourcecode]

Removing the Previously Installed Versions

First, I had tried earlier.  I had to get rid of my other tries before I could get a fix in.  To see what has already been loaded, I used the dkms status command to list what had already been added:

[sourcecode]

skp@pecan:~/app/github/psmouse-alps$ sudo dkms status | grep -i psmouse
psmouse, custom-1.2: added

[/sourcecode]

So, the “custom-1.2” version was in the list.  I removed it like this:

[sourcecode]

skp@pecan:~/app/github/psmouse-alps$ sudo dkms remove psmouse/custom-1.2 –all

——————————
Deleting module version: custom-1.2
completely from the DKMS tree.
——————————
Done.

[/sourcecode]

Fixing the error

GitHub Issue: work with kernels > 3.5

The problem is the input_mt_init_slots() function.  It now has 3 parameters.  I had to add “0” as the 3rd parameter.

So, I changed this:

input_mt_init_slots(dev, 2);

to this:

input_mt_init_slots(dev, 2, 0);

I had to update it in multiple files.  Here are all of the files:

[sourcecode]

skp@pecan:~/app/github/psmouse-alps$ grep input_mt_init_slots src/*
src/alps.c: input_mt_init_slots(dev1, 2);
src/alps.c: input_mt_init_slots(dev1, 2);
src/alps.c: input_mt_init_slots(dev1, 2);
src/elantech.c: input_mt_init_slots(dev, 2);
src/elantech.c: input_mt_init_slots(dev, ETP_MAX_FINGERS);
src/sentelic.c: input_mt_init_slots(dev, 2);
src/synaptics.c: input_mt_init_slots(dev, 2, 0);
src/synaptics.c: input_mt_init_slots(dev, 2, 0);

[/sourcecode]

Installing Fixed

Now that it is fixed, I installed with these commands from the readme:

 $ dkms add .
 $ modprobe -r psmouse
 $ dkms build -m psmouse -v custom-1.2 --all
 $ dkms autoinstall --force
 $ modprobe psmouse

Here’s what it looked like:

[sourcecode]

skp@pecan:~/app/github/psmouse-alps$ sudo dkms add .
Creating symlink /var/lib/dkms/psmouse/custom-1.2/source ->
/usr/src/psmouse-custom-1.2

DKMS: add completed.
skp@pecan:~/app/github/psmouse-alps$ sudo modprobe -r psmouse
skp@pecan:~/app/github/psmouse-alps$ sudo dkms build -m psmouse -v custom-1.2 –all
skp@pecan:~/app/github/psmouse-alps$ sudo dkms autoinstall –force

Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area….
make KERNELRELEASE=3.8.0-31-generic -C /lib/modules/3.8.0-31-generic/build M=/var/lib/dkms/psmouse/custom-1.2/build/src psmouse.ko…..
cleaning build area….

DKMS: build completed.

psmouse.ko:
Running module version sanity check.
– Original module
– Installation
– Installing to /lib/modules/3.8.0-31-generic/updates/dkms/

depmod….

DKMS: install completed.
skp@pecan:~/app/github/psmouse-alps$ sudo modprobe psmouse

[/sourcecode]

Now, I have the touchpad settings, and I could enable 2-finger scrolling:

Mouse & Touchpad Settings

3 thoughts on “Ubuntu 13.04: Finally Fixing my Touchpad

  1. Stephen,

    Just picked up a Vaio UX490N and installed the latest Mint Cinnamon. All is swell but the trackpoint. Have followed your instructions above and the driver is installed… it just isn’t active.

    Is there any trick to using psmouse over the synaptics driver? evdev seems to not let me.

    Steven.

    1. @Steven,

      I’m not sure about that. I didn’t have to do anything special to get it to use the new driver. I believe the modprobe loads it and makes it start using the driver.

      Just thinking outside of the box: is it possible that the trackpoint is off? In the settings dialog, there is an on/off switch for the touchpad. My laptop also has an Fn + F3 combination that will turn the touchpad on and off. Is it possible that the hardware has it disabled?

  2. sir,
    I have the same problem in my new thoshiba satalite pro r-50 / ubuntu 14.04.
    but ur solution does not worked for me..
    getiing error
    ———————-
    Kernel preparation unnecessary for this kernel. Skipping…

    Building module:
    cleaning build area….
    make KERNELRELEASE=3.13.0-24-generic -C /lib/modules/3.13.0-24-generic/build M=/var/lib/dkms/psmouse/custom-1.2/build/src psmouse.ko….(bad exit status: 2)
    ERROR (dkms apport): binary package for psmouse: custom-1.2 not found
    Error! Bad return status for module build on kernel: 3.13.0-24-generic (x86_64)
    Consult /var/lib/dkms/psmouse/custom-1.2/build/make.log for more information.
    ———————————

    Please help..

Leave a Comment

Your email address will not be published. Required fields are marked *