Bug 1321641 - Touchpad toggle button out of sync after suspend/hibernation [NEEDINFO]
Summary: Touchpad toggle button out of sync after suspend/hibernation
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 27
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-28 17:50 UTC by Johan Heikkila
Modified: 2018-08-29 15:11 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-29 15:11:45 UTC
Type: Bug
jforbes: needinfo?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Linux Kernel 190691 0 None None None 2017-07-21 11:45:08 UTC

Description Johan Heikkila 2016-03-28 17:50:45 UTC
Description of problem:

On the MSI GE60 laptop, the Elantech Touchpad toggle button gets out of sync v.s. the Gnome setting, after resuming from suspend or hibernation, but only when the touchpad was turned off using the button before suspending. If the touchpad was on, it continues working after suspend/hibernation. Turning it off using gnome settings doesn't cause any problems, but one observation is that when turning it off in gnome settings the button status light is not lit, which it would have been when using the button to turn off.

Normally, the hardware button and status light (button status light is on when touchpad is off) is in sync with Gnome settings. So when pressing the button, it toggles also the setting in Gnome settings. But if the touchpad was turned off (and light is on) before suspending, when it wakes up, the button light is off (meaning that the hardware button is in ON state), but in gnome settings touchpad is still off (and the touchpad is also really off). Now when pressing the toggle button, the button tries to turn off the touchpad, even though it is already off, and toggles the Gnome setting to on. When pressing again, it tries to turn the touchpad on, but the gnome setting is toggled to off. So it becomes impossible to turn on the touchpad using the button. There are a few ways to make it work again and get it in sync with the Gnome setting:
- toggle the touchpad on/off setting in Gnome settings
- switch to a console using Ctrl-Alt-F3 and push the button once
- reboot the computer


How reproducible:
Always


Steps to Reproduce:
1. Switch off touchpad using button. Touchpad-off-light becomes lit.
2. Suspend or hibernate
3. Resume from suspend
4. Touchpad is still turned off, but toggle button indicates that it is on (light is off)
5. Gnome settings says that touchpad is off
6. Turning touchpad off using the button will switch the gnome setting on, but the touchpad is still off.
7. Turning touchpad on using the button will switch the gnome setting off, and the touchpad is still off.

Additional info:

I'm not sure if this is a problem with kernel, udev, X11, gnome-settings-daemon, synaptics or something else. Hopefully somebody can give some hints in the right direction so that I can give some more useful info.


xinput 
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Razer Razer DeathAdder                  	id=11	[slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                	id=14	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
    ↳ MSI WMI hotkeys                         	id=15	[slave  keyboard (3)]
    ↳ BisonCam, NB Pro                        	id=12	[slave  keyboard (3)]
    ↳ Logitech Logitech G430 Gaming Headset   	id=10	[slave  keyboard (3)]
    ↳ Video Bus                               	id=8	[slave  keyboard (3)]
    ↳ Power Button                            	id=9	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]


dmesg |grep -i touch
[    1.971143] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input5
[    3.104800] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input9
[ 5462.278737] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 5462.307197] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.


Pushing the touchpad button generates the following events, same events with on and off:

showkey -s
0x74 0xf4 
0x74 0xf4 

showkey -k
keycode 191 press
keycode 191 release

xmodmap -pke|grep 191
keycode 191 = XF86Tools NoSymbol XF86Tools

xev
FocusOut event, serial 36, synthetic NO, window 0x2a00001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 36, synthetic NO, window 0x2a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   



xinput list-props "ETPS/2 Elantech Touchpad"
Device 'ETPS/2 Elantech Touchpad':
	Device Enabled (136):	1
	Coordinate Transformation Matrix (138):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (289):	1
	libinput Tapping Enabled Default (290):	0
	libinput Tapping Drag Lock Enabled (291):	0
	libinput Tapping Drag Lock Enabled Default (292):	0
	libinput Accel Speed (272):	0.000000
	libinput Accel Speed Default (273):	0.000000
	libinput Natural Scrolling Enabled (277):	0
	libinput Natural Scrolling Enabled Default (278):	0
	libinput Send Events Modes Available (256):	1, 1
	libinput Send Events Mode Enabled (257):	0, 0
	libinput Send Events Mode Enabled Default (258):	0, 0
	libinput Left Handed Enabled (279):	0
	libinput Left Handed Enabled Default (280):	0
	libinput Scroll Methods Available (281):	1, 1, 0
	libinput Scroll Method Enabled (282):	1, 0, 0
	libinput Scroll Method Enabled Default (283):	1, 0, 0
	libinput Disable While Typing Enabled (293):	1
	libinput Disable While Typing Enabled Default (294):	1
	Device Node (259):	"/dev/input/event8"
	Device Product ID (260):	2, 14
	libinput Drag Lock Buttons (288):	<no items>
	libinput Horizonal Scroll Enabled (261):	1

Comment 1 Johan Heikkila 2016-04-04 21:16:00 UTC
Found out that there is a msi-laptop kernel module. When loading it, it is possible to run evtest:

...
/dev/input/event7:	MSI Laptop hotkeys
...
Select the device event number [0-12]: 7
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "MSI Laptop hotkeys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 240 (KEY_UNKNOWN)
    Event code 531 (KEY_TOUCHPAD_ON)
    Event code 532 (KEY_TOUCHPAD_OFF)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1459803985.930558, type 4 (EV_MSC), code 4 (MSC_SCAN), value 214
Event: time 1459803985.930558, type 1 (EV_KEY), code 532 (KEY_TOUCHPAD_OFF), value 1
Event: time 1459803985.930558, -------------- SYN_REPORT ------------
Event: time 1459803985.930580, type 1 (EV_KEY), code 532 (KEY_TOUCHPAD_OFF), value 0
Event: time 1459803985.930580, -------------- SYN_REPORT ------------
Event: time 1459803989.933746, type 4 (EV_MSC), code 4 (MSC_SCAN), value 213
Event: time 1459803989.933746, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 1
Event: time 1459803989.933746, -------------- SYN_REPORT ------------
Event: time 1459803989.933780, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 0
Event: time 1459803989.933780, -------------- SYN_REPORT ------------


So now there are actually both on and off events. The behavior is still the same, though. The button is out of sync with the gnome setting after suspend, if suspended with the touchpad off (set with the button).

The following events are registered when setting the laptop to suspend with the touchpad off (turned off by the button): 

Event: time 1459804203.931577, type 4 (EV_MSC), code 4 (MSC_SCAN), value 213
Event: time 1459804203.931577, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 1
Event: time 1459804203.931577, -------------- SYN_REPORT ------------
Event: time 1459804203.931584, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 0
Event: time 1459804203.931584, -------------- SYN_REPORT ------------
Event: time 1459804209.822308, type 4 (EV_MSC), code 4 (MSC_SCAN), value 213
Event: time 1459804209.822308, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 1
Event: time 1459804209.822308, -------------- SYN_REPORT ------------
Event: time 1459804209.822321, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 0
Event: time 1459804209.822321, -------------- SYN_REPORT ------------
Event: time 1459804211.823306, type 4 (EV_MSC), code 4 (MSC_SCAN), value 213
Event: time 1459804211.823306, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 1
Event: time 1459804211.823306, -------------- SYN_REPORT ------------
Event: time 1459804211.823321, type 1 (EV_KEY), code 531 (KEY_TOUCHPAD_ON), value 0
Event: time 1459804211.823321, -------------- SYN_REPORT ------------

So it seems the button is turned on during suspend and wakeup, but the actual touchpad is not enabled, and not the setting in Gnome.

Comment 2 Johan Heikkila 2016-04-06 06:37:26 UTC
I am able to work around the problem with a script that disables the touchpad before suspend and re-enables it after wakeup. The touchpad is of course always turned on afterwards, even though it was turned off before:

/etc/pm/sleep.d/00-trackpad

#!/bin/sh
declare -i ID
ID=`xinput list | grep -Eo 'ouchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
case "$1" in
  suspend|hibernate)
     xinput --set-prop $ID "Device Enabled" 0 ;;
  resume|thaw)
    xinput --set-prop $ID "Device Enabled" 1 ;;
esac

The problem that the light on the touchpad toggle button is never turned on from software is still an issue, though.

Comment 3 Johan Heikkila 2016-07-27 13:22:11 UTC
This is still broken in Fedora 24 and what is worse, my workaround script doesn't work any more. And what is even worse, the touchpad settings in Gnome settings is broken so you can't browse with just the keyboard (tab) to the touchpad settings and toggle the touchpad on/off. You have to do it with the touchpad or mouse! Only solution is to reboot now when waking up from suspend or to toogle the touchpad hardware key, suspend once more and wake up again. If you are lucky, then the touchpad is enabled.

Comment 4 Laura Abbott 2016-09-23 19:08:52 UTC
*********** MASS BUG UPDATE **************
 
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 24 kernel bugs.
 
Fedora 24 has now been rebased to 4.7.4-200.fc24.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 25, and are still experiencing this issue, please change the version to Fedora 25.
 
If you experience different issues, please open a new bug report for those.

Comment 5 Johan Heikkila 2016-09-23 19:32:26 UTC
This is still a problem in the 4.7.4-200 kernel. 

(I'm also not sure if this is only a kernel problem or if the problem is also in some other component).

Comment 6 Johan Heikkila 2016-12-04 10:24:28 UTC
This is still a problem in Fedora 25. After hibernate the touchpad state/toggle button is out of sync and touchpad cannot be turned on until switched to a console using Ctrl-Alt-F3 and pushing the touchpad toggle button once (or rebooting). 

What is also confusing is that now touchpad settings are missing completely from Gnome settings. There are only mouse button and speed. No settings for touchpad.

Comment 7 Johan Heikkila 2016-12-14 20:32:17 UTC
Touchpad settings are back in Gnome, and now the edge scrolling also works, great! But the touchpad on/off state still gets out of sync during suspend if it was turned off before suspending.

Comment 8 Johan Heikkila 2016-12-18 22:12:01 UTC
Finally reported this upstream: https://bugzilla.kernel.org/show_bug.cgi?id=190691

Comment 9 Laura Abbott 2017-01-17 01:18:27 UTC
*********** MASS BUG UPDATE **************
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.
 
Fedora 25 has now been rebased to 4.9.3-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.
 
If you experience different issues, please open a new bug report for those.

Comment 10 Johan Heikkila 2017-01-17 19:07:22 UTC
The problem persists with kernel 4.9.3-200.fc25.

Comment 11 Justin M. Forbes 2017-04-11 14:48:00 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.

Fedora 25 has now been rebased to 4.10.9-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.

If you experience different issues, please open a new bug report for those.

Comment 12 Johan Heikkila 2017-04-20 20:11:07 UTC
Problem persists with kernel 4.10.10-200.fc25.

Comment 13 Dimitris 2017-07-21 04:44:04 UTC
Just noticed this with a ThinkPad X250 on F26/GNOME/Wayland

kernel is 4.11.11-300.fc26.x86_64

Device:           SynPS/2 Synaptics TouchPad
Kernel:           /dev/input/event4
Group:            10
Seat:             seat0, default
Size:             85x51mm
Capabilities:     pointer 
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Comment 14 Johan Heikkila 2017-07-21 11:40:39 UTC
Problem persists on MSI GE60 laptop with Fedora 26 kernel 4.11.11-300.fc26.x86_64.

Comment 15 Ted W. 2017-07-30 03:17:37 UTC
Confirming that this issue is affecting Lenovo X220 w/ F26. There is no hardware button to disable the trackpad but disabling it from within Gnome settings works until Suspend/Hibernate. When laptop resumes from suspend/hibernate state the trackpad is re-enabled but the Gnome settings says it's still disabled. Toggling the option on and back off again re-disables this. Again on kernel 4.11.11-300.fc26.x86_64.

Comment 16 Paul Wouters 2017-08-02 17:17:43 UTC
problem started for me after upgrade from f24 to f26

Comment 17 Dimitris 2017-09-16 23:50:39 UTC
I'm not seeing this any more with kernel 4.12.13-300.fc26.x86_64 - same X250/F26/Wayland as my comment 13 above

Comment 18 Johan Heikkila 2017-09-19 16:27:52 UTC
This is still a problem with the MSI laptop as originally reported, with kernel 4.12.13-300.fc26.x86_64.

Comment 19 Paul Wouters 2017-09-19 19:15:05 UTC
It seems to have fixed it for me on my thinkpad X1 Carbon Gen 3 with 4.12.13-300.fc26.x86_64.

Comment 20 Ted W. 2017-09-22 22:48:34 UTC
This is fixed on my Lenovo x220 w/ F26

4.12.13-300.fc26.x86_64

Comment 21 Fedora End Of Life 2017-11-16 19:16:00 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 22 Johan Heikkila 2017-11-17 15:27:09 UTC
This is still a problem in Fedora 27 with the MSI laptop as originally reported, with kernel 4.13.12-300.fc27.x86_64.

Comment 23 SirWeazel 2018-02-10 02:11:58 UTC
Fedora 26 - Still a problem with MSI (GT70) similar hardware as original post on 4.14.16-200.fc26.x86_64.
This issue occurred a couple releases ago, then was fixed in one release, then i'm not sure which release it cropped back up on. Sorry i don't know which release it was fixed in.

Comment 24 SirWeazel 2018-02-10 02:48:24 UTC
Here is some info from libinput list-devices and xinput (ran under wayland, so i noticed it doesn't give much).
https://paste.fedoraproject.org/paste/aKrVtWtDRXfkpNd3C2nHRA

Comment 25 SirWeazel 2018-02-13 23:44:03 UTC
If there is any info you want me to provide, Let me know and I will try my best to provide. Also provide instructions for the info you want me to provide. Side note: pressing the button to disable the touchpad before suspend seems to keep everything in sync upon resume.

Comment 26 Justin M. Forbes 2018-07-23 15:17:24 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 27 kernel bugs.

Fedora 27 has now been rebased to 4.17.7-100.fc27.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 28, and are still experiencing this issue, please change the version to Fedora 28.

If you experience different issues, please open a new bug report for those.

Comment 27 Justin M. Forbes 2018-08-29 15:11:45 UTC
*********** MASS BUG UPDATE **************
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 5 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously.


Note You need to log in before you can comment on or make changes to this bug.