Bug 228668 - [psm] Alps GlidePoint on HP EliteBook 1040 G3: No two finger scroll
Summary: [psm] Alps GlidePoint on HP EliteBook 1040 G3: No two finger scroll
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2018-06-02 01:28 UTC by Neel Chauhan
Modified: 2019-09-20 20:05 UTC (History)
3 users (show)

See Also:


Attachments
HP EliteBook 1040 G3 psm snippets (20.02 KB, text/plain)
2018-06-02 01:28 UTC, Neel Chauhan
no flags Details
Full dmesg log (20.02 KB, text/plain)
2018-06-02 01:29 UTC, Neel Chauhan
no flags Details
Full dmesg log (65.89 KB, text/plain)
2018-06-02 01:34 UTC, Neel Chauhan
no flags Details
OpenBSD dmesg log (25.70 KB, text/plain)
2018-07-02 16:39 UTC, Neel Chauhan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neel Chauhan freebsd_committer freebsd_triage 2018-06-02 01:28:52 UTC
Created attachment 193905 [details]
HP EliteBook 1040 G3 psm snippets

I just got a HP EliteBook 1040 G3 to replace an older 1040 G1, and am not able to do two finger scroll. I tried this with enabling Synaptics and Elantech support in /boot/loader.conf, and tried both with and without moused. If I put two fingers on the touchpad, the cursor does not move, but the page does not scroll.

Unlike the 1040 G1 or G2 which used a Synaptics "ForcePad" (pressure sensitive touchpad like Apple's "Force Touch"), the 1040 G3 uses a ClickPad, but one backed by an Alps GlidePoint instead of Synaptics or Elantech. Looking at psm.c, I did not see any code for two finger scrolling on Alps touchpads (It seems Dell Latitudes and E-series ThinkPads also use GlidePoints, and both **probably** have this issue).

There is an Hackintosh touchpad driver which seems interesting: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller

They even have a driver for multiple trackpads, including Alps units: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/tree/master/VoodooPS2Trackpad (maybe at the files VoodooPS2ALPSGlidePoint.cpp and VoodooPS2ALPSGlidePoint.h?)

I have attached psm snippets, and will attach my full dmesg log.
Comment 1 Neel Chauhan freebsd_committer freebsd_triage 2018-06-02 01:29:31 UTC
Created attachment 193906 [details]
Full dmesg log

Also, here is my dmesg log.
Comment 2 Neel Chauhan freebsd_committer freebsd_triage 2018-06-02 01:34:27 UTC
Created attachment 193907 [details]
Full dmesg log

Oops, accidentally uploaded psm snippet again.
Comment 3 Neel Chauhan freebsd_committer freebsd_triage 2018-06-11 14:32:21 UTC
I haven't done any coding yet, but I decided that I will port the driver from OpenBSD. My GitHub tree is here: https://github.com/neelchauhan/freebsd-glidepiint
Comment 4 Neel Chauhan freebsd_committer freebsd_triage 2018-06-11 17:27:45 UTC
(In reply to Neel Chauhan from comment #3)
I ultimately decided not to do the coding, but I saw GlidePoint support in OpenBSD (which is probably a better source than Linux or Hackintosh drivers). The files are here:

https://github.com/openbsd/src/blob/master/sys/dev/pckbc/pms.c
https://github.com/openbsd/src/blob/master/sys/dev/pckbc/pmsreg.h
Comment 5 Vladimir Kondratyev freebsd_committer freebsd_triage 2018-06-15 13:15:18 UTC
(In reply to Neel Chauhan from comment #4)
Hi Neel,

Did you try Voodoo or OpenBSD drivers on your laptop?

Your touchpad version query result (psm: status 73 03 0a)
is marked as "non supported" in OpenBSD driver
https://github.com/openbsd/src/blob/a79c7f9f2481c7393d42d9874e9d932378944610/sys/dev/pckbc/pms.c#L229
and is missed in Voodoo driver
https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/blob/36ae070f752a6cdd1f1aa8d2baa5d099284939b3/VoodooPS2Trackpad/VoodooPS2ALPSGlidePoint.cpp#L146

So, most probably, Linux driver is the only available source.
Comment 6 Neel Chauhan freebsd_committer freebsd_triage 2018-07-02 16:39:57 UTC
Created attachment 194838 [details]
OpenBSD dmesg log

Sorry for the delay. I have a OpenBSD dmesg log. It uses pms and wsmouse, and two finger scrolling does not work.
Comment 7 Neel Chauhan freebsd_committer freebsd_triage 2018-07-03 20:55:42 UTC
It seems the 1040 G3 uses a Alps I2C T4 chip in the touchpad.

I found a Linux patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=73196ebe134d11a68a2e27814c489d685cfc8b03
Comment 8 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-07-20 01:31:26 UTC
I've got an Alps GlidePoint touchpad in Dell Latitude E5500 [1] and I couldn't get any scrolling to work. I've managed to use the Synaptics driver for the touchpad (I've read that GlidePoint is covered by this driver) but I could not move the cursor. I could only click. 

[1]: https://wiki.freebsd.org/Laptops/Dell_Latitude_E5500
Comment 9 Neel Chauhan freebsd_committer freebsd_triage 2018-07-24 01:30:00 UTC
(In reply to Mateusz Piotrowski from comment #8)
Well, for Alps touchpads, I just use the X.org sysmouse driver.

From Comment #5 and Comment #7, it seems that the HP EliteBook 1040 G3 uses an Alps T4 chip, whereas the Dell Latitude E5500 does not. And the T4 controller chip means the touchpad interacts with the OS a little differently, so we may use a slightly different driver should we both get two finger scrolling. Not saying that we shouldn't support two finger scrolling on Latitudes (or other laptops without Alps T4 but still with Alps touchpads), just making it clear for you.

Newer Latitude models (e.g. E7470) **may** use the Alps T4 as well, they may not, I don't know as I don't own a Latitude.
Comment 10 Neel Chauhan freebsd_committer freebsd_triage 2019-09-20 20:05:06 UTC
I no longer own this laptop. HID-over-I2C may fix this issue as the 1040 G3 has it.

My current laptop has a Synaptics HID-over-I2C touchpad.