Skip to content
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

Not working with MagicMouse, Macbook Pro, Big Sur #33

Closed
rachid-block opened this issue Dec 14, 2021 · 22 comments · Fixed by #87
Closed

Not working with MagicMouse, Macbook Pro, Big Sur #33

rachid-block opened this issue Dec 14, 2021 · 22 comments · Fixed by #87
Labels
help wanted Extra attention is needed

Comments

@rachid-block
Copy link

I installed the application and the mouse acceleration and sensitivity settings have no effect. I tried restarting my computer, and toggling the accessibility settings of the app.

@lujjjh
Copy link
Collaborator

lujjjh commented Dec 15, 2021

Thank you for reporting this. Would you like to paste the relevant logs so that I can dig this further?

  1. Open Console.app
  2. Select View → Include Debug Messages
  3. Select your MacBook Pro and click Start streaming
  4. Search CursorManager and choose Category

image

You may see some logs (about every 5 seconds) describing which devices' acceleration and sensitivity are updated and which devices' are skipped. I'm guessing that Magic Mouse is skipped.

@kgalias
Copy link

kgalias commented Dec 15, 2021

I'm having the same problem and when modifying the accel and sens via LinearMouse I see nothing in the console.

@rachid-block
Copy link
Author

I am also not seeing anything in the console when I follow those steps.

@lujjjh
Copy link
Collaborator

lujjjh commented Dec 15, 2021

Oops...I forgot to point out that View → Include Debug Messages should be selected in Console.app.

@rachid-block
Copy link
Author

For the record I found that option under "Action" -> "Include Debug Messages"

Here is the message:

Magic Mouse 2 is skipped as it might be a trackpad

@lujjjh
Copy link
Collaborator

lujjjh commented Dec 16, 2021

For the record I found that option under "Action" -> "Include Debug Messages"

Here is the message:

Magic Mouse 2 is skipped as it might be a trackpad

Thank you for your reply. I attempted to fix this in #36. I don't have a Magic Mouse, though, so I can't test it. Please let me know if this fix works.

Edit: Fixed some mistakes and updated the build URL.

@acefer
Copy link

acefer commented Dec 16, 2021

I tried the new build with the fix and the console app show these messages.
Captura de pantalla 2021-12-16 a las 12 32 59

@lujjjh
Copy link
Collaborator

lujjjh commented Dec 16, 2021

Magic Mouse appears to be quite different from a regular mouse. Perhaps this is the reason why SteerMouse and USB Overdrive do not support Magic Mouse (and Magic Trackpad). I'm going to mark this issue help wanted because it's probably not easy to fix.

However, I'm still curious about the structure of Magic Mouse in I/O registry. It might be useful to run

ioreg -n "AppleMultitouchDevice" # or maybe it's not an AppleMultitouchDevice

in the terminal and share the relevant sections of Magic Mouse. So that I can see whether there are any other properties that can affect acceleration and sensitivity.

"Apple Internal Keyboard / Trackpad," for example, is as follows (please mask properties like SerialNumber / LocationID):

    | |   |   |   | |   |   | +-o AppleMultitouchTrackpadHIDEventDriver  <class AppleMultitouchTrackpadHIDEventDriver, id 0x1$
    | |   |   |   | |   |   |   +-o AppleMultitouchDevice  <class AppleMultitouchDevice, id 0x100000ae1, registered, matched,$
    | |   |   |   | |   |   |     | {
    | |   |   |   | |   |   |     |   "Sensor Columns" = 30
    | |   |   |   | |   |   |     |   "Sensor Surface Descriptor" = <a43d000034260000e0e25dff281f4324>
    | |   |   |   | |   |   |     |   "HIDPointerAccelerationTable" = <000080005553422a00070000000000020004000000040000001000$
    | |   |   |   | |   |   |     |   "Multitouch ID" = 216172784266510336
    | |   |   |   | |   |   |     |   "HIDAccelCurves" = ({"HIDAccelGainLinear"=65536,"HIDAccelTangentSpeedLinear"=484966,"HI$
    | |   |   |   | |   |   |     |   "HIDScrollResolution" = 26214400
    | |   |   |   | |   |   |     |   "Sensor Surface Height" = 9780
    | |   |   |   | |   |   |     |   "HIDServiceSupport" = Yes
    | |   |   |   | |   |   |     |   "parser-options" = 39
    | |   |   |   | |   |   |     |   "TrackpadThreeFingerDrag" = Yes
    | |   |   |   | |   |   |     |   "HIDScrollResolutionY" = 26214400
    | |   |   |   | |   |   |     |   "SupportsSilentClick" = No
    | |   |   |   | |   |   |     |   "VersionNumber" = 629
    | |   |   |   | |   |   |     |   "Sensor Region Descriptor" = <0201001401001e00021402010e0200>
    | |   |   |   | |   |   |     |   "Sensor Surface Width" = 15780
    | |   |   |   | |   |   |     |   "Critical Errors" = 0
    | |   |   |   | |   |   |     |   "SupportsGestureScrolling" = Yes
    | |   |   |   | |   |   |     |   "IOReportLegend" = ({"IOReportGroupName"="Multitouch","IOReportChannels"=((507622685192$
    | |   |   |   | |   |   |     |   "IOUserClientClass" = "AppleMultitouchDeviceUserClient"
    | |   |   |   | |   |   |     |   "IOGeneralInterest" = "IOCommand is not serializable"
    | |   |   |   | |   |   |     |   "bcdVersion" = 1284
    | |   |   |   | |   |   |     |   "parser-type" = 1000
    | |   |   |   | |   |   |     |   "Product" = "Apple Internal Keyboard / Trackpad"
    | |   |   |   | |   |   |     |   "TrackpadSecondaryClickCorners" = Yes
    | |   |   |   | |   |   |     |   "ForceSupported" = Yes
    | |   |   |   | |   |   |     |   "IOCFPlugInTypes" = {"0516B563-B15B-11DA-96EB-0014519758EF"="AppleMultitouchDriver.kext$
    | |   |   |   | |   |   |     |   "MultitouchPreferences" = {"TrackpadHandResting"=Yes,"TrackpadPinch"=1,"TrackpadFourFin$
    | |   |   |   | |   |   |     |   "Max Packet Size" = 1730
    | |   |   |   | |   |   |     |   "ReportInterval" = 0
    | |   |   |   | |   |   |     |   "ResetCount" = 0
    | |   |   |   | |   |   |     |   "VendorID" = 1452
    | |   |   |   | |   |   |     |   "TrackpadFourFingerGestures" = Yes
    | |   |   |   | |   |   |     |   "IOReportLegendPublic" = Yes
    | |   |   |   | |   |   |     |   "Endianness" = 1
    | |   |   |   | |   |   |     |   "ProductID" = 832
    | |   |   |   | |   |   |     |   "Sensor Rows" = 22
    | |   |   |   | |   |   |     |   "HIDScrollResolutionX" = 26214400
    | |   |   |   | |   |   |     |   "HIDPointerResolution" = 26214400
    | |   |   |   | |   |   |     |   "HIDScrollResolutionZ" = 26214400
    | |   |   |   | |   |   |     |   "Family ID" = 105
    | |   |   |   | |   |   |     |   "DeviceUsagePairs" = ({"DeviceUsagePage"=1,"DeviceUsage"=2},{"DeviceUsagePage"=1,"Devic$
    | |   |   |   | |   |   |     |   "MT Built-In" = Yes
    | |   |   |   | |   |   |     |   "Sensor Region Param" = <000004000002>
    | |   |   |   | |   |   |     |   "HIDScrollAccelCurves" = ({"HIDAccelGainLinear"=65536,"HIDAccelTangentSpeedLinear"=3932$
    | |   |   |   | |   |   |     |   "DisablerPresent" = No
    | |   |   |   | |   |   |     |   "HIDScrollAccelerationTable" = <000080005553422a000700000000000100010000000100000000200$
    | |   |   |   | |   |   |     |   "TrackpadMomentumScroll" = Yes
    | |   |   |   | |   |   |     |   "ActuationSupported" = Yes
    | |   |   |   | |   |   |     |   "HIDScrollAccelerationType" = "HIDTrackpadScrollAcceleration"
    | |   |   |   | |   |   |     |   "MTPowerStatsDisable" = Yes
    | |   |   |   | |   |   |     |   "Transport" = "USB"
    | |   |   |   | |   |   |     |   "SerialNumber" = "***"
    | |   |   |   | |   |   |     |   "MTHIDDevice" = Yes
    | |   |   |   | |   |   |     |   "VendorIDSource" = 0
    | |   |   |   | |   |   |     |   "HIDPointerReportRate" = 120
    | |   |   |   | |   |   |     |   "Manufacturer" = "Apple Inc."
    | |   |   |   | |   |   |     |   "HIDPointerAccelerationType" = "HIDTrackpadAcceleration"
    | |   |   |   | |   |   |     |   "UseProviderWorkLoop" = Yes
    | |   |   |   | |   |   |     |   "CountryCode" = 0
    | |   |   |   | |   |   |     |   "LocationID" = ***
    | |   |   |   | |   |   |     | }
    | |   |   |   | |   |   |     |

@lujjjh lujjjh added the help wanted Extra attention is needed label Dec 16, 2021
@acefer
Copy link

acefer commented Dec 16, 2021

Hi!

This is my output for ioreg -n "AppleMultitouchDevice"
I've filtered the results to only show the MagicMosue registry:

|     +-o AppleMultitouchMouseHIDEventDriver  <class AppleMultito$
    | |   |   |       +-o AppleMultitouchDevice  <class AppleMultitouchDevice, $
    | |   |   |         | {
    | |   |   |         |   "UseProviderWorkLoop" = Yes
    | |   |   |         |   "Sensor Rows" = 15
    | |   |   |         |   "parser-options" = 4
    | |   |   |         |   "bcdVersion" = 324
    | |   |   |         |   "IOUserClientClass" = "AppleMultitouchDeviceUserCli$
    | |   |   |         |   "VersionNumber" = 0
    | |   |   |         |   "VendorID" = 76
    | |   |   |         |   "HIDPointerResolution" = 104595456
    | |   |   |         |   "Endianness" = 1
    | |   |   |         |   "Sensor Region Param" = <00000c007b02>
    | |   |   |         |   "SupportsGestureScrolling" = Yes
    | |   |   |         |   "Product" = "Magic Mouse"
    | |   |   |         |   "IOHIDScrollReportRate" = 8192000
    | |   |   |         |   "SerialNumber" = "***"
    | |   |   |         |   "Transport" = "Bluetooth"
    | |   |   |         |   "HIDDisallowRemappingOfPrimaryClick" = Yes
    | |   |   |         |   "MultitouchPreferences" = {"MouseOneFingerDoubleTap$
    | |   |   |         |   "ProductID" = 617
    | |   |   |         |   "HIDScrollResolution" = 26214400
    | |   |   |         |   "DeviceUsagePairs" = ({"DeviceUsagePage"=1,"DeviceU$
    | |   |   |         |   "MTHIDDevice" = Yes
    | |   |   |         |   "MTPowerStatsDisable" = Yes
    | |   |   |         |   "Multitouch ID" = 288230377244128344
    | |   |   |         |   "Family ID" = 112
    | |   |   |         |   "Sensor Columns" = 10
    | |   |   |         |   "Sensor Region Descriptor" = <0101000f01000a00>
    | |   |   |         |   "Sensor Surface Height" = 9056
    | |   |   |         |   "ReportInterval" = 11250
    | |   |   |         |   "VendorIDSource" = 1
    | |   |   |         |   "parser-type" = 2000
    | |   |   |         |   "IOCFPlugInTypes" = {"0516B563-B15B-11DA-96EB-00145$
    | |   |   |         |   "Sensor Surface Width" = 5152
    | |   |   |         |   "LocationID" = ***
    | |   |   |         |   "ResetCount" = 0
    | |   |   |         |   "HIDPointerAccelerationTable" = <000080005553422a00$
    | |   |   |         |   "HIDServiceSupport" = Yes
    | |   |   |         |   "Critical Errors" = 0
    | |   |   |         |   "HIDScrollAccelCurves" = ({"HIDAccelGainLinear"=851$
    | |   |   |         |   "CountryCode" = 0
    | |   |   |         |   "Max Packet Size" = 660
    | |   |   |         |   "IOReportLegend" = ({"IOReportGroupName"="Multitouc$
    | |   |   |         |   "IOReportLegendPublic" = Yes
    | |   |   |         |   "IOGeneralInterest" = "IOCommand is not serializabl$
    | |   |   |         | }

@caolan-ferry
Copy link

Hey, i cant get linearmouse to work with my magic mouse 2, none of the settings seem to make a difference. Has there been any developments on this?

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 5, 2022

Hey, i cant get linearmouse to work with my magic mouse 2, none of the settings seem to make a difference. Has there been any developments on this?

No, I'm afraid. Pull requests are welcome if someone who uses Magic Mouse 2 discovers a solution to modify the cursor acceleration.

From the I/O registry data posted by acefer, the HIDPointerResolution property exists, so it's not difficult to modify the cursor sensitivity.

However, the property HIDPointerAccelerationType is missing, which represents the key of acceleration data.

I can think of two approaches to consider:

  1. Manually set the HIDPointerAccelerationType property value to "HIDMouseAcceleration" and configure acceleration by the HIDMouseAcceleration property like other mice.
  2. I've noticed the HIDPointerAccelerationTable property which could be useful.

Another question to me is that the default sensitivity of Magic Mouse 2 seems to be different from other mice, according to the value of the HIDPointerResolution property.

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 15, 2022

I've rework the mouse detection algorithm in #82. I would appreciate if you can verify if this version works for Magic Mouse.

NOTE: The default sensitivity of Magic Mouse is 404, so LinearMouse's default sensitivity (1600) might be too large for it. If Magic Mouse moves too fast to control, please quit LinearMouse with Trackpad and re-connect the Magic Mouse (turn off the power and turn on again I guess).

Thank you very much!

@caolan-ferry
Copy link

Seems to be working now for me! Thank you for this fix :)

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 15, 2022

@caolan-ferry

Seems to be working now for me! Thank you for this fix :)

Thank you so much for your testing! Are sensitivity and acceleration working as well?

If so, could you please tell me if the default sensitivity (1600) is too fast to control for Magic Mouse? I shall decide whether to release this version or to block Magic Mouse for the moment until per-device configuration is implemented in the future.

@caolan-ferry
Copy link

@lujjjh
I have the sensitivity set as shown in the screenshot attached, is the default you are mentioning when the checkbox is ticked?

Screenshot 2022-02-15 at 17 10 18

@caolan-ferry
Copy link

Also it seems that some of the magic mouse gestures are not working correctly when using linear mouse, such as swiping back and forth between browser windows

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 16, 2022

@lujjjh I have the sensitivity set as shown in the screenshot attached, is the default you are mentioning when the checkbox is ticked?

At the first launch, LinearMouse would set the acceleration to 0.6875 and the sensitivity to 1600. I hope it's not too fast for the Magic Mouse.

Also it seems that some of the magic mouse gestures are not working correctly when using linear mouse, such as swiping back and forth between browser windows

Is this a new issue or does it also exist in previous versions? If this is a new issue, could you perhaps confirm which functionality or functionalities are causing it by turning them off?

Thank you!

@caolan-ferry
Copy link

@lujjjh seems its specifically the reverse scrolling setting stopping this gesture from working. I also noticed that when linear mouse is running, sometimes my trackpad becomes extremely slow until i 'refresh' its sensitivity in system preferences.

I also think the default sensitivity is good!

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 17, 2022

seems its specifically the reverse scrolling setting stopping this gesture from working.

Thank you for providing this information. I'll try fixing it.

I also noticed that when linear mouse is running, sometimes my trackpad becomes extremely slow until i 'refresh' its sensitivity in system preferences.

Oops, this is a bug! When trackpad is reconnected (after Mac waking up from sleep), its acceleration and sensitivity are unexpectedly updated. I'll fix it soon.

I also think the default sensitivity is good!

That's great! So this issue can be closed when the two problems above are solved.

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 17, 2022

Have you tried swiping in the other direction while reverse scrolling is enabled? I'm not sure why it stops swiping gestures from working.

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 17, 2022

I can reproduce it with trackpad. I've also noticed that reverse scrolling for Magic Mouse and Trackpad does not work well in Safari, which is an issue of Scroll Reverser as well.

I'm going to re-implement reverse scrolling functionality and I believe it could fix both swiping issues and the ‘Safari’ issue.

@lujjjh
Copy link
Collaborator

lujjjh commented Feb 17, 2022

The issues mentioned above have been resolved in v0.5.1.

Thank you all! Feel free to reopen this issue if the problem still exists :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants