-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quirky fix to Magic Mouse 2 driver not loading when reconnecting #1
base: magicmouse2
Are you sure you want to change the base?
Quirky fix to Magic Mouse 2 driver not loading when reconnecting #1
Conversation
This fix is based on the work of [0xABAD](https://github.com/0xABAD/magic-mouse-2), but I changed his method of detecting the mouse by searching for the Product ID and not depend on the unit codes.
README now has information on the new script and on how the fixes work.
When an USB with that product ID is detected then a input driver is loaded. I think this is the correct interpretation.
Previously the rule used the USB ID of the computer and not the mouse.
hello @RicardoEPRodrigues and thx for your effort to solve this problem. I have applied your changes and the mouse has stopped working. I tried removing the files and reinstalling but still not moving in when I run install.sh Running in ubuntu 18.04 with kernel 5.3.0-28-generic any suggestions? thx |
Hey @n0ni0, can you check if the logs have anything relating to If the mouse stopped working then part of the script is running. We have to find out if any error came up and what that error is. Can you check if the To revert the changes you can simply delete the |
I found a log file when connect device in local/share/xorg/Xorg.0.log:
The file /opt/magic-mouse-fix/hid-magicmouse.ko exist After restart the problem persist. |
I currently don't have the time to look into what the issue is. If you can please do some testing. First off delete the After that you can try running the script yourself with Explore a bit of what the script does. These are its contents:
As you can see it removes any magic mouse driver ( I'll try to help more when I have time. |
I will try to investigate more, thx again. |
Also added a smaller install script that does not install dkms and does not install the bluetooth fix.
@n0ni0 I updated my branch, can you test it out? Apparently the UDEV rule will always try to run at least 3 times (loading and unloading the driver each time). I tried to limit the number of repetitions, but could only lower it to 3. To solve this I modified the script to check if others were running. So now I believe it will always run only one time! You can use a new smaller script |
Added a delay after removing the previous driver and before adding the new one
Hello @RicardoEPRodrigues, using install-fix.sh works like a charm. Thanks |
This is working for me to allow scrolling each time my mouse connects (thanks!), but the middle-click seems to have stopped working. It had been working fine with the @rohitpid version. Any idea what might be going on or how to fix this? |
@jaybeaton Great to know it is working! On theory, the middle-click is on by default and should work. You can tweak the settings in the Unfortunately, I haven't tested it myself. |
So it looks like I have a similar issue. On any reboot I have to I have to reapply the Troubleshooting fix to get my MM2 to scroll. In the aforementioned posts you talk about some install-fix.sh script. But where is it? Or is there another solution? |
@cavaughankirov this is a pull request with some changes. If you wanna try them out you have to download the changes in my repo: https://github.com/RicardoEPRodrigues/Linux-Magic-Trackpad-2-Driver Just run |
well, there's something wrong with the script and I wish I new coding better to try and figure it out. I moved the script to the scripts dir. But when running it it seems to reproduce the scripts dir. Here's the output:
|
@cavaughankirov you don't need to move the script anywhere. Just use my repo without modification and in the base directory run |
for newer systems bluetooth restart now is done with systemctl. It also adds a small check to detect root. If not it asks to run it as sudo.
This adds a 1/5 of a second delay from the registration of a drag event to actually starting to scroll. The result is a slight decrease in sensitivity when dragging a finger on the Magic Mouse to start a scroll. The actual scrolling is the same as before, there is a just a small delay at the beginning of the stroke which helps to eliminate accidental scrolls when just resting the finger lightly on the mouse surface.
This update simplifies the code. Please run `remove.sh` before updating the driver to ensure a smooth transition. Removed unnecessary files from repo. Changes were made to install, the main loading script to make use of modprobe more accurately. The parameters for hid-magicmouse were moved to /etc/modprobe.d/hid-magicmouse.conf . This allows the unloading and loading of the module with predefined parameters. A `remove.sh` script was added to uninstall the driver. NOTE: It does not remove the bluetooth fix. Changed DKMS version to reflect the driver name.
Also add parameter definition to conf file.
You can now generate a debian file for the project by running `./build-deb.sh`.
This commit adds two new variables for delaying scroll until fingers move further away. Remove time delay.
This fix works great for my magic mouse 2 on Linux Mint (Ubuntu 20.04) kernel 5.4.0-67-generic. I was having trouble with getting the The install went smooth as butter and the scroll is now working perfectly - thank you 👍 😄 |
This fix removes the need for external files to load the driver. It turns out the driver already loaded itself, but without a delay it would fail. This is now fixed. Based on the work seen here johnchen902/linux@cb700d0
This update brings a feature that allows you to stop scrolling if the mouse is moving. It is still very rough, but it works.
Add reload driver instructions to README file
This fix is based on the work of 0xABAD, but I changed his method of detecting the mouse by searching for the Product ID and not depend on the unit codes.