Bug 415364 - Implement feature to disable touchpad when mouse is plugged in when using Libinput driver
Summary: Implement feature to disable touchpad when mouse is plugged in when using Lib...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_touchpad (show other bugs)
Version: 5.27.7
Platform: Debian stable Linux
: HI wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 221084 419627 425467 429882 444843 449671 465991 473566 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-19 17:26 UTC by Alexander
Modified: 2023-12-21 04:39 UTC (History)
26 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
settings screenshot (138.42 KB, image/png)
2019-12-19 17:26 UTC, Alexander
Details
Size of touchpad (341.34 KB, image/jpeg)
2023-08-15 10:02 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2019-12-19 17:26:36 UTC
Created attachment 124589 [details]
settings screenshot

SUMMARY
You have a WIKI page about touchpad settings:
https://userbase.kde.org/System_Settings/Touchpad
and I saw exactly this interface for a long time on my Acer C720. 
Moreover, I used your settings to infer sane values and their correspondence to synclient params for other distros which lacked of such a rich GUI for touchpad.

Now, on the latest Neon User Edition I see only controls on a screenshot.
Where are controls to adjust sensitivity, acceleration, hysteresis etc?
Comment 1 Nate Graham 2020-01-01 23:12:24 UTC
This is the interface shown when you're using the Libinput drivers, as Neon is. Any features you're missing are because Libinput doesn't support them. :/ The other interface is shown when using the older Synaptics drivers. If you want to see that interface (and regain the missing features), then you'll need to replace Libinput with Synaptics.
Comment 2 Neil Rickert 2020-02-26 18:25:54 UTC
This still seems a bug to me.

The setting that I am missing is "Disable touchpad when a mouse is plugged in".  In all honesty, that setting is why I started using KDE.

And that worked for me with openSUSE Leap 15.0 and Leap 15.1 (both using Plasma 5.12.8 and the Libinput drivers).  But the setting is no longer available with openSUSE Leap 15.2 Beta (using Plasma 5.18.0).  However, it still works if I copy ".config/touchpadrc" from an earlier system.

I really hope that this setting isn't going away.  And I hope we can get back a way of configuring it via system settings.

Here's a strange thing.  On one laptop, I see the old touchpad settings screen.  That laptop was originally configured with openSUSE Leap 15.0, then upgraded.  However, if I create a new user on that same computer, then I get the new touchpad settings screen with some settings no longer visible.
Comment 3 Nate Graham 2020-02-26 19:45:24 UTC
Oh, if it worked with Libinput in the past then it's definitely something KDE can control. Sorry for the confusion!

However the hysteresis and sensitivity settings are driver-specific and are not supported by Libinut. :(
Comment 4 Paul 2020-04-04 14:08:36 UTC
*** Bug 419627 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Silva 2020-08-17 23:18:26 UTC
*** Bug 425467 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2021-06-16 13:09:45 UTC
*** Bug 429882 has been marked as a duplicate of this bug. ***
Comment 7 Fushan Wen 2021-11-03 11:06:12 UTC
*** Bug 221084 has been marked as a duplicate of this bug. ***
Comment 8 Fushan Wen 2021-11-03 11:09:04 UTC
*** Bug 444843 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2022-02-07 15:34:48 UTC
*** Bug 449671 has been marked as a duplicate of this bug. ***
Comment 10 Evert Vorster 2022-04-17 08:38:29 UTC
Definitely confirmed. 

Using a laptop as my main workstation, and accidental inputs are a great annoyance. 
Disabling the touchpad when a mouse is plugged in is a killer feature, and now it seems to have been replaced with a 
"disable touchpad when typing" <- This feature does not work as intended, and now my touchpad is again a source of unintended inputs.
 
Please, give us the option of completely disabling the touchpad when a mouse is plugged in, like it used to do. It was working exactly as intended, and a great feature of KDE. I can see the use case when the only pointer you have is the touchpad, and I will keep it enabled. However, when a mouse is plugged in, there is no reason to have the touchpad active at all. 

So, why not just disable the touchpad completely? There are times when the computer is shut down with a mouse connected, and the next time it is powered up there is no mouse, being a mobile computing station and all. Try using KDE with no mouse whatsover, it's not much fun. So, when there is no mouse, we want the touchpad.
Comment 11 Richard Ullger 2022-04-17 10:10:12 UTC
You can reinstate the old behaviour by adding

[autodisable]
DisableWhenMousePluggedIn=true

to ~/.config/touchpadrc

At least, this still works for me and I get a notification that the touchpad has been disabled because a mouse was plugged in when I log into plasma.
Comment 12 Evert Vorster 2022-04-17 11:34:40 UTC
That line is still in my config file, but it does not seem to have any effect. To me it looks like this option has been completely removed.

Running KDE on Arch Linux, and the machine is never more than a week out of date.
Comment 13 Evert Vorster 2022-05-21 22:09:01 UTC
Here is some interesting new information that might cast some light on this bug:
Under X11, I have the "Disable touchpad when mouse is plugged in" toggle. 
Under Wayland,  the "Disable touchpad when mouse is plugged in" toggle is missing.

This means with exactly the same setup disabling the mouse works under X11, but not under Wayland. 
I am absolutely stunned that things are implemented differently between X11 and Wayland, and that this functionality is missing in Wayland.

Wayland promises to be better, but from what I see there are some great opportunities for improvement still before it becomes generally acceptable for use, this bug being one case in point.
Comment 14 Patrick Silva 2023-02-18 21:38:09 UTC
*** Bug 465991 has been marked as a duplicate of this bug. ***
Comment 15 Natalie Clarius 2023-04-27 16:12:12 UTC
(In reply to Evert Vorster from comment #13)
> Here is some interesting new information that might cast some light on this
> bug:
> Under X11, I have the "Disable touchpad when mouse is plugged in" toggle. 
> Under Wayland,  the "Disable touchpad when mouse is plugged in" toggle is
> missing.
> 
> This means with exactly the same setup disabling the mouse works under X11, but not under Wayland. 

Are you sure it is exactly the same setup, or are you using the synaptics driver on X11? If you are not sure, run the following commands:

> xinput list

and note the id shown for the touchpad device,

then

> xinput list-props 12

where in place of "12" you insert the above id.  

What does it say?

As for me, I can't reproduce seeing that option when using the libinput driver on X11, only with synaptics, which has an altogether different touchpad configuration.
Comment 16 Nate Graham 2023-04-27 18:22:34 UTC
I suspect Evert is using the Synaptics-specific touchpad settings page on X11 (which shows this setting) and the Libinput-specific touchpad settings page on Wayland (which does not). This is how openSUSE distros ship things, but it's also possible to configure them that way yourself.
Comment 17 Evert Vorster 2023-04-27 20:33:41 UTC
Indeed, I was using the Synaptics drivers for X11. 
It actually supplies a feature that I want, namely when I have a mouse available, I do not want to have the touchpad active at all. 

If I just use libinput for both X11 and Wayland, the "Disable touchpad when mouse is available" option is missing from both X11 and Wayland.

Just what is preventing libinput from supporting this setting?
Comment 18 mira.jary 2023-07-02 19:00:56 UTC
Any progress on this matter?

It does seem like libinput does support disabling devices on mouse plug-in: https://wayland.freedesktop.org/libinput/doc/latest/configuration.html#send-events-mode

I've wanted to switch to Wayland for months now, but the fact that this minor, but important feature is still missing is an absolute deal-breaker for me.
Comment 19 Evert Vorster 2023-08-15 10:02:33 UTC
Created attachment 160974 [details]
Size of touchpad

This being unable to disable the touchpad when a mouse is plugged in is still a great annoyance. 

Firstly, the "Disable touchpad when typing" does not work as intended. While typing the touchpad is still active enough to move the cursor and click on things. Right now I have it completely disabled, but this is not ideal, as my mouse is a bluetooth one, and if it fails to connect I am without a mouse until I can find a corded one, so the proper behavior would be for the touchpad to be disabled while there is a mouse in the system!

I have attached a picture of the size of my laptop's touch pad. It is enormous, and quite difficult to not touch by accident while typing. 

How difficult can it be to disable the touch pad when there is a mouse detected on the system?
Comment 20 mira.jary 2023-08-15 11:51:16 UTC
I absolutelly agree - I have a new laptop with touchpad of similar size, and thus I more often accidentally touch it. I suppose there is a main focus on getting KDE6 out, but I don't think this is a huge time-stealer to implement.

Any kind of response from the devs would be welcome.
Comment 21 Volodymyr 2023-08-15 12:48:48 UTC
(In reply to mira.jary from comment #20)
> I absolutelly agree - I have a new laptop with touchpad of similar size, and
> thus I more often accidentally touch it. I suppose there is a main focus on
> getting KDE6 out, but I don't think this is a huge time-stealer to implement.
> 
> Any kind of response from the devs would be welcome.

I can help, I will write a script - touchpad control - write to my mail in if you are registered. I also faced this problem and wrote myself a script.
Comment 22 Jeffrey Walton 2023-08-20 16:53:07 UTC
(In reply to Neil Rickert from comment #2)
> This still seems a bug to me.
> 
> The setting that I am missing is "Disable touchpad when a mouse is plugged
> in".  In all honesty, that setting is why I started using KDE.
> 
> And that worked for me with openSUSE Leap 15.0 and Leap 15.1 (both using
> Plasma 5.12.8 and the Libinput drivers).  But the setting is no longer
> available with openSUSE Leap 15.2 Beta (using Plasma 5.18.0).  However, it
> still works if I copy ".config/touchpadrc" from an earlier system.
> 
> I really hope that this setting isn't going away.  And I hope we can get
> back a way of configuring it via system settings.
> 
> Here's a strange thing.  On one laptop, I see the old touchpad settings
> screen.  That laptop was originally configured with openSUSE Leap 15.0, then
> upgraded.  However, if I create a new user on that same computer, then I get
> the new touchpad settings screen with some settings no longer visible.

$ cat /etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
        Identifier "touchpad"
        Driver "libinput"
        MatchIsTouchpad "on"
        Option "SendEventsMode" "disabled-on-external-mouse"
EndSection

Also see https://gitlab.freedesktop.org/libinput/libinput/-/issues/924 .
Comment 23 Nicolas Fella 2023-08-20 17:37:18 UTC
*** Bug 473566 has been marked as a duplicate of this bug. ***
Comment 24 Esras 2023-08-22 18:41:08 UTC
Happy to open a separate bug for this...

Relatedly, there seems to be no way to disable a keyboard device in the settings panel. In the past, xinput could be used to disable a device, but there seems to be no libinput equivalent. I found a discussion disabling it by grabbing an exclusive lock on the device, but this seems hacky (https://unix.stackexchange.com/questions/388733/disable-device-with-libinput/388763#388763).

---

For additional context, for people searching...

I found this bug via a long chain of searching related to wanting to have tablet mode working on my laptop (an ASUS Zenbook U5401RA), which has an AMD processor. In particular, tablet mode disables the keyboard and touchpad, and that's desirable as the screen flips _over_, not around, so the keyboard and touchpad are exposed when it's in a tablet configuration.

This appears to be because the "AMD Sensor Fusion Hub", which handles the events that would trigger tablet mode, and this particular laptop model's hardware is not supported. I haven't quite found the right place to report that issue upstream (recommendations welcome). I also could not find a way to manually send the Tablet Mode event.

As a workaround, I started looking into disabling the touchpad and keyboard manually. Since the switch to libinput and Wayland, there seems to be no user-facing mechanism for disabling a device at that layer of the stack, and it must be configured through the settings panel implemented in a particular compositor. The KDE panel exposes mouse enablement, but not keyboard (at least not as I found).

Thus, I found this bug, via a related libinput issue (https://gitlab.freedesktop.org/libinput/libinput/-/issues/924).

Additionally, what seems to be exposed as "Tablet Mode" to the user in the system settings panel has been (correctly!) renamed "Touch Mode," which simply changes the size of elements of the workspace, but does not disable any devices.

---

I know this likely isn't the right location for all of this, but I didn't know where to put it. Again, recommendations welcome for where I should try documenting this information.