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 749818 - Touchpad toggle shortcut doesn't enable touchpad
Touchpad toggle shortcut doesn't enable touchpad
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: mouse
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Ondrej Holy
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-25 08:22 UTC by Teodor Shaterov
Modified: 2015-08-26 09:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common: Make device type presence checks work on libinput and wayland (10.91 KB, patch)
2015-05-29 18:52 UTC, Rui Matos
committed Details | Review
common/test-input-helper: Adapt to changes in the previous commit (4.67 KB, patch)
2015-05-29 18:52 UTC, Rui Matos
committed Details | Review
media-keys: Adapt to changes in touchpad_is_present() (1.11 KB, patch)
2015-05-29 18:52 UTC, Rui Matos
rejected Details | Review
mouse: Adapt to changes in gsd-input-helper (2.32 KB, patch)
2015-06-26 14:02 UTC, Ondrej Holy
committed Details | Review
mouse: Adapt to changes in gsd-input-helper (2.38 KB, patch)
2015-07-01 13:51 UTC, Ondrej Holy
rejected Details | Review
common: Rename a couple of synaptics specific functions (3.83 KB, patch)
2015-07-02 12:44 UTC, Rui Matos
committed Details | Review

Description Teodor Shaterov 2015-05-25 08:22:48 UTC
Using the touchpad toggle (Fn + F8) on my Thinkpad T410 with Fedora 22 Beta doesn't enable the touchpad. If it is enabled, it disables it, but never enables it again. Using the toggle from the gnome control center, the touchpad could be enabled again, but the hotkey functionality is not working as expected.
I tried with both xorg and wayland and the result is just the same.
When I execute the following command :
gsettings set org.gnome.desktop.peripherals.touchpad send-events 'enabled'
it enables the touchpad. When I also try to play with the toggle button in Gnome settings, it disables/enables the touchpad as expected.
Comment 1 Rui Matos 2015-05-29 18:52:13 UTC
Created attachment 304283 [details] [review]
common: Make device type presence checks work on libinput and wayland

Using GsdDeviceManager allows our device type presence checks work
both on libinput using X sessions and on Wayland sessions.

At the same time we still need to support systems using the synaptics
X driver so let's make that an explicit separate check.
Comment 2 Rui Matos 2015-05-29 18:52:25 UTC
Created attachment 304284 [details] [review]
common/test-input-helper: Adapt to changes in the previous commit

As a side effect we can now run this on wayland sessions too.
Comment 3 Rui Matos 2015-05-29 18:52:32 UTC
Created attachment 304285 [details] [review]
media-keys: Adapt to changes in touchpad_is_present()

touchpad_is_present() now detects touchpads in libinput using X
sessions and Wayland sessions but it doesn't on X sessions using the
synaptics driver so we need to add that extra check.
Comment 4 Ondrej Holy 2015-06-26 14:01:17 UTC
Review of attachment 304283 [details] [review]:

Looks good, just...

Please sync this changes also with control-center.

::: plugins/common/gsd-input-helper.h
@@ +66,3 @@
 gboolean  device_info_is_touchscreen (XDeviceInfo         *device_info);
 gboolean  device_info_is_tablet (XDeviceInfo         *device_info);
 gboolean  device_info_is_mouse       (XDeviceInfo         *device_info);

All device_info_is_ declarations should be removed...
Comment 5 Ondrej Holy 2015-06-26 14:01:30 UTC
Review of attachment 304284 [details] [review]:

Looks good to me!
Comment 6 Ondrej Holy 2015-06-26 14:01:44 UTC
Review of attachment 304285 [details] [review]:

I suppose this isn't necessary, because of the commit b23917f0a279aba4599cdc7a5b34055f3d8975ba from Bug 747504. Touchpad is disabled using "Synaptics Off" and thus touchpad_is_present() should work correctly, shouldn't it?
Comment 7 Ondrej Holy 2015-06-26 14:02:37 UTC
Created attachment 306175 [details] [review]
mouse: Adapt to changes in gsd-input-helper

Redundant code can be removed from mouse panel thanks to changes in gsd-input-helper.
Comment 8 Rui Matos 2015-06-29 14:08:48 UTC
(In reply to Ondrej Holy from comment #6)
> I suppose this isn't necessary, because of the commit
> b23917f0a279aba4599cdc7a5b34055f3d8975ba from Bug 747504. Touchpad is
> disabled using "Synaptics Off" and thus touchpad_is_present() should work
> correctly, shouldn't it?

It's necessary because GsdDeviceManager only catalogs touchpads as such on libinput. Synaptics touchpad devices get cataloged as a simple mouse. That's why I had to keep a specific synaptics_is_present() function.
Comment 9 Rui Matos 2015-06-29 14:19:48 UTC
Review of attachment 306175 [details] [review]:

sure
Comment 10 Rui Matos 2015-06-29 14:33:03 UTC
Review of attachment 306175 [details] [review]:

::: panels/mouse/gnome-mouse-properties.c
@@ +348,3 @@
 		CcMousePropertiesPrivate *d)
 {
+	d->have_touchpad = touchpad_is_present ();

In fact, this should be touchpad_is_present() || synaptics_is_present() .

I guess we weren't showing the touchpad UI on synaptics sessions?

@@ +419,3 @@
 
+	d->have_mouse = mouse_is_present ();
+	d->have_touchpad = touchpad_is_present ();

same here
Comment 11 Ondrej Holy 2015-06-30 08:04:33 UTC
(In reply to Rui Matos from comment #10)
> Review of attachment 306175 [details] [review] [review]:
> 
> ::: panels/mouse/gnome-mouse-properties.c
> @@ +348,3 @@
>  		CcMousePropertiesPrivate *d)
>  {
> +	d->have_touchpad = touchpad_is_present ();
> 
> In fact, this should be touchpad_is_present() || synaptics_is_present() .
> 
> I guess we weren't showing the touchpad UI on synaptics sessions?

Hmm, the touchpad section is shown on my T420s on synaptics session... But it is true that there was a bug when some user was not able to see the touchpad section from an unknown reason and it was solved by the libinput driver...
Comment 12 Ondrej Holy 2015-07-01 13:51:15 UTC
Created attachment 306503 [details] [review]
mouse: Adapt to changes in gsd-input-helper

There is updated patch, however the patches need more testing as per commit 11.
Comment 13 Ondrej Holy 2015-07-01 13:53:04 UTC
(In reply to Ondrej Holy from comment #12)
> Created attachment 306503 [details] [review] [review]
> mouse: Adapt to changes in gsd-input-helper
> 
> There is updated patch, however the patches need more testing as per commit
> 11.

s/commit/comment/
Comment 14 Rui Matos 2015-07-02 12:42:40 UTC
(In reply to Ondrej Holy from comment #11)
> Hmm, the touchpad section is shown on my T420s on synaptics session... But
> it is true that there was a bug when some user was not able to see the
> touchpad section from an unknown reason and it was solved by the libinput
> driver...

Ok, I was wrong above when I said "GsdDeviceManager only catalogs touchpads as such on libinput". I dug a bit more into it and here's what is happening (confirmed on gdb):

GsdDeviceManager, on X11, relies on gdk's device cataloging. Here's where it happens:

https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkdevicemanager-xi2.c#n363

as you can see a bit above that, is_touchpad_device() only detects libinput devices. What happens is that the next check, is_touch_device(), ends up finding touchpads too, so we can take your previous g-c-c patch after all, i.e. no need to have the synaptics_is_present() call there.
Comment 15 Rui Matos 2015-07-02 12:43:14 UTC
Review of attachment 304285 [details] [review]:

This is indeed not needed
Comment 16 Rui Matos 2015-07-02 12:44:55 UTC
Created attachment 306612 [details] [review]
common: Rename a couple of synaptics specific functions

No functional changes, this just makes it explicit that these
functions only work on devices driven by the X synaptics driver.
Comment 17 Rui Matos 2015-07-02 13:22:54 UTC
Review of attachment 306175 [details] [review]:

let's go with this
Comment 18 Rui Matos 2015-07-02 13:25:29 UTC
Attachment 304283 [details] pushed as 12f7465 - common: Make device type presence checks work on libinput and wayland
Attachment 304284 [details] pushed as 7a502fa - common/test-input-helper: Adapt to changes in the previous commit
Attachment 306612 [details] pushed as 683861c - common: Rename a couple of synaptics specific functions
Comment 19 Ondrej Holy 2015-07-02 13:58:00 UTC
Comment on attachment 306175 [details] [review]
mouse: Adapt to changes in gsd-input-helper

master:
commit f290d71e9a20c757ef285a4e7abaac5d8330718e

gnome-3-16:
commit 695d25c1d646e1c621258bfa871e16a7916f2be7
Comment 20 Марко Костић (Marko Kostić) 2015-07-09 17:18:29 UTC
I am experiencing the same issue on Fedora 22.

[user@box] $ cat /proc/bus/input/devices
I: Bus=0011 Vendor=0002 Product=0008 Version=0300
N: Name="AlpsPS/2 ALPS DualPoint TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input6
U: Uniq=
H: Handlers=mouse2 event8 
B: PROP=9
B: EV=b
B: KEY=e420 70000 0 0 0 0
B: ABS=260800001000003

gnome-settings-daemon.x86_64            3.16.2-1.fc22
Comment 21 Luca Cavalli 2015-08-25 06:43:35 UTC
Updated to gnome-settings-daemon 3.16.3 this morning on fedora 22, and the bug is still present.

I own an ASUS X54C and it seems that the 'Fn' key is not recognized (e.g., if I press Fn+F5 - decrease luminosity - it refresh the content of Firefox).

Any test I can perform to help you solve the issue?
Comment 22 Luca Cavalli 2015-08-25 07:06:59 UTC
My touchpad is a:

I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech Touchpad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/devices/platform/i8042/serio4/input/input11
U: Uniq=
H: Handlers=mouse1 event7 
B: PROP=1
B: EV=b
B: KEY=6420 30000 0 0 0 0
B: ABS=260800011000003
Comment 23 Марко Костић (Marko Kostić) 2015-08-25 07:10:03 UTC
(In reply to Luca Cavalli from comment #22)
> My touchpad is a:
> 
> I: Bus=0011 Vendor=0002 Product=000e Version=0000
> N: Name="ETPS/2 Elantech Touchpad"
> P: Phys=isa0060/serio4/input0
> S: Sysfs=/devices/platform/i8042/serio4/input/input11
> U: Uniq=
> H: Handlers=mouse1 event7 
> B: PROP=1
> B: EV=b
> B: KEY=6420 30000 0 0 0 0
> B: ABS=260800011000003

Peter Hutterer made a useful comment on my bug report, on Red Hat's bugzilla on how to test if there's any key event when you press the key combo. He said: "if you run sudo libinput-debug-events and then hit the shortcut, do you see a key event for it?".
https://bugzilla.redhat.com/show_bug.cgi?id=1225735#c1

Also, this may be a hardware problem. Does the touchpad enable/disable button combo work on some older Linux distro? Does it work on that Other OS That Shall Not Be Named?
Comment 24 Luca Cavalli 2015-08-25 07:19:11 UTC
(In reply to Марко Костић (Marko Kostić) from comment #23)
> (In reply to Luca Cavalli from comment #22)
> > My touchpad is a:
> > 
> > I: Bus=0011 Vendor=0002 Product=000e Version=0000
> > N: Name="ETPS/2 Elantech Touchpad"
> > P: Phys=isa0060/serio4/input0
> > S: Sysfs=/devices/platform/i8042/serio4/input/input11
> > U: Uniq=
> > H: Handlers=mouse1 event7 
> > B: PROP=1
> > B: EV=b
> > B: KEY=6420 30000 0 0 0 0
> > B: ABS=260800011000003
> 
> Peter Hutterer made a useful comment on my bug report, on Red Hat's bugzilla
> on how to test if there's any key event when you press the key combo. He
> said: "if you run sudo libinput-debug-events and then hit the shortcut, do
> you see a key event for it?".
> https://bugzilla.redhat.com/show_bug.cgi?id=1225735#c1
> 
> Also, this may be a hardware problem. Does the touchpad enable/disable
> button combo work on some older Linux distro? Does it work on that Other OS
> That Shall Not Be Named?

I start suspecting an hardware problem... I can catch all key-presses via libinput-debug-events except the 'Fn' key, which is completely mute. I don't have any other OS to test with, but I'm sure it worked when I was on fedora 21.
Comment 25 Марко Костић (Marko Kostić) 2015-08-25 07:21:29 UTC
(In reply to Luca Cavalli from comment #24)
> I start suspecting an hardware problem... I can catch all key-presses via
> libinput-debug-events except the 'Fn' key, which is completely mute. I don't
> have any other OS to test with, but I'm sure it worked when I was on fedora
> 21.

I would suggest that you create a live USB of Fedora 21, boot it up and test if the toggle shortcut works there.
Comment 26 Марко Костић (Marko Kostić) 2015-08-25 07:25:43 UTC
(In reply to Luca Cavalli from comment #24)
> 
> I start suspecting an hardware problem... I can catch all key-presses via
> libinput-debug-events except the 'Fn' key, which is completely mute. I don't
> have any other OS to test with, but I'm sure it worked when I was on fedora
> 21.

Luca, sorry. I've forgot that sudo libinput-debug-events is for testing the touchpad itself (ie. tapping the touchpad should generate output from the libinput-debug-events). So sorry, I need to drink my coffee properly before commenting. :)

Still, my advice about testing the toggle shortcut on Fedora 21 stands. Try it on a live USB and report back.
Comment 27 Luca Cavalli 2015-08-26 09:41:10 UTC
Probably a hardware problem. Also with fedora 21 live Fn key doesn't work.
Sorry for the noise...