Bug 223369 - [psm] FreeBSD 12-CURRENT on HP EliteBook 1040 G1: ForcePad registers click with two finger scrolling (e.g. Synaptics ForcePad Support missing)
Summary: [psm] FreeBSD 12-CURRENT on HP EliteBook 1040 G1: ForcePad registers click wi...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Vladimir Kondratyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-01 16:21 UTC by Neel Chauhan
Modified: 2018-03-19 03:46 UTC (History)
2 users (show)

See Also:


Attachments
dmesg output from EliteBook 1040 G1 (27.96 KB, text/plain)
2017-11-01 16:27 UTC, Neel Chauhan
no flags Details
Add forcepad support (4.67 KB, patch)
2017-11-04 17:07 UTC, Vladimir Kondratyev
no flags Details | Diff
Add forcepad support (5.90 KB, patch)
2017-11-05 22:54 UTC, Vladimir Kondratyev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neel Chauhan freebsd_committer freebsd_triage 2017-11-01 16:21:47 UTC
I just got a HP EliteBook 1040 G1 and installed FreeBSD 12-CURRENT. Unlike EliteBooks with a pointing stick (2570p/8470p/840/etc), the Synaptics were detected out of the box. However, the 1040 G1 has a 'ForcePad', which instead of clicking on the trackpad, you put pressure on it. However, if I try to do two finger scrolling, sometimes I get a click, which gets annoying when browsing websites.

Some research shows that Linux has fixed this problem in 2014. The URL for the commit is:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5715fc764f7753d464dbe094b5ef9cffa6e479a4

I will attach a dmesg log shortly.
Comment 1 Neel Chauhan freebsd_committer freebsd_triage 2017-11-01 16:27:13 UTC
Created attachment 187652 [details]
dmesg output from EliteBook 1040 G1
Comment 2 Vladimir Kondratyev freebsd_committer freebsd_triage 2017-11-04 08:26:20 UTC
Could you post output of next command here?
devinfo -rv | grep psmcpnp0
Comment 3 Neel Chauhan freebsd_committer freebsd_triage 2017-11-04 14:07:42 UTC
The output is as follows:

root@xb2:~ # devinfo -rv | grep psmcpnp0
    psmcpnp0 pnpinfo _HID=SYN300D _UID=0 at handle=\_SB_.PCI0.LPCB.PS2M
root@xb2:~ #
Comment 4 Vladimir Kondratyev freebsd_committer freebsd_triage 2017-11-04 17:07:43 UTC
Created attachment 187732 [details]
Add forcepad support

Try attached patch
Comment 5 Neel Chauhan freebsd_committer freebsd_triage 2017-11-04 21:52:10 UTC
Thank you so much! Works perfectly (or at least for now).
Comment 6 Vladimir Kondratyev freebsd_committer freebsd_triage 2017-11-05 22:54:50 UTC
Created attachment 187772 [details]
Add forcepad support

Patch updated. Previous version broke "Click and drag" gesture
Comment 7 Neel Chauhan freebsd_committer freebsd_triage 2017-11-06 02:36:26 UTC
Thank you. It works well.
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-01-31 21:15:56 UTC
A commit references this bug:

Author: wulf
Date: Wed Jan 31 21:14:59 UTC 2018
New revision: 328636
URL: https://svnweb.freebsd.org/changeset/base/328636

Log:
  psm(4): Add support for HP EliteBook 1040 ForcePads.

  ForcePads do not have any physical buttons, instead they detect click
  based on finger pressure. Forcepads erroneously report button click
  if there are 2 or more fingers on the touchpad breaking multifinger
  gestures. To workaround this start reporting a click only after
  4 consecutive single touch packets has been received. Skip these packets
  in case more contacts appear.

  PR:		223369
  Reported by:	Neel Chauhan <neel@neelc.org>
  Tested by:	Neel Chauhan <neel@neelc.org>
  Reviewed by:	gonzo
  Approved by:	gonzo

Changes:
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-03-19 03:46:20 UTC
A commit references this bug:

Author: eadler
Date: Mon Mar 19 03:46:13 UTC 2018
New revision: 331170
URL: https://svnweb.freebsd.org/changeset/base/331170

Log:
  MFC r328636:

  psm(4): Add support for HP EliteBook 1040 ForcePads.

  ForcePads do not have any physical buttons, instead they detect click
  based on finger pressure. Forcepads erroneously report button click
  if there are 2 or more fingers on the touchpad breaking multifinger
  gestures. To workaround this start reporting a click only after
  4 consecutive single touch packets has been received. Skip these packets
  in case more contacts appear.

  PR:		223369

Changes:
_U  stable/11/
  stable/11/sys/dev/atkbdc/psm.c
  stable/11/sys/sys/mouse.h