[KDE] After connecting mouse, touchpad change its settings.

Hi, I have fresh install of Tumbleweed KDE. I usually use touchpad with natural scrolling. But when I plug in my mouse (one of two, gaming or microsoft optical) to play some games I discovered that touchpad natural scrolling is reverted to normal scrolling. It stays until reboot, even if I unplug the mouse. When I get to settings it’s written that settings displayed are different than actual and I cannot change them. I have to uncheck, check and save settings. After this when I plug mouse it’s happening again!

System: Host: zenbook Kernel: 4.17.1-1-default x86_64 bits: 64 compiler: gcc v: 8.1.1
Desktop: KDE Plasma 5.13.0 tk: Qt 5.11.0 Distro: openSUSE Tumbleweed 20180618
Machine: Type: Laptop System: ASUSTeK product: UX410UAK v: 1.0 serial: <root required>
Mobo: ASUSTeK model: UX410UAK v: 1.0 serial: <root required> UEFI: American Megatrends
v: UX410UAK.308 date: 11/08/2017
Battery: ID-1: BAT0 charge: 38.8 Wh condition: 39.2/48.0 Wh (82%) model: ASUSTeK ASUS Battery
status: Charging
CPU: Topology: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP arch: Kaby Lake rev: 9
L2 cache: 4096 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 23232
Speed: 800 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 800 2: 800 3: 801 4: 804
Graphics: Card-1: Intel HD Graphics 620 driver: i915 v: kernel bus ID: 00:02.0
Display: x11 server: X.org 1.19.6 driver: modesetting unloaded: fbdev,intel,vesa
resolution: <xdpyinfo missing>
OpenGL: renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2) v: 4.5 Mesa 18.1.1
direct render: Yes
Audio: Card-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel v: kernel bus ID: 00:1f.3
Sound Server: ALSA v: k4.17.1-1-default
Network: Card-1: Intel Wireless 8260 driver: iwlwifi v: kernel bus ID: 02:00.0
IF: wlp2s0 state: up mac: f4:8c:50:57:e4:e6
Drives: HDD Total Size: 238.47 GiB used: 127.54 GiB (53.5%)
ID-1: /dev/sda vendor: SanDisk model: SD8SNAT256G1002 size: 238.47 GiB
Partition: ID-1: / size: 40.00 GiB used: 8.61 GiB (21.5%) fs: btrfs dev: /dev/sda2
ID-2: /home size: 190.21 GiB used: 118.93 GiB (62.5%) fs: xfs dev: /dev/sda3
ID-3: /opt size: 40.00 GiB used: 8.61 GiB (21.5%) fs: btrfs dev: /dev/sda2
ID-4: /tmp size: 40.00 GiB used: 8.61 GiB (21.5%) fs: btrfs dev: /dev/sda2
ID-5: /var size: 40.00 GiB used: 8.61 GiB (21.5%) fs: btrfs dev: /dev/sda2
ID-6: swap-1 size: 7.68 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda4
Sensors: System Temperatures: cpu: 44.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info: Processes: 237 Uptime: 1h 15m Memory: 7.68 GiB used: 1.52 GiB (19.7%) Init: systemd runlevel: 5
Compilers: gcc: N/A Shell: zsh v: 5.5.1 inxi: 3.0.10

The system info you posted is not relevant. The current input device settings can be reported by

sudo libinput-list-devices

You could run this before and after the mouse is attached to compare changes.

Also, perhaps watch ‘libinput-debug-events’ in a terminal window when the mouse is first attached.

sudo libinput-debug-events

In any case, the behaviour you describe reads like a bug to me and should probably be reported as such.

Both libinput commands not found.

Then you need to install ‘libinput-tools’…

zypper in libinput-tools

I’ve already installed it because I use libinput-gestures. As I mentioned before, commands not found even with libinput-tools installed.
Edit: Typo error. Should be:

libinput list-devices

and so on

Either works for me, but I’m using Leap 15 and ‘libinput-list-devices’ is a compatibility wrapper. So, yes for TW do

sudo libinput list-devices

So, this is first command:

And debug:

In debug log there is “USB Laser Game Mouse”, this is when I connect my gaming mouse, and after this I’m scrolling with touchpad.

This reports that the touchpad natural scrolling is disabled (and with USB mouse attached already). Show before and after.

Yes, it is indeed. But on this screenshot you can see KDE setting and libinput list-devices before I plug a mouse.

Did you restart KDE’s systemsettings ?

Of course. It doesn’t matter because I would have to do it each time I plug a mouse. It should work as is. It was working on leap, some time ago on TW when I had KDE 4.12 and on Manjaro.

I’ve read on /r/kde that there are few issues with touchpads and update to 13.1.1 fixes them. I hope it will fix mine. But it’s not annoying.

Now that I’ve had time to check KDE’s mouse and touchpad settings against libinput parameters (when natural scrolling is applied), ‘libinput list-devices’ doesn’t seem to reflect reality. I even invoked

xinput --set-prop SynPS/2 Synaptics Touchpad"" "libinput Natural Scrolling Enabled" 1

from a terminal and then checked natural scrolling with

sudo libinput list-devices|grep Nat

and this incorrectly returned

Nat.scrolling:    disabled

However, it was working as expected, and xinput still reflects the changes as expected (for the applicable input device)

xinput list-props 11|grep Nat
libinput Natural Scrolling Enabled (285):      1

Anyway, with respect to attaching a mouse and having the natural scrolling immediately disabled on the touchpad, the best course of action is to submit a bug report.

Indeed, there are problems in Plasma 5.13.0 with applying the mouse settings on login, that will hopefully be fixed in 5.13.1 (already on the way to Tumbleweed…)

Unfortunately KDE 4.13.2 didn’t resolved my issue. Also my another bug that I commited on bugzilla was removed. I feel disappointed…