Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 205690] [psm] [patch]: support for Elantech trackpads

11 views
Skip to first unread message

bugzilla...@freebsd.org

unread,
Dec 29, 2015, 6:06:24 AM12/29/15
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Kubilay Kocak <ko...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |feature, needs-qa
CC| |freebsd...@FreeBSD.org
Flags| |mfc-stable10?

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
freebsd...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "freebsd-mobil...@freebsd.org"

bugzilla...@freebsd.org

unread,
Jun 8, 2016, 11:03:30 PM6/8/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Renic Gunderson <thatgu...@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |thatgu...@gmail.com

--- Comment #1 from Renic Gunderson <thatgu...@gmail.com> ---
I implemented this patch against releng/10.3 so that I could use it on my
laptop. It seems to work without incident.

I don't know how to make a unified diff, so I will link the github repo where I
stored the changes.

https://github.com/renic/freebsd-elantech

bugzilla...@freebsd.org

unread,
Jun 15, 2016, 7:45:55 PM6/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #164815|0 |1
is obsolete| |

--- Comment #2 from Ben Woods <wood...@freebsd.org> ---
Created attachment 171472
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171472&action=edit
Patch updated to apply cleanly against 11-current (r301929)

Hi Raphael, thank you very much for your work on this!

I have gone through this patch line by line and modified it to apply cleanly to
11-current as of r301929.

I will rebuild my kernel+world now and do some testing.

bugzilla...@freebsd.org

unread,
Jun 16, 2016, 4:04:00 AM6/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #164815|1 |0
is obsolete| |
Attachment #164815|Combined back-port from |Patch to add Elantech
description|11-CURRENT psm + Elantech |support to 10-STABLE
|support patch |(r292841)

bugzilla...@freebsd.org

unread,
Jun 16, 2016, 4:20:40 AM6/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #3 from Ben Woods <wood...@freebsd.org> ---
I can confirm that this patch against 11-current compiles and allows my
Elantech trackpad to work if I add the following line to /boot/loader.conf and
reboot:
hw.psm.elantech_support="1"

Two-finger scrolling works perfectly by default.

One interesting behaviour is click+drag does not work as expected. If I click
in the bottom left of the trackpad with one finger, and use a different finger
to drag on the track pad, I expect it to select the text from the start to
finish of the drag motion. Instead the cursor remains still on the screen and
it enables scroll action as I drag. I can still click+drag successfully using
another technique: double tap (touch) and drag with the one finger.

bugzilla...@freebsd.org

unread,
Jun 16, 2016, 6:35:57 AM6/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171472|0 |1
is obsolete| |

--- Comment #4 from Ben Woods <wood...@freebsd.org> ---
Created attachment 171478
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171478&action=edit
Patch updated to apply cleanly against 11-current (r301929)

Updated patch to match original patch from Vladimir Kondratiev
<wu...@cicgroup.ru>.

The only differences to Vladimir's original patch are those required to make it
apply cleanly to 11-current (r301929).

bugzilla...@freebsd.org

unread,
Jun 16, 2016, 6:26:48 PM6/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |wu...@cicgroup.ru

--- Comment #5 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 171497
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171497&action=edit
elantech.diff (11-CURRENT)

bugzilla...@freebsd.org

unread,
Jun 16, 2016, 6:27:07 PM6/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #6 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Hi, all

Here is up to date version of patch from my private repository. It is
simplified version of previous patch as I changed direction of development and
now use evdev interface for direct reporting of absolute fingers position to
libinput or xf86-synaptics driver (evdev part is not included here). So for
most people this patch will not make life better as compared with previous
version :-(

Most notable changes are:
1. Dirty "Multitouch" hack has been removed. For now only first finger position
is accounted for 2 finger scroll
2. (Unested) Ver 2. Hardware initialization sequence changed to match OpenBSD
not Linux (linux guys did not commit that part for unknown reason)
3. HW Ver 3 2finger touch is processed as single 12-byte packet not as 2
6-bytes packets. (Libinput wants this)
4. diff size has been reduced
5. Something else that I cant remember.

Not all of these changes has been tested due to lack of hardware so
regressions are possible.

bugzilla...@freebsd.org

unread,
Jun 18, 2016, 4:59:17 AM6/18/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #7 from Ben Woods <wood...@freebsd.org> ---
(In reply to Vladimir Kondratyev from comment #6)
Hi Vladimir,

Thanks for the update. I have tested it and confirm that it still allows me to
have working two-finger scrolling, even without the evdev work. I do still have
a problem with click-and-drag.

Thanks for your work on this.

bugzilla...@freebsd.org

unread,
Jun 18, 2016, 5:58:48 AM6/18/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #8 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Ben Woods from comment #7)
Thanks for testing, Ben!

Click and drag is not supported. It is a restriction of single-touch gesture
processor dated back to 2008 and r183888. Single-double-triple tap and drag
only.

It`s possible to add a hack to simulate this but i think it is a wrong way. IMO
the right way is to move gesture processing to one of already existing userland
library and leave current code path in its current state to vt & sc mouses
only.

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 4:54:44 AM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #9 from Ben Woods <wood...@freebsd.org> ---
Hi Vladimir,
I am not convinced that click and drag only needs support in X, and therefore
doesn't need to be in the psm(4) driver. In fact, if I disable the elantech
support with this patch, click and drag is support with the moused generic 3
button mouse support. Enabling the elantech support breaks click and drag, but
it would be handy to use in both the console and in X (for copying).

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 9:28:44 AM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171497|0 |1
is obsolete| |

--- Comment #10 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 171570
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171570&action=edit
elantech.diff (11-CURRENT)

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 9:36:28 AM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #11 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Ben Woods from comment #9)

Try updated patch. It forbids entering 2 finger scroll mode when any button is
pressed

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 10:29:35 AM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171570|0 |1
is obsolete| |

--- Comment #12 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 171573
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171573&action=edit
elantech.diff (11-CURRENT)

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 1:36:37 PM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171478|0 |1
is obsolete| |

bugzilla...@freebsd.org

unread,
Jun 19, 2016, 1:37:03 PM6/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #164815|0 |1

bugzilla...@freebsd.org

unread,
Jun 20, 2016, 5:55:05 AM6/20/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #13 from Ben Woods <wood...@freebsd.org> ---
(In reply to Vladimir Kondratyev from comment #11)
> Try updated patch. It forbids entering 2 finger scroll mode when any button is pressed

Hi Vladimir,
Thanks for that - it works very nicely! It works as long as I click before
touching my other finger to the touchpad. However, if I happen to have my other
finger already resting on the touchpad then it still doesn't work, and
sometimes tries to scroll. Is it possible to make the click take precedence and
cancel any current multitouch action?

bugzilla...@freebsd.org

unread,
Jun 20, 2016, 4:35:29 PM6/20/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #14 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Ben Woods from comment #13)
This behaviour is expected. Gesture processor is single-touch only, so driver
tries to predict which finger will move and sometimes does it wrong.
I tried to split current code on separate movement smoother and gesture
processor parts to be able to use 2 instances of smoother and track both
fingers at one time but some regressions appeared. I will post updated patch
here if I fix them but can say nothing about timeframe

bugzilla...@freebsd.org

unread,
Jun 23, 2016, 7:08:55 PM6/23/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171573|0 |1
is obsolete| |

--- Comment #15 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 171726
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171726&action=edit
elantech.diff (11-CURRENT)

bugzilla...@freebsd.org

unread,
Jun 23, 2016, 7:10:41 PM6/23/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #16 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Multitouch version attached. I hope it works

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 5:01:45 AM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Ben Woods <wood...@freebsd.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |adr...@freebsd.org

--- Comment #17 from Ben Woods <wood...@freebsd.org> ---
Adrian / Vladimir: what are your thoughts about whether this could make it into
FreeBSD 11? Is it too late now that we are in code/ABI freeze?

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 5:03:18 AM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #18 from Ben Woods <wood...@freebsd.org> ---
Not sure if it helps to say that the majority of this code only take effect if
the following sysctl is set at boot time:
hw.psm.elantech_support="1"

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 6:17:14 AM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #19 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Ben Woods from comment #17)

This patch requires regression testing on synaptics touchpads and I do not have
such hardware.

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 1:00:47 PM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #20 from Ben Woods <wood...@freebsd.org> ---
(In reply to Vladimir Kondratyev from comment #16)
> Multitouch version attached. I hope it works

Yep - this is working fine for me. This is the best version yet - I have two
finger scroll and click-and-drag both working, regardless of whether or not my
drag finger was on the touchpad before I click or not. Thank you!

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 3:29:14 PM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Anthony Jenkins <Scoob...@yahoo.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |Scoob...@yahoo.com

--- Comment #21 from Anthony Jenkins <Scoob...@yahoo.com> ---
(In reply to Ben Woods from comment #20)

I've been running an early version of this patch on my laptop with a Synaptics
touchpad with no problem; I'll try the latest version.

Does the multitouch functionality extend to the Synaptics variant of psm(4)?

bugzilla...@freebsd.org

unread,
Jun 28, 2016, 6:02:49 PM6/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #22 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Anthony Jenkins from comment #21)
> Does the multitouch functionality extend to the Synaptics variant of psm(4)?
No. Someone should implement "advanced gestures packets" parser in synaptics
driver to enable multitouch functionality.

bugzilla...@freebsd.org

unread,
Jul 11, 2016, 2:02:54 PM7/11/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #23 from Ben Woods <wood...@freebsd.org> ---
(In reply to Anthony Jenkins from comment #21)
Hi Anthony, how has your testing gone with this driver installed on a system
with a synaptics touchpad for regression testing purposes?

Maybe we could now land this driver in 12-current?

Adrian: would you be willing to have a look, as previously mentioned?

bugzilla...@freebsd.org

unread,
Jul 15, 2016, 4:34:24 AM7/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Juan Ramón Molina Menor <in...@juanmolina.eu> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |in...@juanmolina.eu

--- Comment #24 from Juan Ramón Molina Menor <in...@juanmolina.eu> ---
I have tested the patch on two Lenovo laptops which have Synaptics (ThinkPad
S440) and Elantech (S20-30) trackpads. I already had Synaptics support with the
psm(4) driver and the patch doesn’t seem to introduce regressions.

What I have tested, both on console and X:
- Select / Copy / Paste with tap, drag and three-finger tap.
- Two-finger scroll.
- Normal button operation.

Hope it helps,
Juan

bugzilla...@freebsd.org

unread,
Jul 15, 2016, 5:14:18 AM7/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #25 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Juan Ramón Molina Menor from comment #24)
Thank you, Juan!

Could you add debug.psm.loglevel=2 to /boot/loader.conf and provide us with
some info about your touchpad hardware from "dmesg" and "sysctl hw.psm."
commands output?

Following is what my laptop prints:

# dmesg
... skipped ...
Elantech touchpad hardware v.4 firmware v.0x461f02
... skipped ...
Model information:
MaxX: 2772
MaxY: 1452
DpmmX: 32
DpmmY: 32
TracesX: 21
TracesY: 11
SemiMT: 0
Clickpad: 1
Trackpad: 0
CRC: 0
Pressure: 1
psm0: found Elantech Touchpad

# sysctl hw.psm.elantech.
hw.psm.elantech.softbutton3_x: 1848
hw.psm.elantech.softbutton2_x: 924
hw.psm.elantech.softbuttons_y: 363
hw.psm.elantech.touchpad_off: 0
hw.psm.elantech.vscroll_div_max: 50
hw.psm.elantech.vscroll_div_min: 30
hw.psm.elantech.vscroll_min_delta: 15
hw.psm.elantech.vscroll_ver_area: 0
hw.psm.elantech.vscroll_hor_area: 0
hw.psm.elantech.taphold_timeout: 250000
hw.psm.elantech.tap_min_queue: 2
hw.psm.elantech.tap_max_delta: 25
hw.psm.elantech.div_len: 30
hw.psm.elantech.div_max_na: 10
hw.psm.elantech.div_max: 6
hw.psm.elantech.div_min: 3
hw.psm.elantech.weight_len_squared: 200
hw.psm.elantech.weight_previous_na: 20
hw.psm.elantech.weight_previous: 6
hw.psm.elantech.weight_current: 3
hw.psm.elantech.multiplicator: 10000
hw.psm.elantech.window_max: 10
hw.psm.elantech.window_min: 4
hw.psm.elantech.na_left: 0
hw.psm.elantech.na_bottom: 0
hw.psm.elantech.na_right: 0
hw.psm.elantech.na_top: 0
hw.psm.elantech.margin_left: 0
hw.psm.elantech.margin_bottom: 0
hw.psm.elantech.margin_right: 0
hw.psm.elantech.margin_top: 0
hw.psm.elantech.max_width: 10
hw.psm.elantech.max_pressure: 220
hw.psm.elantech.min_pressure: 1
hw.psm.elantech.two_finger_scroll: 1
hw.psm.elantech.directional_scrolls: 0

bugzilla...@freebsd.org

unread,
Jul 15, 2016, 6:18:50 AM7/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #26 from Juan Ramón Molina Menor <in...@juanmolina.eu> ---
# dmesg
...
Elantech touchpad hardware v.3 firmware v.0x350f00
...
Model information:
MaxX: 2436
MaxY: 1044
DpmmX: 32
DpmmY: 32
TracesX: 22
TracesY: 10
SemiMT: 1
Clickpad: 0


Trackpad: 0
CRC: 0
Pressure: 1
psm0: found Elantech Touchpad

...
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Elantech Touchpad, device ID 0-00, 3 buttons
psm0: config:00004000, flags:00000008, packet size:6
psm0: syncmask:04, syncbits:00

# sysctl hw.psm.elantech


hw.psm.elantech.touchpad_off: 0
hw.psm.elantech.vscroll_div_max: 50
hw.psm.elantech.vscroll_div_min: 30
hw.psm.elantech.vscroll_min_delta: 15
hw.psm.elantech.vscroll_ver_area: 0
hw.psm.elantech.vscroll_hor_area: 0

hw.psm.elantech.taphold_timeout: 125000

bugzilla...@freebsd.org

unread,
Jul 15, 2016, 7:22:33 AM7/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #27 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Juan Ramón Molina Menor from comment #26)


> Elantech touchpad hardware v.3 firmware v.0x350f00

HW version 3 can be considered as basicaly working. Thanks

> SemiMT: 1

Here is harmless bug in driver. HWv3 is multitouch TP not semi-multitouch. I
will fix that

Could you do following gestures and post results here:

Gest 1.
1. Put first finger on e.g. left bottom corner of TP
2. Do a short move so cursor moves too
3. Put second finger on opposite corner
4. Move both fingers to trigger 2finger scroll
5. Release first (left) finger but leave second on TP
6. Move second finger across TP

Gest 2.
1 - 4 is the same
5. Release second (right) finger but leave first on TP
6. Move first finger across TP


Does cursor jump on p.5?
What is happening on p.6? Cursor moving or scrolling?

Could you post synaptics "dmesg" and "sysctl hw.psm." output here too?

bugzilla...@freebsd.org

unread,
Jul 15, 2016, 2:54:38 PM7/15/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #28 from Juan Ramón Molina Menor <in...@juanmolina.eu> ---
Hi again.

> Could you do following gestures and post results here:
>
> Gest 1.
> 1. Put first finger on e.g. left bottom corner of TP
> 2. Do a short move so cursor moves too
> 3. Put second finger on opposite corner
> 4. Move both fingers to trigger 2finger scroll
> 5. Release first (left) finger but leave second on TP
> 6. Move second finger across TP
>
> Gest 2.
> 1 - 4 is the same
> 5. Release second (right) finger but leave first on TP
> 6. Move first finger across TP

Results:

--- Synaptics ---
Gest 1 and 2: Cursor does not jump on p. 5. Scroll stops in p. 6 and cursor
resumes moving.

--- Elantech ---
Gest 1: Cursor jumps on p. 5. Scroll stops in p. 6. and cursor resumes moving.
Gest 2: Cursor does not jump on p. 5. Scroll stops in p. 6 and cursor resumes
moving.


> Could you post synaptics "dmesg" and "sysctl hw.psm." output here too?

# dmesg
...
Synaptics Touchpad v8.1
...
Model information:
infoRot180: 0
infoPortrait: 0
infoSensor: 1
infoHardware: 113
infoNewAbs: 1
capPen: 0
infoSimplC: 1
infoGeometry: 1
...
Extended capabilities:
capExtended: 1
capMiddle: 0
nExtendedQueries: 5
capPassthrough: 1
capLowPower: 0
capMultiFingerReport: 1
capSleep: 0
capFourButtons: 0
capBallistics: 0
capMultiFinger: 1
capPalmDetect: 1
infoXupmm: 45
infoYupmm: 52
...
Extended model ID:
verticalScroll: 0
horizontalScroll: 0
verticalWheel: 0
nExtendedButtons: 0
capEWmode: 1
...
Continued capabilities:
capClickPad: 1
capDeluxeLEDs: 0
noAbsoluteFilter: 0
capReportsV: 1
capUniformClickPad: 0
capReportsMin: 1
capInterTouch: 1
capReportsMax: 1
capClearPad: 0
capAdvancedGestures: 0
capCoveredPad: 0
maximumXCoord: 5674
maximumYCoord: 4684
minimumXCoord: 1266
minimumYCoord: 1170
Additional Buttons: 1
...
psm0: found Synaptics Touchpad


...
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]

psm0: model Synaptics Touchpad, device ID 0-00, 4 buttons


psm0: config:00004000, flags:00000008, packet size:6

psm0: syncmask:c0, syncbits:00

# sysctl hw.psm.synaptics
hw.psm.synaptics.softbutton3_x: 4700
hw.psm.synaptics.softbutton2_x: 3600
hw.psm.synaptics.softbuttons_y: 1700
hw.psm.synaptics.touchpad_off: 0
hw.psm.synaptics.vscroll_div_max: 150
hw.psm.synaptics.vscroll_div_min: 100
hw.psm.synaptics.vscroll_min_delta: 50
hw.psm.synaptics.vscroll_ver_area: -400
hw.psm.synaptics.vscroll_hor_area: 0
hw.psm.synaptics.taphold_timeout: 125000
hw.psm.synaptics.tap_min_queue: 2
hw.psm.synaptics.tap_max_delta: 80
hw.psm.synaptics.div_len: 100
hw.psm.synaptics.div_max_na: 30
hw.psm.synaptics.div_max: 17
hw.psm.synaptics.div_min: 9
hw.psm.synaptics.weight_len_squared: 2000
hw.psm.synaptics.weight_previous_na: 20
hw.psm.synaptics.weight_previous: 6
hw.psm.synaptics.weight_current: 3
hw.psm.synaptics.multiplicator: 10000
hw.psm.synaptics.window_max: 10
hw.psm.synaptics.window_min: 4
hw.psm.synaptics.na_left: 1600
hw.psm.synaptics.na_bottom: 1408
hw.psm.synaptics.na_right: 0
hw.psm.synaptics.na_top: 1314
hw.psm.synaptics.margin_left: 200
hw.psm.synaptics.margin_bottom: 200
hw.psm.synaptics.margin_right: 0
hw.psm.synaptics.margin_top: 0
hw.psm.synaptics.max_width: 10
hw.psm.synaptics.max_pressure: 220
hw.psm.synaptics.min_pressure: 16
hw.psm.synaptics.two_finger_scroll: 1
hw.psm.synaptics.directional_scrolls: 0

bugzilla...@freebsd.org

unread,
Jul 18, 2016, 5:29:17 PM7/18/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #171726|0 |1
is obsolete| |

--- Comment #29 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 172681
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172681&action=edit
elantech.diff (11-CURRENT)

Changes:
1. (Hopefully) fixes cursor jump after releasing of one finger in "2finger
scroll" on Hw v.3 touchpads
2. fixes staying in "2finger scroll" state after releasing of one finger on Hw
v.4 touchpads
3. (Hopefully) fixes incorrect noise area sizing for Synaptics touchpads

bugzilla...@freebsd.org

unread,
Jul 18, 2016, 5:56:32 PM7/18/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #30 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
(In reply to Juan Ramón Molina Menor from comment #28)


> --- Elantech ---
> Gest 1: Cursor jumps on p. 5. Scroll stops in p. 6. and cursor resumes moving.

New version should eliminate cursor jump

> # sysctl hw.psm.synaptics
> ....
> hw.psm.synaptics.na_right: 0
> hw.psm.synaptics.na_top: 1314
Ooops. I subtracted wrong axis here. Should be fixed now.

> Continued capabilities:
> capClickPad: 1
Is it synaptics clickpad?
If so, could you check proper softbuttons sizing? Pressing on to lower-right
part of synaptics clickpad should produce middle or right mouse button events
rather than left button event. Zones are tuned via
hw.psm.synaptics.softbutton3_x, hw.psm.synaptics.softbutton2_x and
hw.psm.synaptics.softbuttons_y sysctls and their default values was taken to
match HP pavillion clickpad drawing. I wonder, if these values match your
touchpad geometry?

Big thanx for testing, Juan!

bugzilla...@freebsd.org

unread,
Jul 19, 2016, 4:47:55 AM7/19/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

Vladimir Kondratyev <wu...@cicgroup.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #172681|0 |1
is obsolete| |

--- Comment #31 from Vladimir Kondratyev <wu...@cicgroup.ru> ---
Created attachment 172702
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172702&action=edit
elantech.diff (11-CURRENT)

Fix regression appeared in previous patch

Driver produced extra taps when used with Elan Hw v.4 TP

bugzilla...@freebsd.org

unread,
Jul 26, 2016, 11:07:02 AM7/26/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #32 from Ben Woods <wood...@freebsd.org> ---
Hi Vladimir,

Please see below the same details for my touchpad.

# dmesg
...
skipped
...
psm0: current command byte:0065
psm: ENABLE_DEV return code:00fa
psm: DISABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 02 64
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_RESOLUTION (0) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3c 03 00
psm: SET_RESOLUTION (3) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3c 03 00
psm: SET_RESOLUTION (3) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3c 03 00
psm: SET_SCALING11 return code:00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SEND_AUX_DEV_DATA return code:00fa
psm: data 00 00 ffffffff
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SET_SAMPLING_RATE (60) 00fa
psm: SET_SAMPLING_RATE (40) 00fa
psm: SET_SAMPLING_RATE (20) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_SCALING11 return code:00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 7a f0 1c
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3c 03 00
psm: SET_SCALING11 return code:00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 46 1f 01
Elantech touchpad hardware v.4 firmware v.0x461f01
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 10 15 0e
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 06 66 04
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 7a f0 1c
Model information:
MaxX: 2800
MaxY: 1820
DpmmX: 33
DpmmY: 33
TracesX: 20
TracesY: 13
SemiMT: 0
Clickpad: 1
Trackpad: 0
CRC: 0
Pressure: 1
psm0: found Elantech Touchpad
psm: SET_RESOLUTION (2) 00fa
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 02 64
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Elantech Touchpad, device ID 0-00, 1 buttons
psm0: config:00004000, flags:00000008, packet size:6
psm0: syncmask:04, syncbits:00
...
skipped
...
psm: ENABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 02 64
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 02 64


# sysctl hw.psm.elantech
hw.psm.elantech.softbutton3_x: 1400
hw.psm.elantech.softbutton2_x: 0
hw.psm.elantech.softbuttons_y: 455
# grep -i psm /boot/loader.conf
hw.psm.elantech_support="1"
debug.psm.loglevel="2"


# grep -i psm /etc/sysctl.conf
hw.psm.elantech.softbutton2_x=0 # Disable middle click in touchpad
button area
hw.psm.elantech.softbutton3_x=1400 # Move touchpad right click button left
axis to middle


I also performed the tests you requests (with two finger scroll and then
releasing left or right finger before the other). In either case, the cursor
movement on releasing the fingers was minimal... a few pixels either way, but
that may be caused by the lifting of the finger off the touchpad.

bugzilla...@freebsd.org

unread,
Jul 29, 2016, 11:57:30 AM7/29/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #33 from Juan Ramón Molina Menor <in...@juanmolina.eu> ---
Hi Vladimir.

Sorry for not replying earlier.

Unfortunately, I’m having a graphics problem with the laptop with the Elantech
touchpad: I’m testing the DRM 4.6 support and something has broken Xorg in a
recent commit. I’m not seeing the 'jump' issues with the touchpad in the
console, but there is no two-finger scroll to be tested…

Well, I have tested your new path in my Haswell laptop with a Synaptics
touchpad and it works as before, so support do not seem to have regressed.

I’ll be back to you as soon as I have something. Thanks for your efforts.
Juan

bugzilla...@freebsd.org

unread,
Jul 31, 2016, 11:43:39 AM7/31/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205690

--- Comment #34 from Juan Ramón Molina Menor <in...@juanmolina.eu> ---
(In reply to Vladimir Kondratyev from comment #30)


>> Gest 1: Cursor jumps on p. 5. Scroll stops in p. 6. and cursor resumes moving.
>New version should eliminate cursor jump

Yes it does.

>> Continued capabilities:
>> capClickPad: 1
>Is it synaptics clickpad?
>If so, could you check proper softbuttons sizing? Pressing on to lower-right
>part of synaptics clickpad should produce middle or right mouse button events
>rather than left button event. Zones are tuned via
>hw.psm.synaptics.softbutton3_x, hw.psm.synaptics.softbutton2_x and
>hw.psm.synaptics.softbuttons_y sysctls and their default values was taken to
>match HP pavillion clickpad drawing. I wonder, if these values match your
>touchpad geometry?

Thanks for pointing this, I didn’t know. Softbuttons are also working, but
require fine-tuning their position with the sysctl values. They also require an
actual click, tapping would not trigger them. All considered, I still prefer
double and triple tapping.

Best regards,

0 new messages