Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
libinput: ensure that we only apply touchpad options to touchpads #90635
Motivation for this change
It seems that the default
Unfortunately, when Xorg loads the generated configuration file, it will first attempt to apply the
Then, my own
This PR adds a condition to the
pwetzel left a comment
Tested with libinput enabled on:
Did the right thing in all cases, and the "Failed to set scroll to twofinger" errors are now gone. Nice!
This breaks the application of the libinput configuration for touchpads (at least for me). It doesn't break libinput since that is handled separately by another configuration file I believe. So the touchpad would still work but any custom options wouldn't be applied (basically rendering the module useless).
I believe this was a configuration error on the part of the user. The
Anyway, the proper way of identifying only touchpads would probably be
Source: My libinput settings weren't applied and thus broke my tap-to-click, button layout, etc.
I screwed up. I thought I saw good news in the X log and scrolling worked and I didn't push it any further. Sorry. I confirm that this breaks touchpad function like tap-to-click.
The approach in the PR seems like it should have worked. MatchTag is described here, and my laptop has a log entry like this:
I just tried lowercase
@eadwu, I think you're suggesting there's a better way to go about solving this problem? It seems like good UX to have the default libinput snippet (very much targeted at trackpads) only apply to trackpads. This was obviously the wrong way to do it, but an implementation with
If it only applies to trackpads then it wouldn't be generic enough for libinput (and wouldn't be changeable), which covers all input devices. This may have also introduced some unintended breakages since the original mapped to all input devices and it doesn't seem like Xorg just crashes from an invalid configuration from libinput.
But yeah, I think this should've just been settled through an override, which should be possible (I'm pretty sure) with a config file like
For the particular issue of the custom
It's not clear to me whether the default libinput options are intended to be for general libinput or for trackpads. The configuration structure would seem to suggest it's for everything, but the actual InputClass section seems to be trackpad-specific. This means that the configuration at the moment will always produce an error if you try to configure something other than a trackpad to use libinput. Unless we have a clear goal for this config to be trackpad-specific or not, it's hard to say what should go here. Using ordering to override the InputClass might make sense (but in that case shouldn't custom InputClasses always go after the generic stuff?) but it's still not good practice to set nonsensical options for non-trackpads — if this section is meant to be generic, we should probably remove all trackpad-specific stuff from it and add a new trackpad-specific InputClass with its own config options.