Customizing Mouse Acceleration

I’d like to replicate how my mouse worked on windows using a program called Raw Accel.
Sensitivity would be fairly low when the mouse was moved at moderate speed, but would increase linearly to about 1.5x what it is normally when moved quickly.

I’ve tried messing with the threshold using xset but it doesn’t seem to be anything.

Anyone have an idea of how I can accomplish this?

Have you tried what is described in Arch wiki already?

https://wiki.archlinux.org/title/Mouse_acceleration

Yes I’ve tried various stuff from that article.

The main thing I thought would work would be changing the threshold value, but no matter what I change it to it doesn’t seem to do much.

edit:
After looking a little closer there is a link to another article about changes to pointer acceleration within xorg where I found some more info. If I set the accel profile to 6 the acceleration curve becomes linear. Now I just have to figure out how to change how much the sensitivity increases and how fast I need to move it.

Thanks to the documentation on the xorg website for pointeracceleration I’ve pretty close to how I want it.
Thanks for your help.

Also just in case anyone stumbles upon this later looking to do the same thing I’ll put some info on the stuff I found right here.

First I ran this: (Found it on a similar thread on the archived manjaro forum)

sudo ln -s /usr/share/X11/xorg.conf.d/10-evdev.conf /etc/X11/xorg.conf.d/10-evdev.conf

I think it does something to libinput. It changed what mouse options I have in my Desktop Environment as well as what “xinput --list-props 14” outputs. Same thread says this will reverse it.

sudo rm /etc/X11/xorg.conf.d/10-evdev.conf

Current settings I’m using: (14 is my mouse’s ID. You’ll need to replace it with your mouse’s ID. Use “xinput list” to find it.

xset m 1/4 100
xinput --set-prop 14 'Device Accel Profile' 6
xinput --set-prop 14 'Device Accel Constant Deceleration' 5
xinput --set-prop 14 'Device Accel Adaptive Deceleration' 1
xinput --set-prop 14 'Device Accel Velocity Scaling' 2

Looks fine, but why not just following the Arch wiki by creating /etc/X11/xorg.conf.d/50-mouse-acceleration.conf and placing your settings in it?

So I decided to restart and go to sleep for the night planning to tinker with it more the next day and I assumed my changes wouldn’t persist but now the same values are giving me a way higher acceleration and sensitivity. I probably changed some other value earlier in the day that messed everything up.

However I think I understand how it works well enough now to set it up correctly and I’ll also make that conf file. I actually forgot about that and I was kinda planning on just running a script on startup that just manually set the values instead lol, so thanks for reminding me about that. I’m quite new to using Linux, let alone Arch. :A)

Try leetmouse mouse driver which is basically linux mouse driver modified to have some of RawAccel’s functionality for linux.

Clone it.
Copy /gitcloneddir/driver/config.sample.h to config.h in same dir.
Edit the defines to setup how the accel should be.

If you get
“LEETMOUSE: First float-trap…”
or especially
“LEETMOUSE: Final float-trap triggered. This should NEVER happen!”
in kernel messages then you may want to increase BUFFER_SIZE

Note: when compiling shaders in e.g. OW2 I get these traps triggered, but when playing I don’t, so I don’t increase the buffer.

If the buffer is far too low you may have no mouse input.

Instructions are simple, but I made subprocess.run python scripts of the commands to add/remove/build to be able to update the driver when changing config without having to type and remember the commands, and another to be able to remove the driver without remembering the command if I screwed up the settings. Put them into the base dir you did the gitclone to. Use at own risk.

To remove the driver.

import subprocess
rem_leetmouse = subprocess.run(["sudo", "pacman", "--noconfirm", "-R", "leetmouse-driver-dkms"])

To build, remove, then add the driver; i.e. update the driver when changing config, also works for fresh install

import subprocess
build_leetmouse = subprocess.run(["./scripts/build_arch.sh"])
rem_leetmouse = subprocess.run(["sudo", "pacman", "--noconfirm", "-R", "leetmouse-driver-dkms"])
add_leetmouse = subprocess.run(["sudo", "pacman", "--noconfirm","-U", "pkg/build/leetmouse-driver-dkms-0.9.0-1-x86_64.pkg.tar.zst"])