After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625163 - Allow enabling 2finger scrolling on hardware that can emulate double touch
Allow enabling 2finger scrolling on hardware that can emulate double touch
Status: RESOLVED WONTFIX
Product: gnome-control-center
Classification: Core
Component: Mouse
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 719406 (view as bug list)
Depends on: 661963
Blocks:
 
 
Reported: 2010-07-24 01:53 UTC by Chris Bagwell
Modified: 2013-12-13 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
2finger.patch (1.18 KB, patch)
2010-07-24 01:53 UTC, Chris Bagwell
needs-work Details | Review
enable 2-finger scroll when can be HW supports with emulation (1.03 KB, patch)
2010-11-01 02:44 UTC, Chris Bagwell
committed Details | Review

Description Chris Bagwell 2010-07-24 01:53:21 UTC
Created attachment 166473 [details] [review]
2finger.patch

The gnome-mouse-properties has a check to disable two finger scrolling configure option on touchpads that do not support reporting 2 finger touches (double touch).

xf86-input-synaptics can emulate double touch on hardware that can report width of finger.  Since gnome-mouse-properties doesn't consider is, end users are playing games to work around this when they want to enable 2finger scrolling.

I've worked to get patches submitted upstream to linux kernel and xf86-input-synaptics to start reporting accurately when hw supports reporting finger width.  When this information is available, it is very easy for gnome-mouse-properites to simply enable 2 finger scrolling option.

When its not available (what will eventually be considered older software), I think we should simply always allow user to select this option.  In worst case case were hw doesn't support emulation and doesn't support double touch, the negative behavior is that touchpad scrolling behavior will be same as if user selected "disable"... so not so bad.

Attached is a patch to implement these concepts.  Should work with both old and new xf86-input-syaptics but testing on older versions is needed still.
Comment 1 Bastien Nocera 2010-10-27 13:27:24 UTC
Adding Peter to the CC: list.
Comment 2 Bastien Nocera 2010-10-27 13:30:42 UTC
Review of attachment 166473 [details] [review]:

::: gnome-control-center-2.30.1/capplets/mouse/gnome-mouse-properties.c.orig
@@ +371,3 @@
+			 * If doesn't report width property, assume
+			 * it is support and leave up to user to
+			 * configure correctly.

Apart from the grammar errors there, I really don't like this "assume it works".

Either the driver exports the data properly, or we disable the button.
Comment 3 Chris Bagwell 2010-10-27 14:32:22 UTC
(In reply to comment #2)
> Review of attachment 166473 [details] [review]:
> 
> ::: gnome-control-center-2.30.1/capplets/mouse/gnome-mouse-properties.c.orig
> @@ +371,3 @@
> +             * If doesn't report width property, assume
> +             * it is support and leave up to user to
> +             * configure correctly.
> 
> Apart from the grammar errors there, I really don't like this "assume it
> works".
> 
> Either the driver exports the data properly, or we disable the button.

Thank you for the review comments.

Here is some insight into my thinking when I made patch this way.  There appear to be a large amount of modern laptops with synaptics hardware that do not support detecting 2-finger touches.  These same laptops do support finger width detection.  This seems to include all recent netbooks and a lot of laptops.  Under windows, 2 finger scrolling works fine and is users expectation.

If you google "two finger scrolling gnome-mouse-properties", you will see a large selection of users (every distribution anyways) complaining that either 1) upon upgrade they can no longer select 2 finger scrolling from gnome-mouse-properties when they could before upgrade (regression for them) or 2) upon fresh install they are wondering why option is disabled when 2 finger scrolling works under Windows on same laptop.

For case #2, I've worked to get updates to Linux kernel, xf86-input-synaptics, and now with gnome (gnome-mouse-properties patch) so things "just work" on these touchpads.

The part you mention not liking is for case #1.  Older distributions may wish to use that part of my patch to close the outstanding bug/regression reports and slightly improved user experience but I can understand how upstream may wish to not support.  I also said "slightly improved" because users were having to do some xorg.conf stuff to get 2-finger emulation working with GUI option anyways.

It turns out the needed new proprieties+new default values to xf86-input-synaptics have been pretty aggressively accepted by major distributions already since 3 months ago when I submitted this gnome patch.

So I am now happy to submit a new patch that removes "case #1" work around logic and rely on people upgrading both gnome-mouse-properties and xf86-input-synaptics to latest version to get the feature fully working.

I'll submit new patch that soon.
Comment 4 Bastien Nocera 2010-10-27 14:38:35 UTC
I'd rather be able to point at bugs/misfeatures in their distributions, rather than work-around the problem.
Comment 5 Bastien Nocera 2010-10-27 14:39:13 UTC
Oh, and I should add that in the future, references to the upstream commits for other projects would be helpful.
Comment 6 Chris Bagwell 2010-10-27 16:08:13 UTC
(In reply to comment #5)
> Oh, and I should add that in the future, references to the upstream commits for
> other projects would be helpful.

Sure thing.  At the time of bug report creation, all patches hadn't made it to easily viewable repo.  There is some non-obvious stuff about this so here goes now.

As of following commit to linux, synaptics hardware will now only claim it supports finger width on hardware that truly supports it.  This was included in linux-2.6.36.  If someone uses latest xf86-input-synaptics+gnome-mouse-properties with kernel older then 2.6.36 the kernel will say it supports finger widths but always send a fixed value of 5 when hardware does not really support it.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2a8e77102e02dd236ff276a2151073ed551d04f2

The only other linux input driver that supports reporting finger width as of today is bcm5974 (limited to apple hardware I believe).  It reports width is support only when truly supported.

As of following commit to xf86-input-synaptics, it defaults to enabling 2-finger emulation if hardware supports finger width but not 2-finger touch (doubletap support).  Even if this patch is used with linux kernels older then 2.6.36 its OK because the default width value used is greater then 5 and will not have false 2-finger detectinos.  So its really only important for user to have latest xf86-input-synaptics and latest gnome-mouse-properties.  

Or in other words, if you combine my gnome-mouse-properties patch with linux-2.6.35 kernel then it will allow user to enable 2-finger scroll on all synaptics hardware but it will only work on hardware that really supports it threw doubletap or threw emulation.  The only negative affect on synaptics hardware that doesn't support it is 2-finger scrolling will not work and cursor will move around instead. gnome-mouse-properties patch+linux-2.6.36 or later ungreys only in correct cases.

http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=ffa6dc2809734a6aaa690e9133d6761480603a68

As of following commit to xf86-input-synaptics, a new property value is exposed that lets gnome-mouse-properties know hardware supports finger width; and thus 2 finger gestures threw emulation.  Gnome can ungrey any items where it was based on doubletap support because it can also be supported using 2-finger emulation.

http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=75459b1c0bb85ce0bbeb4270114edddb30ff3b1b

As of following commit to xf86-input-synaptics, a new property value is exposed that lets gnome-mouse-properties know hardware supports pressure.  This could be used to grey out any options related to pressure (not sure if gnome has sliders for these but its properties like FingerPress or EdgeMotionMaxZ).

http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=51e9bb815812469f39ad47f723d842bf1893a109

The xf86-input-synaptics patch series is available in xf86-input-synaptics-1.3.0 (released roughly 9/2010).
Comment 7 Steven Haigh 2010-10-29 03:16:30 UTC
In a side note, Fedora 14 already ships with everything above related to 2 finger scrolling. gnome-mouse-properties is the only thing preventing it to be selected easily. Overriding this applet via gconf works, but this is obviously not ideal.
Comment 8 Chris Bagwell 2010-11-01 02:44:18 UTC
Created attachment 173611 [details] [review]
enable 2-finger scroll when can be HW supports with emulation

Updated patch.  This one also contains important bugfix by using nitems instead of bytes_after.
Comment 9 Bastien Nocera 2012-03-13 18:12:32 UTC
Reverted in bug 661963, see bug 661963 comment 0 for the reasoning.
Comment 10 Chris Bagwell 2012-03-13 19:19:00 UTC
For the record, its not so bad for me that this was reverted.

The original patch came because a popular version of HW (synaptics) was shipping  current  hardware that appeared to lack reporting 2 finger touches and only reported width (it looked like HW supported less features then older HW).  A good  chunk of modern users were unable to use 2 finger scrolling.

Since that time, it was discovered that this HW did support 2+ finger count detection and in fact could report X/Y values for 2 of the touches.  It required to place the HW in an undocumented Semi-Multi-Touch mode though to get all the features.  This mode is the default behaviour in current Linux kernels.

So the reason I initially wrote patch no longer exists since this new synaptics HW can report 2+ finger counts and works with gnome-control-center/gnome-settings-daemon just fine.
Comment 11 Peter Hutterer 2012-03-14 03:34:19 UTC
Chris: does that mean that the devices that the feature was written for are now properly supported by the kernel? I'm wondering if we could kick out the feature completely in the driver.
Comment 12 Chris Bagwell 2012-03-14 04:47:44 UTC
Peter: we could decide to end-of-life finger count emulation at some point.  Synaptics HW docs do say they sold HW that only supported touch width in place touch count and they tell you how to detect that old hardware... but I think its safe to say that hardware is no longer for sell and they will not go back to that design.

I looked at linux kernel current touchpad drivers and it looks like only old synaptics hardware is the one that need finger count emulation.  All the other drivers that support finger width also support finger counts unconditionally.  Specifically, elantech and Macbooks(bcm chip) are the only other drivers that support finger width.

So the xf86-input-synaptics finger count emulations seems only useful for synaptics driver.  And its only useful for old HW since the new hardware mode is now properly supported in kernel (this new HW mode 100% equates to the synaptics HW declaring INPUT_PROP_SEMI_MT thats getting some XI 2.2 love in xf86-input-synaptics).

So need to decide when some unknown # of old laptops are not worth hassle of supporting.

Chris
Comment 13 Peter Hutterer 2012-03-21 23:30:42 UTC
Thanks for the summary. This means that the emulation won't be actively removed at this point, hardware survives surprisingly long in the hands of some users. Do you have any estimates for when the "new HW" started to appear? How many years ago?
Comment 14 Chris Bagwell 2012-03-22 00:51:51 UTC
I had an early 2009 laptop with synaptics that could report 2 finger touch.  Then I got another laptop January 2010 that had this "new" type.  Using google, the middle of 2010 is popular time to start seeing related complaints.

I think another way to search for this is by fact this behaviour was introduced with synaptics firmware version 7.2.  Searching for synaptics and "fw: 7.2" (from dmesg output), the earliest Linux report I could easily find was middle 2009.

So I think middle 2009 is safe to say when firmware 7.2 was introduced.

They seemed to have stuck with 7.2 because I also have a 2011 laptop using 7.2 and google is showing it with recent laptops.
Comment 15 Bastien Nocera 2013-12-13 18:04:59 UTC
*** Bug 719406 has been marked as a duplicate of this bug. ***