noah-nuebling / mac-mouse-fix

Mac Mouse Fix - Make Your $10 Mouse Better Than an Apple Trackpad!
https://macmousefix.com/
Other
5.81k stars 163 forks source link

Connecting a bluetooth mouse temporarily disable scrolling [bug] #1112

Open Kastakin opened 2 months ago

Kastakin commented 2 months ago

Description

When connecting a bluetooth mouse with the application open with scrolling set to "Regular" disable scrolling with the scroll wheel of the mouse.

I don't think it is 100% reproducible but it happens often. I can't pin point the exact cause.

Steps to reproduce

  1. Start the program without a connected mouse with scrolling set as "Regular"
  2. Connect the bluetooth mouse
  3. Try to scroll in an open application (it should not work)
  4. Setting scrolling to "Off" works
  5. Restarting the application fixes the problem

Context

Mac Mouse Fix Version: 2.2.4 macOS Version: 14.6.1 Mouse Model: Razer Basilisk X Hyperspeed

Additional Comments


Console Logs

Crash Reports

msevestre31 commented 1 month ago

Hi

I also faced this issue when upgraded to OSX 15.0. Tried several things until it worked again (my last operation was to forget & reconnect my bluetooth mouse).

Yesterday, upgraded to 15.0.1 and same again and after 10+ tries, it finally worked again (this time, forget & reconnect did not do the trick, not a mouse fix quit & start - strangely a disable/enable toggle of MacMouseFix has been the last thing I did).

In all cases, only the scroll was affected. Anything related to the click was OK. Disabling scrolling in MacMouseFix (giving hand back to Mac OSX) allowed to get the scrolling back.

noah-nuebling commented 1 month ago

Hey guys, thanks for the feedback! Do you perhaps have any other software installed that might affect the scrolling, such as Logitech Options or MOS?

They might install 'event taps' that interfere with the 'event taps' installed by Mac Mouse Fix. Event taps let programs extract and insert events into the macOS event handling system. This is how Mac Mouse Fix can monitor and simulate mouse clicks and scrolls.

The order that the event taps are installed by different apps might trigger the bug that you're experiencing. Mac Mouse Fix installs and uninstalls its event taps under certain conditions that seem to sort of line up with the actions that you guys reported which seem to trigger/fix the bug. E.g when there's no mouse attached or when MMF is disabled, it will always uninstall the 'scroll event tap' and only reinstall it when those conditions are met (this is a bit of an oversimplification, but basically it will try to disable the event taps unless necessary)

If you guys think this idea makes sense with your experience or if you have experiences which contradict this, please let me know! Thank you.

In the mean time, I'll use a Bluetooth mouse for a while and see if I can catch the issue.

msevestre31 commented 1 month ago

Hi

Nothing like this on my end.

Note that both time this happened for me after a MacOS update - both time, once I successfully managed to have MacMouseFix back to work, MacMouseFixe remains up & running smoothly (ie: hard to reproduce :))

noah-nuebling commented 1 month ago

Ohh it only happens once after an update. Sorry I didn't read that properly. That's good to know! Thanks for getting back @msevestre31

noah-nuebling commented 1 month ago

But it sounds like @Kastakin is experiencing the problem more frequently.

Kastakin commented 1 month ago

Thanks for taking interest in the issue.

As I stated in the original issue I did not find the problem 100% reproducible. It happens from time to time, often it might have been an overstatement from my part.

It usually happens on my part after waking up/rebooting but, again, not all the times and it seems to have diminished after the 15.0 update.

Regarding the presence of other "event taps" I don't have any, I used to run MOS + Linearmouse but this application (minus the possibility to blacklist some applications from the smooth scrolling) replaced them both.

msevestre31 commented 1 month ago

Ohh it only happens once after an update. Sorry I didn't read that properly. That's good to know! Thanks for getting back @msevestre31

For me, yes... however, I must admit I nearly never reboot my Mac, except OSX updates (Kastakin is facing the problem sometimes at reboot, thus I will do some tests of behavior after reboot).

noah-nuebling commented 1 month ago

Thanks again for the clarification! The fact that it seems to have gotten better with 15.0 might suggest that it's related to a macOS issue. But if it's not gone, we should investigate it.

So I've been using a Bluetooth Mouse for the time being to see if I can catch this issue myself. So far I haven't had any (bad) luck.

If you'd like to help investigate this yourself, here's a debug version of Mac Mouse Fix 3.0.3: Mac Mouse Fix.app.zip

This debug version is a little slower than the regular version, but it logs its state to the console extensively. If you can collect the logs that Mac Mouse Fix sends around the time that the issue occurs, that might give us the necessary insight to understand why the issue happens.

To collect logs:

  1. Go to Console.app > Action and enable 'Include Info Messages' and 'Include Debug Messages'
  2. Go to Console.app > Search and enter 'Mac Mouse Fix'
  3. Go to Console.app > [Your device name] and click 'Start streaming'
  4. Reproduce the bug using the debug version of Mac Mouse Fix which I attached above
  5. Copy-paste logs which occured around the time of the bug and send them to me Notes:
    • There are going to be hundreds or thousands of logs per minute, and you might want to send a few minutes of logs if you're not exactly sure when the bug occured.
    • You might want to use https://pastebin.com/ or a similar site to send all that text.

You can also look for Console.app > Crash Reports and send me any reports you find that might be related. But if only the scrolling stops working, it seems unlikely that this is caused by crashes.

Also see this thread, where a user seems to have a similar issue. If there are some similarities in your setup, that might point us to the root cause of the problem.

What scroll settings are you using by the way @Kastakin? Perhaps that would help reproduce the problem.

msevestre31 commented 1 month ago

Hi

noted. Will install it and, should the issue occur, will give you feedback. Since my last message, I rebooted my Macbook 3 or 4 times, without any issue.

Before my first reboot, I checked and found that my MacMouse Fix app was actually opened from the Download folder - not the App one. I moved it to the App folder. Unsure if the location of the application could influence its behavior (I would guess that it is unlikely, but I am not 100% sure)

Le jeu. 10 oct. 2024 à 12:30, Noah Nuebling @.***> a écrit :

Thanks again for the clarification! The fact that it seems to have gotten better with 15.0 might suggest that it's a macOS issue. But if it's not gone, we should investigate it.

So I've been using a Bluetooth Mouse for the time being to see if I can catch this issue myself. So far I haven't had any (bad) luck.

If you'd like to help investigate this yourself, here's a debug version of Mac Mouse Fix 3.0.3: Mac Mouse Fix.app.zip https://github.com/user-attachments/files/17165522/Mac.Mouse.Fix.app.zip

This debug version is a little slower than the regular version, but it logs its state to the console extensively. If you can collect the logs that Mac Mouse Fix sends around the time that the issue occurs, that might give us the necessary insight to understand why the issue happens.

To collect logs:

  1. Go to Console.app > Action and enable 'Include Info Messages' and 'Include Debug Messages'
  2. Go to Console.app > Search and enter 'Mac Mouse Fix'
  3. Go to Console.app > [Your device name] and click 'Start streaming'
  4. Reproduce the bug using the debug version of Mac Mouse Fix which I attached above
  5. Copy-paste logs which occured around the time of the bug and send them to me Notes:
    • There are going to be hundreds or thousands of logs per minute, and you might want to send a few minutes of logs if you're not exactly sure when the bug occured.
    • You might want to use https://pastebin.com/ or a similar site to send all that text.

You can also look for Console.app > Crash Reports and send me any reports you find that might be related. But if only the scrolling stops working, it seems unlikely that this is caused by crashes.

Also see this thread https://github.com/noah-nuebling/mac-mouse-fix/issues/1121#issuecomment-2375874966, where a user seems to have a similar issue.

— Reply to this email directly, view it on GitHub https://github.com/noah-nuebling/mac-mouse-fix/issues/1112#issuecomment-2404712339, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7GF4TL2DPXW5URXLO25AIDZ2ZJLPAVCNFSM6AAAAABOAQ3KIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUG4YTEMZTHE . You are receiving this because you were mentioned.Message ID: @.***>

noah-nuebling commented 1 month ago

Thanks @msevestre31.

That's actually very relevant that it was opened from the Downloads folder. If you download an app and open it without first moving it to another folder, it opens in so called 'quarantine mode', which aims to prevent certain kinds of malware attacks.

It's definitely plausible that the bug might be triggered by some weird interaction with the 'quarantine mode'. If the other users that experienced this bug also didn't move the app out of the Downloads folder, that would be strong evidence.

@Kastakin @ingolohr did you run Mac Mouse Fix from the Downlods folder when you experienced the bug where scrolling stops working after waking from sleep?


Also, @msevestre31, if you're going to be running the Console.app all the time in the background to catch any logs here are some more tips:

I also totally get if always running the Console.app is too annoying, so I get if you don't wanna do this. Thanks for all the information so far.