Mouse sensitivity/acceleration too fast on Wayland

Hi,

Is it possible to get mouse sensitivity, acceleration and movement same as is in Windows? Or at least close to it?

Mouse feels super unnatural and can’t get used to it even after half year. in mouse settings I have sensitivity set to -1, mouse DPI to lowest possible (with HW button on mouse) but cursor still moves fast. Acceleration is also not natural, when moving mouse slowly, cursor is still pretty fast.

I read millions of articles about libinput, that it is possible to set custom acceleration profile, but nowhere found how.

Fedora 40 + Wayland + KDE 6.2.1/6.7.0

I also feel like my sensitivity is off somehow. I have the slider set to 0, acceleration set to none, and the same DPI configured on my mouse as in Windows. But it still feels off or like there is some kind of acceleration.

Operating System: Arch Linux
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7D53
System Version: 1.0

From what I can tell, despite having Mouse acceleration set to “none” in KDE settings app, my mouse still has the “adaptive” acceleration profile in libinput. I’m guessing this is what I am feeling.

sudo libinput list-devices

...

Device:           Logitech G Pro 
Kernel:           /dev/input/event8
Group:            3
Seat:             seat0, default
Capabilities:     keyboard pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         0.0

From what I have read, the compositor is responsible for changing libinput configurations and there is no streamlined way to modify it manually - it is different for each compositor. So we would have to determine if there is a way to manually fix this in KDE with Kwin or wait for a fix.

I’ve found how this is set in KDE through this thread. As it seems, the * next to adaptive seen through

libinput list-devices

is only indicating the default profile, not the current profile. I’m not 100% sure on this, but that is my understanding based on the information below.

Using D-Spy, I navigated to the bus name org.kde.KWin and then expanded the object /org/kde/KWin/InputDevice/event8 which corresponds to my mouse as seen through libinput above. I then expanded org.kde.KWin.InputDevice and found the mouse config including acceleration profile settings. I noted that the read only settings for ‘defaultPointerAccelerationProfileAdaptive’ and ‘defaultPointerAccelerationProfileFlat’ are set to ‘true’ and ‘false’ respectively. However, the writable settings ‘pointerAccelerationProfileAdaptive’ and ‘pointerAccelerationProfileFlat’ are set to ‘false’ and ‘true’ respectively. These settings reverse as one would expect when setting pointer acceleration to “Standard” in KDE settings.

So that leaves me not knowing exactly why KDE with Wayland feels off even with acceleration disabled, as compared to the same machine on Windows.

EDIT: I think I’ve figured out why it felt so odd. In Windows, I had all 3 monitors set to 100% scale. In KDE on Linux, however, I had some set to higher scaling than others. From what I have read elsewhere, and from my own testing, monitor scaling acts as a sensitivity multiplier in both Windows and KDE, so if you want a similar pointer feel both between KDE/Windows and between multiple screens within KDE (or Windows for that matter), they need to have the same scaling.

Yes. If you want to have a slower mouse speed with different/higher scaling, you just have to reduce the mouse speed accordingly.

1 Like

I forgot about this topic, but why it was solved as solution when it helped somebody else but not the requestor?

I have 100% scaling in Windows and in KDE.
When I set lowest sensitivity possible value in Windows, cursor barely moves. If I set it in KDE, the cursor is still fast that it is uncomfortable to use it as I mentioned in original post.

Still, there is no informations on internet, how to set custom acceleration profile in libinput.

Found something about $ libinput set-accel-profile however I’m getting libinput: set-accel-profile is not installed

No idea what it is, what package to install, there is absolutely no info about set-accel-profile “commad”.

Hi -

Just to double-check - when you mentioned that you’ve tried setting sensitivity to the lowest possible value in Plasma as well, are you referring to this slider?

When I set lowest sensitivity possible value in Windows, cursor barely moves. If I set it in KDE, the cursor is still fast that it is uncomfortable to use it as I mentioned in original post.

There is 3 options for mouse sensitivity in linux:

  • Standard acceleration profile. This is like in windows with “enhance pointer precision”. But acceleration curve is different and “Pointer speed” basically don’t work as expected by user and this cannot be fixed in kde, this is libinput decision. This is default profile.
  • None acceleration profile. This is like in windows without “enhance pointer precision”. This profile works as expected, but values in kde settings is hard to understand for average user (0,00 is x1 or 100% speed, -0.75 is x1/4 or 25%, +0.75 is x1.75 or 175%). I tried to enhance usability of mouse settings in kde, but don’t have time for constant testing and merging new changes (plasma-desktop merge request 1955, can’t post links). I hope someday someone implement similar changes for mouse settings.
  • Custom profile. You cant select this profile and tweak in kde settings (i see this option only in hyprland). I tried custom profiles with xinput on X11, but don’t think this is possible in wayland kde.

tl;dr: There is only working option for mouse settings in kde right now - “None” acceleration profile. “Custom” profile maybe a good band-aid solution to not functional “Standard” libinput profile, but right now not implemented in kde: (bug 46486, can’t post links). In X11 you can set it with xinput:

xinput set-prop <device-id> "libinput Accel Profile Enabled" 0, 0, 1
xinput set-prop <device-id> "libinput Accel Custom Motion Points" 0.0, 1.0
xinput set-prop <device-id> "libinput Accel Custom Motion Step" 1.0

With “Standard” profile and “Pointer speed” at most left position cursor speed is like with “None” profile and central position (0,00). This behavior is unexpected by user and have too high speed with typical mouse from store.

This is how default acceleration profile work in libinput and one of main pain points of desktop linux. In windows you can just lower pointer speed and get expected effect. In linux this works only with “None” profile, with “Standard” this slider affect acceleration, not “speed”. This somewhat works for touchpads, but for mouse it just doesn’t do what user want from this slider.

Not a new or kde bug, this is how acceleration work in libinput from the start.

Yes, I mean this slider.
It is hard for me to explain it without showing it in reality.

In Windows you have checkbox ‘Enhance pointer acceleration’. If checked, mouse acceleration is enabled and cursor follows exactly the physical movement of mouse. If you move slow, cursor is slow. If moving fast, cursor is fast. If unchecked, acceleration is disabled and cursors moves more-less at the same speed, no matter how fast you move mouse on pad.

In Linux general, if I set None or Standard on your picture, cursor doesn’t follow physical movement of mouse. I think with Standard it is very similar to Windows feeling. However even at value -1 cursor moves pretty fast, so I need to care more to hit small buttons than on Windows. Even while doing slow movement, it feels like it cursor 1.5x the real movement.

Mouse is Asus Rog Gladius II Origin with ridiculous 12 000dpi, but thats unusable and it has switch for lower DPI.

The way I’m reading it, due to limitations regarding libinput from the onset, the options for ‘Standard acceleration profile’ simply don’t work and cannot be fixed.

Yet another scenario where Wayland as a protocol was improperly implemented right from the onset, and another reason why Wayland still involves far too many compromises for anyone to state that X11 is anywhere near ready to be depreciated at this point in time considering the use cases of many.

I’ll gladly sacrifice independent scaling and refresh rates between mismatched monitors just to have a usable desktop with no problems, and windows that remember their geometry and location.

The way I’m reading it, due to limitations regarding libinput from the onset, the options for ‘Standard acceleration profile’ simply don’t work and cannot be fixed.

This is just a gui usability problem and can be fixed with custom profiles instead of ‘Standard’ assigned to slider positions in gui. But would be much better if ‘Standard’ in libinput have predictable behavior for user in first place.

How can I apply custom profile/acceleration curve? I can’t find anywhere any example. Even libinput page says about custom profiles but not about how to create/apply them.

There is an open feature request for an interface to create custom acceleration profiles: 464868 – Create UI to generate and use a custom Libinput acceleration profile - this looks like something that will just require someone with the time, ability and interest to jump in and figure out how to implement :slight_smile:

The following post was helpful to me for context on why libinput itself doesn’t describe a configuration interface: How to access libinput properties in Wayland for an external touchpad? - #2 by jpetso

Right now you can’t set custom acceleration profiles in kde wayland. There is no gui or cli for that and even in kwin dbus this feature of libinput not exposed.
You can experiment with custom profiles in X session with xinput or in hyprland.
With xinput:

  1. Switch to X11 and set profile of mouse to “None” with low sensitivity. This way would be easier to find correct device.
  2. In output of xinput list in core pointer section find id of the mouse.
  3. After that run xinput set-prop MOUSE_ID "libinput Accel Profile Enabled" 0, 0, 1. This will set mouse acceleration type to custom. If mouse id were correct sensitivity should be high again.
  4. xinput set-prop MOUSE_ID "libinput Accel Custom Motion Points" 0.0, 1.0 - this command set curve points.
  5. xinput set-prop MOUSE_ID "libinput Accel Custom Motion Step" 8 - this command set step between points.

Examples:

  1. linear 1:1 speed
curve: 0.0, 1.0
step: 1

Sensitivity on first and only interval (0.0, 1.0) = 1.0/1 = 1

  1. linear 1/8 speed
curve: 0.0, 1.0
step 8

or

curve: 0.0, 10.0
step 80

Sensitivity on first and only interval (0.0, 10.0) = 10.0/80 = 1/8

  1. curve with acceleration for high dpi (3200) mouse
curve: 0.0, 0.5, 1.2, 2.1, 3.2
step: 4

Sensitivity on first interval (0.0, 0.5) = 0.5/4 = 1/8 = 0.125

Sensitivity on second interval (0.5 - 1.2) between 0.125 and 1.2/(4*2) [0.15]

Sensitivity on third interval (1.2 - 2.1) between 0.15 and 2.1/(4*3) [0.175]

Sensitivity on last interval (2.1 - 3.2) between 0.175 and 3.2/(4*4) [0.2]

Sensitivity after that between 0.2 and (3.2-2.1)/4 [0.275].

  1. same curve for low dpi (400) mouse
curve: 0.0, 0.5, 1.2, 2.1, 3.2
step: 0.5

curve - Y position on graph of each points. (pointer speed).
step - increment of each X position of that points. (device speed).

With higher step values you need more units of speed per ms to jump from one curve interval (0.0 - 0.5) to another (0.5 - 1.2). So with 400 dpi mouse and step 4 you will be stuck in first interval and get something like 1/8 of linear sensitivity.