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 154029 - Add configuration support for touchpads (synaptics)
Add configuration support for touchpads (synaptics)
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Mouse
2.26.x
Other Linux
: Normal enhancement
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 324612 543424 558911 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-29 06:46 UTC by jensflorian
Modified: 2009-07-13 05:46 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Screenshot of my implementation (21.08 KB, image/png)
2007-09-13 18:25 UTC, Hendrik Richter
  Details
Patch which implements the Touchpad tab (12.67 KB, patch)
2007-09-19 05:51 UTC, Hendrik Richter
reviewed Details | Review
glade file (54.81 KB, application/x-glade)
2007-09-19 05:52 UTC, Hendrik Richter
  Details
schema, use gconftool --install-schema-file (2.56 KB, application/octet-stream)
2007-09-19 05:53 UTC, Hendrik Richter
  Details
Screenshot: new tab after applying the patch (27.09 KB, image/png)
2007-09-19 05:54 UTC, Hendrik Richter
  Details
Updated patch (43.40 KB, patch)
2007-09-20 12:00 UTC, Hendrik Richter
none Details | Review
Updated Screenshot (29.86 KB, image/png)
2007-09-20 12:00 UTC, Hendrik Richter
  Details
patch (22.69 KB, patch)
2009-04-09 01:31 UTC, Matthias Clasen
none Details | Review
0001-Support-touchpad-configuration-through-device-proper.patch (22.74 KB, patch)
2009-05-08 06:05 UTC, Peter Hutterer
reviewed Details | Review
0001-Support-touchpad-configuration-through-device-proper-v2.patch (23.83 KB, patch)
2009-06-04 00:26 UTC, Peter Hutterer
committed Details | Review

Description jensflorian 2004-09-29 06:46:50 UTC
Most laptops have an synaptics compatible touchpad for which a special
xfree/xorg driver (http://w1.894.telia.com/~u89404340/touchpad/index.html)
exists. It allows to modify  run-time configuration using shared memory. This
means it is possible to change parameter settings without restarting the X
server. It also provides a daemon to disable touchpad while typing at the
keyboard and thus avoids unwanted mouse movements. 

These are however still based on a command-line tool and there is no way to
configure them within the Gnome environment. It is possible to enhance the
mouse-configuration utility with another tab to configure the touchbad? Of
course it should be only available when the driver is loaded. 

KDE already has such an frontend (http://qsynaptics.sourceforge.net/about.html)
It would be nice to have such a similiar tool in Gnome too.
Comment 1 Eugenia Loli-Queru 2005-02-13 09:20:44 UTC
I second this. The mouse preference panel is *useless* for 70% of the laptop
users. That creates a redundancy of the pref panel and therefore bad usability.
Please add synaptics support in a way that makes sense.
Comment 2 Matthew East 2005-11-25 22:48:03 UTC
this is working for me in gnome 2.13.1 (ubuntu dapper). I'll ask someone to
close the bug for me.

Matt
Comment 3 Matthew East 2005-11-25 23:23:18 UTC
Actually perhaps I have misunderstood this bug. My touchpad is now reacting to
configuration in gnome-mouse-properties. If this bug is about something a bit
more than that, then please leave open. Otherwise, I think you should be able to
close.
Comment 4 Jonh Wendell 2007-04-09 13:51:10 UTC
gsynaptics (http://gsynaptics.sourceforge.jp) shows us what can be done.

Maybe it can be merged as a new tab on mouse configuration applet?
Comment 5 Wouter Bolsterlee (uws) 2007-05-04 23:15:14 UTC
Any progress on this bug?
Comment 6 Thomas Wood 2007-05-05 11:24:15 UTC
Not unless there is a developer interested in working on it.
Comment 7 Murray Cumming 2007-05-05 12:38:57 UTC
*** Bug 324612 has been marked as a duplicate of this bug. ***
Comment 8 Murray Cumming 2007-05-05 12:40:42 UTC
This bug report would be more useful if it described the actual user features that we would like to have rather than just "change parameter settings".

As mentioned, the most imporant feature seems to be
- Disabling touchpad clicking, to prevent cursor movement during typing.
Comment 9 Artur Brodowski 2007-07-24 14:50:15 UTC
(In reply to comment #8)
> As mentioned, the most imporant feature seems to be
> - Disabling touchpad clicking, to prevent cursor movement during typing.

- disabling touchpad automatically when external mouse is detected 
Comment 10 Hendrik Richter 2007-09-13 18:25:44 UTC
Created attachment 95536 [details]
Screenshot of my implementation

I'm working on this. Supported options so far are:

- enable touchpad
- enable touchpad clicking
- enable scrolling

As this is the first time I'm working with Gtk+ and C my code is still a (very large) bit rough, though I'm planning to attach a more cleanly implemented patch by next week.

Attached is a screenshot of the my current work. Comments appreciated.
Comment 11 Wouter Bolsterlee (uws) 2007-09-13 20:09:49 UTC
Rock on! Perhaps you can steal^Wuse gsynaptics code?
Comment 12 Martin Meyer 2007-09-13 20:18:33 UTC
That screenshot looks like a good start, but there are some specific configurables I would like to see in there:

- Disable touchpad while typing. I believe the synaptics driver has an option for this that can be hooked into.
- Adjust sensitivity with a slider
- Adjust the position of the right-side scroll area, which seems to always be in the wrong place to start with
Comment 13 Hendrik Richter 2007-09-19 05:51:02 UTC
Created attachment 95832 [details] [review]
Patch which implements the Touchpad tab
Comment 14 Hendrik Richter 2007-09-19 05:52:36 UTC
Created attachment 95833 [details]
glade file

No patch, glade changed too much though I only touched my newly created tab
Comment 15 Hendrik Richter 2007-09-19 05:53:48 UTC
Created attachment 95834 [details]
schema, use gconftool --install-schema-file

belongs to libgnome
Comment 16 Hendrik Richter 2007-09-19 05:54:40 UTC
Created attachment 95835 [details]
Screenshot: new tab after applying the patch
Comment 17 Hendrik Richter 2007-09-19 06:22:33 UTC
This is what I've done so far. It detects if synclient is installed and if SHMConfig is set to TRUE in xorg.conf. Works fine for me, hope it does that for you too and that the patch isn't too bad.

Things I'd like to improve are:
- handle left handled mouse
- disable touchpad while typing
Comment 18 Jens Granseuer 2007-09-19 16:30:12 UTC
Ok, some comments:

* Please try to isolate the touchpad-related changes from the glade stuff. Glade is known to subtly (or not so subtly) break stuff if you don't.

* don't use C++-style comments (//...)

* I'm not sure what the best way to handle systems without synclient/proper X configuration is. In some cases I'd prefer not to see the tab (or any error messages) at all, in others some kind of feedback is very helpful (though I'm not sure the current messages aren't too technical)

* do we have to use the external helper app? no API?

* the two sliders desperately need labels ("Enable vertical scrolling? Low/high? WTF?")

* "Enable touchpad clicking" isn't quite right, either ("why would I want to click the touchpad...?"), I think. Could be wrong, though, and can't really think of a better string off-hand, but I'll bet there is one.

* The tab is called "Touchpad", there shouldn't be another heading also called "Touchpad". Make that "General" or something.

* "/desktop/gnome/peripherals/touchpad/off" - the usual convention is to call keys like that ".../enable"

I've got a few other minor nitpicks, but I'll leave those until the other stuff is sorted out.

Other than that looks nice. We'll have to b quick about it, though, so as not to make the patch obsolete before it can get in. The mouse capplet might be going away soon...
Comment 19 Hendrik Richter 2007-09-19 16:58:36 UTC
(In reply to comment #18)

Hi Jens, thanks for your comments!

> * Please try to isolate the touchpad-related changes from the glade stuff.
> Glade is known to subtly (or not so subtly) break stuff if you don't.
>
> * don't use C++-style comments (//...)

Yeah, I'll do that when I upload my next patch.

> * I'm not sure what the best way to handle systems without synclient/proper X
> configuration is. In some cases I'd prefer not to see the tab (or any error
> messages) at all, in others some kind of feedback is very helpful (though I'm
> not sure the current messages aren't too technical)

synclient is provided by the synaptics driver, so it *should* be available if the driver is installed.

I included the tab with the error message in case of missing synclient so that people are aware of the possibilities the capplet gives, though I realize that this may annoy non-laptop users.

On the other hand, if we assume that synclient is always provided by the synaptics driver, which should only be loaded when there is a touchpad, we could safely hide the tab if synclient isn't there and show the error message if synclient is there, but shared memory configuration is disabled.

But I'm really not sure what the best way to this is from a HIG and user's point of view is.
 
> * do we have to use the external helper app? no API?

I had a look at the synclient source and could not find an API. The code isn't much more than "write value to address offset_of(key)". But since synclient is provided by the driver, I don't think we need to duplicate that code.

> * the two sliders desperately need labels ("Enable vertical scrolling?
> Low/high? WTF?")

Right, I'll add them.

> * "Enable touchpad clicking" isn't quite right, either ("why would I want to
> click the touchpad...?"), I think. Could be wrong, though, and can't really
> think of a better string off-hand, but I'll bet there is one.

What about "Enable clicking with touchpad" oder "Click by pressing the touchpad"?

> * The tab is called "Touchpad", there shouldn't be another heading also called
> "Touchpad". Make that "General" or something.

That's true, I couldn't come up with a better word. "General" sounds good to me.

> * "/desktop/gnome/peripherals/touchpad/off" - the usual convention is to call
> keys like that ".../enable"

I know, but I wanted to be compatible to the keys gsynaptics sets. I don't want to expose all possible options in the UI, so a power user would still be able to use gsynaptics to tweak everything without messing up GNOME's config.

> I've got a few other minor nitpicks, but I'll leave those until the other stuff
> is sorted out.
> 
> Other than that looks nice. We'll have to b quick about it, though, so as not
> to make the patch obsolete before it can get in. The mouse capplet might be
> going away soon...

I'll try to fix the trivial things before the weekend. Would be nice if we could decide if we want to use synclient/syndaemon or duplicate the code and what to do about showing/hiding the touchpad tab.
Comment 20 Jens Granseuer 2007-09-19 17:12:49 UTC
(In reply to comment #19)
> On the other hand, if we assume that synclient is always provided by the
> synaptics driver, which should only be loaded when there is a touchpad, we
> could safely hide the tab if synclient isn't there and show the error message
> if synclient is there, but shared memory configuration is disabled.

That's a sensible compromise, I'd say. I still think the message should be a bit less technical, though.

> But I'm really not sure what the best way to this is from a HIG and user's
> point of view is.

The general recommendation is to not hide options, but in some cases (like the non-laptop user) there are good reasons to deviate.

> I had a look at the synclient source and could not find an API. The code isn't
> much more than "write value to address offset_of(key)". But since synclient is
> provided by the driver, I don't think we need to duplicate that code.

Right, poking memory addresses probably can't be considered a stable interface. If there's no library provided with the driver, I guess we'll have to go with synclient.

 > * "Enable touchpad clicking" isn't quite right, either ("why would I want to
> > click the touchpad...?"), I think. Could be wrong, though, and can't really
> > think of a better string off-hand, but I'll bet there is one.
> 
> What about "Enable clicking with touchpad" oder "Click by pressing the
> touchpad"?

Definitely better. "Enable mouse clicks with touchpad"? Other suggestions welcome.

> > * "/desktop/gnome/peripherals/touchpad/off" - the usual convention is to call
> > keys like that ".../enable"
> 
> I know, but I wanted to be compatible to the keys gsynaptics sets. I don't want
> to expose all possible options in the UI, so a power user would still be able
> to use gsynaptics to tweak everything without messing up GNOME's config.

Hm, ok, I guess that's good enough a reason to do it that way.
Comment 21 Hendrik Richter 2007-09-20 12:00:17 UTC
Created attachment 95896 [details] [review]
Updated patch

- implemented Jens' comments
- includes patch for glade file
- switch TapButtons for left handed mice
Comment 22 Hendrik Richter 2007-09-20 12:00:58 UTC
Created attachment 95897 [details]
Updated Screenshot
Comment 23 Matthew Garrett 2007-09-20 14:04:24 UTC
I don't think this is the correct approach. It encourages people (and distributions) to set SHMConfig to true, which is a screaming security nightmare (it effectively allows anyone with access to the machine, even remote access, to be able to make the user click on arbitrary points of the screen). The correct approach is to layer the configuration protocol over X, which is something I'm working on.
Comment 24 Jens Granseuer 2007-09-20 16:58:56 UTC
Can you elaborate? What does this mean for the control center and what's the timeframe we're talking about?
Comment 25 Matthew Garrett 2007-09-20 17:02:31 UTC
Well, I'd solidly recommend against any approach that uses SHMConfig. It's simply not safe. As far as layering the config over X goes, doing it properly will require modifications to the X server, so we're looking at 6 months or so until their next release.
Comment 26 Matthew Garrett 2007-09-20 17:04:24 UTC
Oh, yeah - enable touchpad button? Not such a great idea :) (think about the case of machines that only have a touchpad)
Comment 27 Murray Cumming 2007-11-01 15:28:26 UTC
Apparently Ubuntu Gutsy has a Touchpad tab in the Mouse control panel, though I can't see it in my Ubuntu Gutsy installation. Quoting from desktop-devel-list:

"
26_add_touchpad_to_mouse_settings.patch
27_add_touchpad_to_settings_daemon.patch
28_fixup_touchpad_config.patch
30_extra_touchpad_config_paranoia.patch

(http://people.ubuntu.com/~scott/gnome-control-center-patches)
"

 
Comment 28 Johannes Schmid 2008-01-02 22:09:11 UTC
Gutsy has only these options (for my installation) on the touchpad tab:

- Tap on Click
- Vertical scrolling
- Horizontal scrolling

But this does not include the option "disable while typing" which is IMHO the most important for this bug.
Comment 29 Jens Granseuer 2008-07-17 17:42:37 UTC
*** Bug 543424 has been marked as a duplicate of this bug. ***
Comment 30 Vincent Untz 2008-10-22 18:58:06 UTC
Looks like this will be fixable with some new X: http://who-t.blogspot.com/2008/10/device-properties-have-landed.html
Comment 31 Jens Granseuer 2008-11-02 19:10:57 UTC
*** Bug 558911 has been marked as a duplicate of this bug. ***
Comment 32 Pacho Ramos 2009-03-01 09:03:53 UTC
(In reply to comment #28)
> Gutsy has only these options (for my installation) on the touchpad tab:
> 
> - Tap on Click
> - Vertical scrolling
> - Horizontal scrolling
> 
> But this does not include the option "disable while typing" which is IMHO the
> most important for this bug.
> 

Now that tap on click and vertical scrolling are disabled by default by new synaptics-1.0, I think that a way for configuring this from gnome is even more needed. Maybe ubuntu patch for gnome-control-center-2.25.90 could be a good start point... What do you think? Maybe its problems could be reported to ubuntu maintainers...

Thanks a lot
Comment 33 Bastien Nocera 2009-03-09 15:53:25 UTC
The main problem was that gsypnaptics (and this code) required using the SHM method of configuration, which is very ugly.

Any code we add to the control-center would need to use the XInput properties instead.

See:
http://lwn.net/Articles/315613/
http://www.x.org/wiki/XInputSpec#head-0a74e393ba085d465f78357d56ebf38385051c9c
Comment 34 Matthias Clasen 2009-04-09 01:30:36 UTC
Turns out Ubuntu has updated their patch to use properties, but never upstreamed it. So, here is Peter Hutterers adaptation of their patch.
Comment 35 Matthias Clasen 2009-04-09 01:31:38 UTC
Created attachment 132378 [details] [review]
patch

The corresponding gnome-settings-daemon-patch is in bug 578444
Comment 36 Matthias Clasen 2009-04-09 01:42:04 UTC
The patch should probably disable the 'while typing' checkbox if syndaemon is not available.
Comment 37 Jens Granseuer 2009-04-09 18:34:48 UTC
Other than cosmetic changes (same as the other patch) looks good to me.
Comment 38 Peter Hutterer 2009-05-08 06:05:17 UTC
Created attachment 134243 [details] [review]
0001-Support-touchpad-configuration-through-device-proper.patch

style changes (foo() -> foo ()), one if brace moved up and a few whitespace fixes.
Comment 39 Jens Granseuer 2009-05-09 13:44:18 UTC
+#include <X11/Xatom.h>
+#include <X11/extensions/XInput.h>
+#include <X11/extensions/XIproto.h>

I suspect we need to add XInput checks to configure for this?
Comment 40 Peter Hutterer 2009-06-04 00:26:45 UTC
Created attachment 135913 [details] [review]
0001-Support-touchpad-configuration-through-device-proper-v2.patch

Sorry, wasn't on the CC list and didn't get notified about your comment.

Here's the updated patch. Modifications:
- last hunk: configure.in check for libXi 1.2, defines HAVE_XINPUT if present
- hunk 1: conditionally include xinput headers
- hunk 1: remove XIproto.h include, this was a leftover of the original Ubuntu patch and isn't needed
- hunk 2: if HAVE_XINPUT is not defined, return False from find_synaptics()
- hunk 2: find_synaptics() returns False if the server's version is < 1.5
- hunk 2: call to XListInputDevices moved down a bit to skip it if we bail out early anyway.

Note that libXi is on version 1.2 for property support, whereas inputproto is on 1.5. So we check for 1.2 in configure, but 1.5 in the code. This is not a typo :)
Comment 41 Kevin Förderer 2009-06-28 11:22:00 UTC
Please consider adding an option for disabling the touchpad while there is another mouse present, according to Bug 337367
Comment 42 Jens Granseuer 2009-07-03 16:40:37 UTC
Ok, g-c-c has finally branched. Full steam ahead. Thanks Peter!
Comment 43 Peter Hutterer 2009-07-06 03:16:34 UTC
FWIW, the next synaptics version will have a read-only property "Synaptics Capabilities" [1]. This property tracks the physical capabilities of the touchpad and can be used to query whether the device has multi-finger support. If not, the radio button selecting two-finger scrolling should be disabled.

If someone finds the time to write the necessary patch, I'll be happy to review it.

[1] http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=6b3a032fdf5479cb5be441a01ebef92a39e5fb69
Comment 44 Thomas Wood 2009-07-12 21:47:39 UTC
Well, since the patch was marked commit_now, I've pushed it into git. Unfortunatly I can't test it since I don't have a touchpad, but anyone is welcome to re-open this bug or revert the patch if there are problems.