Repository navigation
Per-device profiles, Raw Accel import/export, trackpad support and ARM64 support (branch) #113
Daaboulex
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi Andy,
It's been a long time since I last wrote in the issues (I opened #23 back then), and I wanted to say thanks for YeetMouse. I use it a lot, including for gaming on an M1 Max Mac, and along the way I built a branch with quite a few changes:
https://github.com/Daaboulex/YeetMouse/tree/daaboulex (based on master, 78dcd0d)
It's big, and it's completely fine if it never gets merged. I just wanted to leave it here in case you want to try it or take parts of it. I saw #110 and the talk in #100, and this isn't meant to step on BKSalman's work.
Per-device profiles
It works the way you described in #100. The global config works as before (the old /etc/yeetmouse.conf path is kept as a link), and a mouse only gets its own settings if it's listed in /etc/yeetmouse/devices.conf. The driver switches as soon as that mouse is plugged in. You can save as many named profiles as you want. The GUI has a profile picker, save, save as and delete, and a Devices menu to pick a profile for each mouse. On the command line, yeetmousectl has profile, device, load, check and status commands. A game can also use its own profile while it runs: yeetmousectl run -- %command%
Raw Accel import and export
I came from Raw Accel on Windows, so you can import a Raw Accel 1.7 settings.json and export back to one, and use the same settings on both systems. A conversion is either exact, or it's refused and names the setting that can't be converted. For that I added Raw Accel's extra settings (time limits, smoothing, a separate vertical curve and so on). The GUI hides them unless you turn on View > Raw Accel features.
Touchpads
The driver doesn't touch touchpads, but the GUI and yeetmousectl can hand a profile's curve to KWin as a libinput custom acceleration curve. That needs KWin's custom curve support from KDE merge request 6937, which I patch into KWin on my system until it ships.
ARM64
It builds and runs on ARM64 now (I use it on the M1 Max with Asahi Linux). The 128-bit division was x86 assembly, so ARM uses a plain C version.
Bugs I found in the current code
Speed
Measured one packet at a time, with each kernel's own compiler flags:
The extra time is the per-mouse lookup, the time limits and the division check. No curve is faster because it skips the speed calculation.
Checking that nothing else changed
tools/bench/run.sh runs your accel.c unchanged next to mine on 4000 generated settings and compares every output. 2455 come out identical. The rest are settings both versions reject, the bug fixes above, Power settings that the ratio check in update_constants switches off but this branch runs, and a few extreme ones where both versions overflow. The README lists every case. There are also more unit tests, CBMC proofs for the division and the lookup table, and updated install script, Arch package and NixOS module.
If any of it is useful, I'm happy to split it into small PRs, starting with the bug fixes.
Thanks again!
All reactions