Re: [REGRESSION][v4.9.y][v4.10.y] Input: ALPS - set DualPoint flag for 74 03 28 devices

From: Paul Donohue
Date: Sat Mar 04 2017 - 11:25:57 EST


I have a 74 03 28 device on a Dell Precision laptop that handles two-finger scrolling fine. Without this patch, my mouse functions only as a dumb PS/2 mouse, which means I lose all multi-touch and scrolling capabilities entirely. So I would rather not see this reverted. :)

I suspect one of two things:
1) My device has physical buttons below the touchpad. There are some different code paths for devices without physical buttons below the touchpad. Perhaps there is a bug in those alternate code paths? Does the buggy device have physical buttons?
2) Perhaps this is a new ALPS variant which speaks a new protocol that is not currently handled by the driver but which isn't properly identified/differentiated by the alps_identify() function?

To get some additional data, grab the attached tarball, then:
sudo -s
cd /usr/src/
tar -xvzf alps_1.tar.gz
apt install dkms
dkms install alps_ss5/1.0
# Do not copy and paste the modprobe command! Type it manually!
# Otherwise the mouse click used to paste the command at the same time as
# reloading the driver may crash the kernel.
modprobe -r psmouse ; modprobe psmouse
dmesg | grep 'ALPS ID'

In the dmesg output, you should see something like:
psmouse serio1: alps: ALPS ID: E7=73 03 28, EC=73 01 13

Are the E7 and EC numbers identical to the above?

Then try two-finger scrolling, then run:
dmesg | grep 'two-finger'

In the dmesg output, I expect you should see something like:
psmouse serio1: alps: ALPS two-finger packet (buttonpad: 0): 1c 51 46

We can compare your output to mine to see what is different.

If you're willing to experiment with the code yourself to try to figure out more, the relevant code is in alps_decode_ss4_v2() in src/alps.c in that tarball. You should see the "ALPS two-finger packet" debug message I added there ... you can add additional debugging messages to figure out what exactly the decoder is doing. The SS4_* macros for bit manipulation and field extraction are defined near the top of src/alps.h. To recompile/reload the driver after making changes:
dkms remove alps_ss5/1.0 --all
dkms install alps_ss5/1.0
modprobe -r psmouse ; modprobe psmouse

On Fri, Mar 03, 2017 at 02:58:34PM -0500, Joseph Salisbury wrote:
> Hi Ben,
>
> A kernel bug report was opened against Ubuntu [0]. After a kernel
> bisect, it was found that reverting the following commit resolved this bug:
>
> commit aeaa881f9b17823028b464893b89c42db797b717
> Author: Ben Gamari <ben@xxxxxxxxxxxxxxxx>
> Date: Tue Oct 4 11:43:30 2016 -0700
>
> Input: ALPS - set DualPoint flag for 74 03 28 devices
>
> The regression was introduced as of v4.9-rc1.
>
> I was hoping to get your feedback, since you are the patch author. Do
> you think gathering any additional data will help diagnose this issue,
> or would it be best to submit a revert request?
>
>
> Thanks,
>
> Joe
>
> [0] http://pad.lv/1662589
>

Attachment: alps_1.tar.gz
Description: application/gzip