Bug 504496

Summary: libinput stuck in adaptive, in wayland
Product: [Plasma] kwin Reporter: dougg0k
Component: libinputAssignee: KWin default assignee <kwin-bugs-null>
Status: CLOSED NOT A BUG    
Severity: normal CC: nate, xaver.hugl
Priority: NOR Keywords: wayland-only
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dougg0k 2025-05-18 22:58:16 UTC
SUMMARY
For whatever reason, libinput seem stuck in wayland, in no way to set to flat 1:1. That results in less accurate mouse movement in wayland.

You can compare with X11, very noticeable, at least once you have disabled any sort of mouse accel in X11.

You can find the info with, libinput list-devices
Will probably be, Accel profiles:          flat *adaptive custom

ps: Not sure if the product/component is correct for this issue.

STEPS TO REPRODUCE
1. Test mouse movement in both X11 and Wayland with mouse accel disabled in X11.
2. There are plenty of options in X11 to disable mouse accel, but in Wayland, if one were able to set it to flat would possibly be enough.

OBSERVED RESULT
Less accurate mouse movement in wayland.


EXPECTED RESULT
To be able to disable any and all sort of mouse acceleration.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux based
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
https://discuss.kde.org/t/mouse-sensitivity-acceleration-too-fast-on-wayland/23890/15
Comment 1 dougg0k 2025-05-19 01:12:13 UTC
Just found https://bugs.kde.org/show_bug.cgi?id=464868
Comment 2 Nate Graham 2025-05-19 16:28:36 UTC
The "Flat" option is designed to remove all acceleration. There are two options here:
1. The option doesn't work
2. The option works but doesn't produce the result you're hoping for

If it's #1, you'll see literally no change when you uncheck "Pointer acceleration" on the mouse page and then click Apply. Let us know if that's what's happening.

If it's #2, then when you uncheck "Pointer acceleration" on the mouse page and then click Apply, the feel will change, but not in exactly the way you're hoping for. If this is what's happening, then it's a bug in the Libinput library itself.

Let us know, thanks!
Comment 3 dougg0k 2025-05-19 16:34:54 UTC
In wayland, it's not possible to change to Flat, that is the problem. At least at this point.

Even if None Acceleration are selected in KDE, libinput remains in adaptive mode. That is part of the issue.

Mouse feel is noticeable less accurate / precise in wayland, possibly due to it, if not for more / other reasons. Compared to X11.
Comment 4 Nate Graham 2025-05-19 20:02:57 UTC
> Even if None Acceleration are selected in KDE, libinput remains in adaptive mode. That is part of the issue.
Ok, so you're able to use the setting, but it doesn't seem to work and change what you want.

Please report this to the Libinput folks at https://gitlab.freedesktop.org/libinput/libinput/-/issues/. THanks!
Comment 5 dougg0k 2025-05-19 20:34:07 UTC
In KDE, it is possible to alter in X11 (set to flat), but not Wayland and from what I read, the issue are DE related.

Check the answer here https://discuss.kde.org/t/how-to-access-libinput-properties-in-wayland-for-an-external-touchpad/11730/2

Quote:
On Wayland, the compositor has exclusive access to the libinput API, so any configuration needs to be made through KWin.`
Comment 6 Nate Graham 2025-05-19 20:36:03 UTC
It is possible; you already said you're using the setting that sets it to Flat.

This is working for me, which means it's not broken in a general sense, but rather there's something else wrong here. Which is why I'm suspecting Libinput is not applying the Flat acceleration profile to your hardware as you expect.
Comment 7 dougg0k 2025-05-19 20:48:54 UTC
I am using the setting that set to flat, in X11.

In wayland, when KDE setting Pointer Acceleration -> None, does not set libinput to flat, it stay in adaptive, that's the bug I said.

If I try set the profile in wayland with `libinput set-accel-profile`, results in `libinput: set-accel-profile is not installed`.

There are plenty of threads of this problems in KDE discuss alone, which has not been fixed.

---

You say it's working for you, does it mean you see the libinput flat mode active in wayland?
Comment 8 Nate Graham 2025-05-20 18:50:44 UTC
Yes, on Wayland, when I uncheck the "Enable pointer acceleration" option, there is an immediate and noticeable effect on the mouse pointer's tracking. So it's working for me.

Another potential option: could you have the wrong mouse selected in the device dropdown menu at the top of the page? That would also expect why disabling acceleration on Wayland isn't having the effect you expect.
Comment 9 dougg0k 2025-05-20 19:05:13 UTC
Sure, there could be other factors involved in this.

But could you check with the command 

libinput list-devices

That should show your device and whether it's in flat, adaptive or another mode.
Comment 10 Nate Graham 2025-05-21 14:39:52 UTC
Well this is interesting. When I disable pointer acceleration in the Mouse KCM, the feel of the mouse *clearly* changes. However I can indeed see that libinput thinks it's in adaptive mode:

sudo libinput list-devices | grep -A 23 "Logitech USB Optical Mouse" | grep "Accel profiles"
Accel profiles:          flat *adaptive custom

So now I'm a bit confused about what's going on here! Re-opening.
Comment 11 dougg0k 2025-05-21 14:48:40 UTC
Yeah. Thanks.
Comment 12 Zamundaaa 2025-06-02 15:28:02 UTC
libinput is a library, not a system service. The command line utilities do not apply the settings of the compositor.
Comment 13 dougg0k 2025-06-02 15:41:18 UTC
Why does it stay in that mode even with the supposely setting of disabled mouse accel in kde is done? 

It should be in flat mode.

https://discuss.kde.org/t/how-to-access-libinput-properties-in-wayland-for-an-external-touchpad/11730
Comment 14 Zamundaaa 2025-06-02 16:05:10 UTC
Again, libinput command line tools do not know what settings the compositor is using. The text it prints is about what settings other libinput command line tools use for interpreting input events.