It needs to press touchpad hotkey twice to re-enable touchpad

Bug #1454950 reported by Franz Hsieh
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Expired
Medium
OEM Priority Project
Fix Released
Undecided
Unassigned
unity-settings-daemon (Ubuntu)
Fix Released
High
Lars Karlitski
Trusty
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Unassigned

Bug Description

* Impact
the touchpad toggle key doesn't work correctly

* Test case
using a laptop having a "touchpad toggle key", try to use it to turn touchpad off and on while no other pointing device is connected, it should correctly toggle

* Regression potential:
enabling/disabling of different pointing devices should keep working

-------------------

I have a laptop: ASUS P452L and it has a hotkey (Fn+F9) to disable touchpad function.
I found when I use the hotkey to disable the touchpat and then I have to press the hotkey
twice to re-enable it.

This is symptom cannot be found if:
1) using Kubuntu.
2) plug the usb mouse (any port is ok)

Because it can't be reproduced in Kubuntu, I think it should be an issue of unity-settings-daemon.

Platform: ASUS P451L
Ubuntu: 14.04-LTS
Unity-setting-daemon version: 14.04.0+14.04.20140606-0ubuntu2
Touchpad vendor: Elantech

Note: This issue can be reproduced in Ubuntu 15.04.

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :
Download full text (4.8 KiB)

I add some debug message in unity-settings-daemon/plugins/mouse module, and run tests.
Here are my founds:

1-a) Press Fn+F9, function touchpad_callback disables the touchpad.
1-b) However after touchpad is disabled, device_removed_cb is invoked, and it then calls ensure_touchpad_active.
1-c) The ensure_touchpad_active checks if toucpad is the only one pointer device on the platform, it will make touchpad always enabled.
1-d) However ensure_touchpad_active only changes the gsettings entries but leave the device disabled.

* Press Fn+F9 to disable touchpad

=============================== 1st TOUCHPAD HOTKEY TRIGGER START ===============================

(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback ENTER ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: +++(1) gsettings KEY_TOUCHPAD_ENABLED value: 0
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: Trying to set device disabled for "ETPS/2 Elantech Touchpad" (12)
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: Disabled device "ETPS/2 Elantech Touchpad" (12)
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: +++(2) KEY_TOUCHPAD_ENABLED, value=0 +++
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback EXIT ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG device_removed_cb ENTER ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG ensure_touchpad_active ENTER ===, gsettings key: 0
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback ENTER ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: +++(2) KEY_TOUCHPAD_ENABLED, value=1 +++
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback EXIT ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG ensure_touchpad_active EXIT ===, gsettings key: 1
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG device_removed_cb EXIT ===

=============================== 1st TOUCHPAD HOTKEY TRIGGER END ===============================

2-a) Press Fn+F9 again the touchpad is still disabled.
2-b) The gsettings KEY_TOUCHPAD_ENABLED is set to 0 (FALSE), I think it is changed by usd-media-key.
2-c) I think because device is removed from the list, nothing happend in this stage.

* Press Fn+F9 to enable touchpad
=============================== 2nd TOUCHPAD HOTKEY TRIGGER START ===============================

(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback ENTER ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: +++(2) KEY_TOUCHPAD_ENABLED, value=0 +++
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback EXIT ===

=============================== 2nd TOUCHPAD HOTKEY TRIGGER END ===============================

3-a) Press Fn+F9 again, the gsettings KEY_TOUCHPAD_ENABLED is set to 1(TRUE), it should be set by usd-media-key
3-b) The touchpad_callback eanbles touchpad.

* Press Fn+F9 to enable touchpad
=============================== 3rd TOUCHPAD HOTKEY TRIGGER START ===============================

(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: === DEBUG touchpad_callback ENTER ===
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG: +++(2) KEY_TOUCHPAD_ENABLED, value=1 +++
(lt-usd-test-mouse:16396): mouse-plugin-DEBUG:...

Read more...

Revision history for this message
Ara Pulido (ara) wrote :

Franz, does this happen in Wily?

Changed in unity-settings-daemon (Ubuntu):
status: New → Incomplete
Revision history for this message
Ara Pulido (ara) wrote :

Also, have you tried to see if a different Touchpad (another vendor) with a disabling key has the same issue?

Changed in unity-settings-daemon (Ubuntu):
importance: Undecided → High
assignee: nobody → Sebastien Bacher (seb128)
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → Incomplete
Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

@Ara
1) I haven't tried it on Wily, but I checked the u-s-d source in Wily. Because ensure_touchpad_active is still exists and does not have any change, I think this issue can be reproduced.

2) Currently I only have ASUS machine that has touchpad disabled key.

Besides, it there has a second pointer device (usb mouse), this issue won't happen.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Franz, could you check the upstream code and report that issue to them if you think it's still a bug in trunk?

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

@Sebastien,
I check with the latest gnome-settings-daemon 3.17.1 from github, the ensure_touchpad_active functions is completely rewritten,

static void
ensure_touchpad_active (GsdMouseManager *manager)
{
        GList *devices, *l;
        gboolean state;

        state = get_touchpad_enabled (manager);
        if (state) {
                devices = get_disabled_touchpads (manager->priv->device_manager);
                for (l = devices; l != NULL; l = l->next) {
                        int device_id;

                        device_id = GPOINTER_TO_INT (l->data);
                        set_touchpad_enabled (device_id);
                }
                g_list_free (devices);
        } else {
                devices = gdk_device_manager_list_devices (manager->priv->device_manager,
                                                           GDK_DEVICE_TYPE_SLAVE);

                for (l = devices; l != NULL; l = l->next) {
                        GdkDevice *device = l->data;

                        if (device_is_ignored (manager, device))
                                continue;
                        if (xdevice_is_libinput (gdk_x11_device_get_id (device)))
                                continue;
                        if (gdk_device_get_source (device) != GDK_SOURCE_TOUCHPAD)
                                continue;

                        set_touchpad_disabled (device);
                }

                g_list_free (devices);
        }

        set_disable_w_typing (manager, state);
}

I have not check if the behaviour is changed, the latest g-s-d source requires many updates to make it works.

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

By the way, this issue can be reproduced on 15.04 Wily.

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

I compiled gnome-settings-daemon 3.17.1 (from github) on 15.04 wily and run gsd-test-mouse on the platform, the issue still exists. The gsd-testmouse log file is attached.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

@Sebastien

I reply my comment on the same issue of:
https://bugzilla.gnome.org/show_bug.cgi?id=741523

Changed in gnome-settings-daemon:
status: Incomplete → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

unassigning, I'm too busy to work on that

Changed in unity-settings-daemon (Ubuntu):
assignee: Sebastien Bacher (seb128) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

Lars said he could have a look to that one (if I understood his IRC comment correctly ;-)

Changed in unity-settings-daemon (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
status: Incomplete → Confirmed
Revision history for this message
Lars Karlitski (larsu) wrote :

Thanks, Franz, for investigating this issue.

The mouse module tries to ensure that at least one pointing device is present at any time. This is reasonable, as some people might have problems navigating the UI with only a keyboard if they accidentally disable all pointing devices.

However, the hardware button should still work and allow overriding that feature. Thus, I've attached a branch that only reenables the touchpad when a pointing device other than the touchpad itself was removed. I'd appreciate some testing, because I cannot reproduce this issue on my computer.

Note that the touchpad will be reenabled after plugging and unplugging an external mouse or trackball.

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

Hi Lars,

I built packages from your branch and tested them on the target platform. The issue has been fixed.

Would you please back port it to 14.04 trusty (I tested it on 15.10 wily)?

Thanks!

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Franz, we need to land it to wily first, then it should be backported for a SRU indeed

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-settings-daemon - 15.04.1+15.10.20150720-0ubuntu1

---------------
unity-settings-daemon (15.04.1+15.10.20150720-0ubuntu1) wily; urgency=medium

  [ Lars Uebernickel ]
  * mouse: allow force-disabling touchpad (LP: #1454950)
  * xsettings: include needed libs for test program

 -- CI Train Bot <email address hidden> Mon, 20 Jul 2015 15:39:14 +0000

Changed in unity-settings-daemon (Ubuntu):
status: Confirmed → Fix Released
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

uploaded to trusty and vivid now, they need to be reviewed by the sru team next

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

@Sebastien,

Thanks for your help, I will watch -propose for the update :)

Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Franz, or anyone else affected,

Accepted unity-settings-daemon into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unity-settings-daemon/14.04.0+14.04.20140606-0ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity-settings-daemon (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Changed in unity-settings-daemon (Ubuntu Vivid):
status: New → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Franz, or anyone else affected,

Accepted unity-settings-daemon into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unity-settings-daemon/15.04.1+15.04.20150408-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

@Adam

Install unity-settings-daemon 14.04.0+14.04.20140606-0ubuntu3 on my ASUS P452L platform, this issue is fixed.

Revision history for this message
Franz Hsieh (franz-hsieh) wrote :

Update:

Install unity-settings-daemon 15.04.1+15.04.20150408-0ubuntu1.1 on ASUS P452L platform, this issue is fixed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-settings-daemon - 14.04.0+14.04.20140606-0ubuntu3

---------------
unity-settings-daemon (14.04.0+14.04.20140606-0ubuntu3) trusty; urgency=medium

  [ Lars Uebernickel ]
  * mouse: allow force-disabling touchpad (LP: #1454950)

 -- Sebastien Bacher <email address hidden> Mon, 27 Jul 2015 17:37:08 +0200

Changed in unity-settings-daemon (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for unity-settings-daemon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-settings-daemon - 15.04.1+15.04.20150408-0ubuntu1.1

---------------
unity-settings-daemon (15.04.1+15.04.20150408-0ubuntu1.1) vivid; urgency=medium

  [ Lars Uebernickel ]
  * mouse: allow force-disabling touchpad (LP: #1454950)

 -- Sebastien Bacher <email address hidden> Mon, 27 Jul 2015 17:31:48 +0200

Changed in unity-settings-daemon (Ubuntu Vivid):
status: Fix Committed → Fix Released
Ara Pulido (ara)
Changed in oem-priority:
status: New → Fix Released
Changed in gnome-settings-daemon:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.