Bug 395722 - touchpad settings are wrong after resuming from suspend
Summary: touchpad settings are wrong after resuming from suspend
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_touchpad (show other bugs)
Version: 5.17.5
Platform: Arch Linux Linux
: VHI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 342929 370202 396146 398999 399729 400069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-22 02:46 UTC by linken.dinh
Modified: 2020-01-22 21:35 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.14.0
Sentry Crash Report:


Attachments
Warning settings do not match after suspend (321.82 KB, image/png)
2018-06-22 02:46 UTC, linken.dinh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description linken.dinh 2018-06-22 02:46:38 UTC
Created attachment 113500 [details]
Warning settings do not match after suspend

Version of KDE is 5.13.1.1-1 in arch linux.

Reproduce for example reverse scrolling enabled before suspend:
1. systemctl suspend
2. wake up computer
Results: reverse scrolling disabled

3. Navigate to Settings -> Input devices -> Touchpad
Result screenshot in settings says active settings do not match saved settings.
4. Press Show Active Settings, and then press apply reveals the active is reverse scroll is disabled.
Comment 1 ImreL 2018-06-30 20:55:45 UTC
This happens to me too

seems like mouse and touchpad settings are in conflict:

when i run `kcminit mouse` it turns natural scrolling off
`kcminit kcm_touchpad` turns it on

since kcm_touchpad settings are applied before, the settings will be overwritten.

I want to have different settings for mouse and touchpad
Comment 2 Rajeesh K V 2018-07-04 04:44:59 UTC
*** Bug 396146 has been marked as a duplicate of this bug. ***
Comment 3 Matej Mrenica 2018-07-13 06:15:34 UTC
I didnt notice reverse scrolling being disabled, but I experience touchpad sensitivity being changed to very low.
Comment 4 Michael D 2018-07-13 17:20:04 UTC
Mine don't reset after resuming, only after disabling the touchpad or after connecting (and disconnecting?) a mouse (possibly via Bluetooth). Only happens in an X session, not Wayland. Manjaro testing.
Comment 5 Stephan Hochdörfer 2018-07-21 07:41:53 UTC
I experienced the same problem(?) in regard to touchpad sensitivity - I wasn't able to right click on the touchpad after suspending the laptop. Just checked it with the latest update (18.04.3) and it seems the problem is gone for me for now.
Comment 6 glenmore 2018-08-13 22:03:23 UTC
I noticed that if I leave the touchpad settings page open,scrolling doesn't reverse after resume.  Hope this helps isolate the issue/fix
Comment 7 Charlie 2018-08-22 11:53:38 UTC
I'm experiencing this bug too - it seems that the mouse settings are overriding the touchpad settings after a suspend, as ImreL has discovered.

If I untick "Invert scroll direction" in mouse settings, then suddenly the touchpad follows suit after a reboot and the "active settings do not match saved settings" message appears in the touchpad settings. The same goes for changes in the mouse acceleration; this appears to override the touchpad acceleration.

I make do by just keeping the settings the same, but ideally it should be otherwise. I'm on manjaro KDE, using libinput on X.
Comment 8 Adrian 2018-09-08 16:18:47 UTC
Similar situation in up-to-date KDE in Kubuntu 18.04.
I have "Mouse click emulation" option enabled so:
- tap one finger = left mouse button
- tap two fingers = right mouse button
- two fingers slide = scroll
Unfortunately after back from suspend only "tap one finger" works.
Workaround of this problem is:
"sudo modprobe -r psmouse" before suspend and
"sudo modprobe psmouse" after resume from suspend
Script for this in here:
https://ubuntuforums.org/showthread.php?t=2182922&page=2
Comment 9 Nate Graham 2018-09-10 03:15:27 UTC
(In reply to Adrian from comment #8)
> Similar situation in up-to-date KDE in Kubuntu 18.04.
> I have "Mouse click emulation" option enabled so:
> - tap one finger = left mouse button
> - tap two fingers = right mouse button
> - two fingers slide = scroll
> Unfortunately after back from suspend only "tap one finger" works.
> Workaround of this problem is:
> "sudo modprobe -r psmouse" before suspend and
> "sudo modprobe psmouse" after resume from suspend
> Script for this in here:
> https://ubuntuforums.org/showthread.php?t=2182922&page=2

That's unrelated; this bug report is about the new Libinput touchpad settings page in Plasma 5.13, not the old one from Plasma 5.12 that you're referring to.
Comment 10 Roman Gilg 2018-09-12 17:29:36 UTC
Git commit a4c724173b5c6a59331587f2e5db746dffbabdc6 by Roman Gilg.
Committed on 12/09/2018 at 17:29.
Pushed by romangilg into branch 'master'.

[Mouse KCM] Avoid changes to touchpads in libinput backend

Summary:
Similar to evdev backend we need to ignore touchpad devices explicitly in the
libinput backend because these are also pointer devices.

XInput2 can do this in theory via input classes, but my touchpad did not set
the class correctly. So just switch to using XInput like in the evdev backend
to query all pointer devices and then use the XI_TOUCHPAD atom to filter out
touchpads.
Related: bug 395401, bug 396269

Test Plan: Manually

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: acrouthamel, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15256

M  +20   -12   kcms/mouse/backends/x11/x11_libinput_dummydevice.cpp

https://commits.kde.org/plasma-desktop/a4c724173b5c6a59331587f2e5db746dffbabdc6
Comment 11 Nate Graham 2018-10-12 22:56:37 UTC
*** Bug 399729 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2018-10-20 21:37:37 UTC
*** Bug 400069 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2018-12-09 17:08:38 UTC
*** Bug 370202 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2018-12-09 17:08:58 UTC
*** Bug 342929 has been marked as a duplicate of this bug. ***
Comment 15 Julius B. 2018-12-09 18:59:23 UTC
*** Bug 398999 has been marked as a duplicate of this bug. ***
Comment 16 Rich 2019-06-20 13:53:56 UTC
(In reply to Adrian from comment #8)
> Similar situation in up-to-date KDE in Kubuntu 18.04.
> I have "Mouse click emulation" option enabled so:
> - tap one finger = left mouse button
> - tap two fingers = right mouse button
> - two fingers slide = scroll
> Unfortunately after back from suspend only "tap one finger" works.
> Workaround of this problem is:
> "sudo modprobe -r psmouse" before suspend and
> "sudo modprobe psmouse" after resume from suspend
> Script for this in here:
> https://ubuntuforums.org/showthread.php?t=2182922&page=2

Same issue for me. I fixed by running modprobe as you mention.

Create a file called whatever you want (trackpad in this case)

```
cat /usr/lib/systemd/system-sleep/trackpad 
#!bin/bash
if [ "${1}" == "pre" ]; then
    modprobe -r psmouse ;;
elif [ "${1}" == "post" ]; then
    modprobe psmouse ;;
fi
```

Then make it executable:
```
chmod +x /usr/lib/systemd/system-sleep/trackpad
```

Many thanks for your help!!!
Comment 17 Nate Graham 2019-06-23 17:40:39 UTC
This was fixed ages ago. If you're using a distro that ships old software, bug them to backport the commit that fixed the issue, which is visible in the "Latest Commit" field near the top-right.