How to access libinput properties in Wayland for an external touchpad?

I’m using a Logitech T650, and have been enabling natural scrolling via xinput:

xinput set-prop "Logitech Rechargeable Touchpad T650" "libinput Natural Scrolling Enabled" 1

Having switched to Wayland with KDE 6, xinput no longer works - but I don’t know how to edit a libinput property for an external device on Wayland.

Does anyone know?

1 Like

First up, libinput by itself is only a library with intentionally no user configuration mechanism. This means you rely on whatever gives you access to libinput functionality. For X11 that’s the libinput driver, which lets you configure properties through xinput.

On Wayland, the compositor has exclusive access to the libinput API, so any configuration needs to be made through KWin.

The straightforward way to modify KWin configs would be through the Touchpad module in System Settings. It doesn’t distinguish between internal or external touchpads, only whether libinput classifies the device as “touchpad”. If you have more than one, it should show a device selection dropdown with all of your touchpads, and you can configure them individually (that’s if I’m reading the code correctly).

The programmatic way would be through D-Bus calls. KWin exposes all of its input devices on the session (user) bus, the service’s bus name being org.kde.KWin, object path org/kde/KWin/InputDevice/event<N> (one for every input device, with <N> starting at 0) and interface org.kde.KWin.InputDevice. You’d want to find your device by looking at the name property, and then set the naturalScroll property of the same event<N> D-Bus object to true. I like to use qdbus to explore this with a GUI (it can also set these properties), or busctl via CLI if it needs to go into a script.

The Touchpad settings module also just uses D-Bus internally btw. As far as I can tell, KWin will store the configuration whenever you update a property for an input device.

You can also call sudo libinput list-devices to get a quick sense of what devices are recognized by libinput (and subsequently available through KWin).

Use whatever works for you! :slight_smile:


Wow, thank you sooo much! This is everything I need!

I will admit - I didn’t realize there was a dropdown. :grimacing:

This is fabulous, though. Nothing I did in Settings every worked for the T650 in X11 (hence the xinput script, which I had to run on every startup); now I can just use Settings like a normal person! :tada:

Thank you again @jpetso ! Great community like this is one of the things that makes KDE awesome.

1 Like