{"id":13599249,"url":"https://github.com/Gnarus-G/maccel","last_synced_at":"2025-04-10T12:31:59.191Z","repository":{"id":217425967,"uuid":"743782185","full_name":"Gnarus-G/maccel","owner":"Gnarus-G","description":"Mouse acceleration driver and kernel module for Linux.","archived":false,"fork":false,"pushed_at":"2025-03-19T21:39:02.000Z","size":6787,"stargazers_count":81,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T05:33:22.833Z","etag":null,"topics":["dkms","linux","linux-kernel-module","mouse-accel-driver","mouse-acceleration","tui"],"latest_commit_sha":null,"homepage":"https://maccel.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gnarus-G.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-16T01:20:24.000Z","updated_at":"2025-04-03T00:21:03.000Z","dependencies_parsed_at":"2024-01-20T22:29:04.024Z","dependency_job_id":"69bfd746-8f0d-4867-9059-81381f703468","html_url":"https://github.com/Gnarus-G/maccel","commit_stats":null,"previous_names":["gnarus-g/maccel"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnarus-G%2Fmaccel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnarus-G%2Fmaccel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnarus-G%2Fmaccel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnarus-G%2Fmaccel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gnarus-G","download_url":"https://codeload.github.com/Gnarus-G/maccel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217131,"owners_count":21066633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dkms","linux","linux-kernel-module","mouse-accel-driver","mouse-acceleration","tui"],"created_at":"2024-08-01T17:01:01.346Z","updated_at":"2025-04-10T12:31:54.176Z","avatar_url":"https://github.com/Gnarus-G.png","language":"Rust","readme":"# maccel\n\nLinear mouse acceleration.\n![image](https://github.com/Gnarus-G/maccel/assets/37311893/f45bc4bc-f7a0-43b0-9e8c-b3f6fb958d4c)\n\n## Acceleration Function\n\n$$V = \\frac{\\sqrt{dx_0^2 + dy_0^2}}{i}$$\n\n$$dx_f = dx_0 * (1 + aV)$$\n\n$$dy_f = dy_0 * (1 + aV)$$\n\nWhere $dx$ and $dy$ are the directional displacements read from the mouse,\n$i$ is the polling interval of the mouse; this would be 1ms if the polling rate is 1000Hz,\nand $a$ is the user provided\nacceleration factor\n\n## Install\n\nMake sure to have these dependencies installed on your machine:\n`curl`, `git`, `make`, `gcc`, and the linux headers in `/lib/modules/`\n\n```sh\ncurl -fsSL https://www.maccel.org/install.sh | sudo sh\n```\n\n## Uninstall\n\n```sh\nsh /opt/maccel/uninstall.sh\n```\n\nOr\n\n```sh\ncurl -fsSL https://www.maccel.org/uninstall.sh | sudo sh\n```\n\n## CLI Usage\n\n```\nCLI to control the parameters for the maccel driver, and manage mice bindings\n\nUsage: maccel \u003cCOMMAND\u003e\n\nCommands:\n  tui        Open the Terminal UI to manage the parameters and see a graph of the sensitivity\n  bind       Attach a device to the maccel driver\n  bindall    Attach all detected mice to the maccel driver\n  unbind     Detach a device from the maccel driver, reattach to the generic usbhid driver\n  unbindall  Detach all detected mice from the maccel driver reattach them to the generic usbhid driver\n  set        Set the value for a parameter of the maccel driver\n  get        Get the value for a parameter of the maccel driver\n  help       Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n```\n\n## Notes\n\nOne should disable the acceleration done by default in some distros, e.g. by `xset` or `libinput`.\n[Full Guide](https://wiki.archlinux.org/title/Mouse_acceleration#Disabling_mouse_acceleration)\n\nHere is [Breakdown of why and how I ended up making this](https://www.bytin.tech/blog/maccel/)\n\n## Troubleshooting Install\n\n### gcc\n\nThe version matters, it must match the version with which the kernel was built.\n\nFor example you might encounter such an error:\n\n![image](https://github.com/Gnarus-G/maccel/assets/37311893/6147e20a-a132-4132-a45e-2af3dc035552)\n\nAnd you'll have to find a version of `gcc` that matches. This will be more or less annoying\ndepending on your distro and/or how familiar you are with it.\n\n### linux headers\n\nYou want to make sure that `/lib/modules/` is not empty. For example mine looks like this:\n\n```\ntotal 0\ndrwxr-xr-x 1 root root    114 Jan 29 17:59 .\ndrwxr-xr-x 1 root root 159552 Jan 29 22:39 ..\ndrwxr-xr-x 1 root root     10 Jan 29 17:59 6.6.14-1-lts\ndrwxr-xr-x 1 root root     12 Jan 29 17:59 6.7.0-zen3-1-zen\ndrwxr-xr-x 1 root root    494 Jan 29 17:59 6.7.2-arch1-1\ndrwxr-xr-x 1 root root    494 Jan 31 21:54 6.7.2-zen1-1-zen\n```\n\nYou want to find headers that match your kernel as represented by\n\n```\nuname -r\n```\n\nOn an arch based distro you search for the available headers with\n\n```\nsudo pacman -Ss linux headers\n```\n\n## Troubleshooting Driver\n\nIf you notice any weird behavior and are looking to investigate it,\nthen try a debug build of the driver. Run this modified install command.\n\n```sh\ncurl -fsSL https://www.maccel.org/install.sh | sudo MACCEL_DEBUG_INSTALL=1 sh\n```\n\nThis debugging experience might be lacking still. Feel free to report any issues.\n\n## References\n\n- https://lwn.net/Kernel/LDD3/\n- https://github.com/torvalds/linux/blob/master/drivers/hid/usbhid/usbmouse.c\n- https://www.kernel.org/doc/html/latest/input/index.html\n- https://github.com/a1xd/rawaccel/blob/master/doc/Guide.md\n- https://github.com/Skyl3r/leetmouse/blob/master/driver/accel.c\n- https://sourceforge.net/p/fixedptc/code/ci/default/tree/\n- https://github.com/torvalds/linux/blob/master/drivers/input/evdev.c\n- https://github.com/freedesktop-unofficial-mirror/evtest/blob/master/evtest.c\n- https://docs.kernel.org/input/input-programming.html\n- https://www.kernel.org/doc/Documentation/input/input.txt\n- https://docs.kernel.org/driver-api/input.html\n- https://linux-kernel-labs.github.io/refs/heads/master/labs/device_drivers.html\n- https://www.youtube.com/watch?v=oX9ZwMQL2f4\n- https://gist.github.com/fstiehle/17fca11d7d1b4c2b8dfd982e1cf39caf\n","funding_links":[],"categories":["💻 Apps"],"sub_categories":["🌌 Other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGnarus-G%2Fmaccel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGnarus-G%2Fmaccel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGnarus-G%2Fmaccel/lists"}