YeetMouse is a kernel module that allows for fast and customizable mouse acceleration.
I created YeetMouse to build upon the great work of Klaus Zipfel’s LeetMouse and add features such as Jump
(at first it was mostly it, the Jump acceleration mode).
But it quickly grew into something bigger as I decided to add a GUI to it for better control.
- Clone this repository, find the settings you’re most comfortable with, using GUI, change the defines in the config.h (More on this in the FAQ section about persistent settings).
- Make sure, you have the required toolchains (e.g.
base-devel
on Arch orbuild-essentials
on Debian) installed as well as thelinux-headers
for your installed kernel.
- OpenGL (you most likely already have it)
- GLFW3, which can be installed via these commands:
sudo apt-get install libglfw3
sudo apt-get install libglfw3-dev
To build, go to the gui directory cd gui/
and run make
Keep in mind that the program needs to be run with sudo privileges.
To run, simply use sudo -E ./YeetMouseGui
For Arch and Manjaro, a PKGBUILD
has been written for seamless integration into pacman.
Installation
# Create the PKGBUILD, copy associated files and run makepkg
./scripts/build_arch.sh
# Run pacman on the created package
sudo pacman -U pkg/build/leetmouse*.zst
All your mice should now be bound to this driver. They will also automatically bind to it after a reboot. If this did not work, run sudo /usr/lib/udev/leetmouse_manage bind_all
Uninstallation
sudo pacman -R leetmouse-driver-dkms
All your mice should now be bound to the generic usbhid driver again.
Simply use the installation and uninstallation scripts, sudo ./install.sh
and sudo ./uninstall.sh
respectively.
If something doesn’t work as expected, try installing manually as stated in section Other distros, and check all the error logs.
Please refer to NixOS instructions.
Other distributions’ package-managers are not yet supported and thus need a manual installation.
Installation
Determine the current version of this module by examining the variable DKMS_VER
in the Makefile
. It can be e.g. 0.9.0
Run the following commands to build and install the kernel module
# Install the driver and activate the dkms module
sudo make setup_dkms && sudo make udev_install
sudo dkms install -m leetmouse-driver -v 0.9.0 # Enter the version you determined from the Makefile earlier in here
(Or you can use the built-in install script like so: sudo ./install.sh
).
All your mice should now be bound to this driver. They will also automatically bind to it after a reboot. If this did not work, run sudo /usr/lib/udev/leetmouse_manage bind_all
If this still does not work, there is a major problem
Uninstallation
You again need to know the version
as described above for the installation
# Unbind all mice from the driver
sudo /usr/lib/udev/leetmouse_manage unbind_all
# Uninstall the driver
sudo dkms remove -m leetmouse-driver -v 0.9.0
sudo make remove_dkms && sudo make udev_uninstall
(Or you can use the built-in uninstall script like so: sudo ./uninstall.sh
).
Unplug and replug your mouse or reboot to have your mice bound back to the generic usbhid.
If you want to compile this module only for testing purposes or development, you do not need to install the whole package to your system
Compile the module, remove previously loaded modules and insert it.
make clean && make
sudo rmmod leetmouse
sudo insmod ./driver/leetmouse.ko
If you did not install the udev rules before via sudo make udev_install
you need to manually bind your mouse to this driver.
You can take a look at /scripts/bind.sh
for an example on how to determine your mouse’s USB address for that. However using the udev rules for development is advised.
- Ctrl + Left Click on the parameter box to start inputting the values manually.
- This is (unfortunately) how things are done on most distros, for security reasons I presume.
But there is a way so save the settings. All You need to do is find the values You like and Export them to a config.h format like so:
Then simply replace the
config.h
file located in/driver
(or create a one), and reinstall the driver.
- On some distros (for example Ubuntu 20.04) system adds an additional sensitivity on top of the driver. To combat this You’ll need to configure the settings correctly.
This is system dependant, but for Ubuntu 20.04 users, the exact sensitivity value is -0.666, to apply that, simply use
gsettings set org.gnome.desktop.peripherals.mouse speed -0.666
- For the simple modes like Linear, Classic, Power just use the RawAccel’s values (same for Jump).
- For Motivity and Natural, You’re out of luck for now. Motivity is implemented, but it does not support
Gain
. Natural on the other hand is not implemented, and not planned as of for now. - LuT (Look up Table) is just what you put in it, there is no difference between YeetMouse and RawAccel.
- Keep in mind that the names are not 1:1 for every parameter.
- To check how Your new curve compares to RawAccel’s, just take a screenshot of RawAccel with your curve and compare the two.
Instruction | Fixed-Point / FPU | Mop/s | ns/op | Clock cycles/op |
---|---|---|---|---|
Multiplication | Fixed-Point 64 | 542.905367 | 1.911 | 7.029038 |
Fixed-Point 64 (128bit) | 540.682695 | 1.913 | 7.012462 | |
FPU (double) | 788.524105 | 1.29 | 4.722532 | |
Division | Fixed-Point 64 (Precise) | 91.446419 | 11.299 | 41.756461 |
Fixed-Point 64 (128bit) | 203.819151 | 5.097 | 18.797924 | |
FPU (double) | 188.035704 | 5.392 | 19.879064 | |
Exponent | Fixed-Point 64 | 66.550845 | 15.561 | 57.525454 |
Fixed-Point 64 (Fast) | 92.775366 | 11.285 | 41.702182 | |
FPU (double) | 116.396443 | 8.741 | 32.276506 | |
Sqrt | Fixed-Point 64 (Precise) | 18.059895 | 57.307 | 211.97892 |
Fixed-Point 64 | 64.558792 | 15.675 | 57.956097 | |
FPU (double) | 133.474534 | 7.9 | 29.179384 | |
Pow | Fixed-Point 64 | 31.81294 | 32.221 | 119.111214 |
Fixed-Point 64 (Fast) | 40.524527 | 26.043 | 96.310556 | |
FPU (double) | 77.804544 | 17.113 | 63.251944 | |
Log | Fixed-Point 64 | 51.117073 | 21.033 | 77.768302 |
Fixed-Point 64 (Fast) | 61.341951 | 16.638 | 61.497848 | |
FPU (double) | 53.326065 | 19.876 | 73.491065 |