Closed sensires closed 2 months ago
Sometimes a macOS update can take an extra reboot to get these APIs running smoothly.
If you've already done an extra reboot and you still have an issue, then you can reset the accessibility permissions for Multitouch and that might fix it, too.
You could use the Terminal to execute tccutil reset All com.brassmonkery.Multitouch
instead of step 2.
Let me know if you still have the issue; it might be timing.
So I have reboot more than a dozen times, and followed your 3 steps to no avail.
I do believe it to be a timing issue - my two AppleScript applications that reset my display profile / brightness and audio output device selection, set to run as Login Items, both started variably prompting errors "ScriptMonitor.app can't be opened" "The action 'run applescript' encountered an error: 'image events got an error: application isn’t running.'" after upgrading to Sequoia.
I tried resetting their privacy permissions, re-saving the applications and modifying my scripts to add conditions to ascertain the various processes were properly activated and running before performing any System Event accessibility actions. All didn't work. I had to add a crude 10 second delay right at the top of my script to allow macOS time to load and do all it needs - which I assume Apple changed rather substantially - before executing the rest of my scripts. Only then have my scripts worked again.
Let me know if the timing hypothesis is correct, if there is anything I can do or if the issue needs a Multitouch update to make the Magic Mouse detection (at macOS startup) more robust given the potentially changed macOS startup mechanics/timings? Thanks.
Thanks for the effort & detail. Would you mind testing this beta?
Yup here are my observations - tl;dr didn't work:
After installation & reboot:
First Login: System Settings crashed (whether caused by my login AppleScripts and/or Multitouch unknown) > Force Quit > Relaunch > Reset Privacy Permissions for Multitouch (which I guess I should have done prior to reboot given app signature changed)
Second Login: No login issues, but Magic Mouse still not detected with Multitouch start on login
Third Login: Magic Mouse only connected 20-25s after login (as indicated by the HUD overlay notification - doesn't usually appear after login as it is usually already connected prior to login at the login screen) for whatever reason, Magic Mouse (understandably) not detected with Multitouch start on login.
Fourth & Fifth Login: No login issues, but Magic Mouse still not detected with Multitouch start on login
Bummer. Thanks, though! I'll post back when I have something else worth trying.
Ok hopefully this will be fixed soon.
For the moment I've resorted to turning off Start on login and launching Multitouch via a login items AppleScript app with a 10s delay.
If you don't mind, please try this one and let me know how it goes.
https://www.multitouch.app/downloads/multitouch1.27.39.dmg
In this version, you can configure a device listening delay (the default is 4 seconds).
defaults write com.brassmonkery.Multitouch deviceListenDelay -float 10
Of course, you can change that from 10 to a different number.
Let me know what you find.
Post v1.27.39 installation & reboot (without modifying the Multitouch default initially):
Logins 1-4: Ok - Multitouch Magic Mouse detection worked with Start on Login. I also took the chance to optimise the delay for my own login script-apps down from 10s to 5s prior to first reboot - all worked too without throwing script monitor errors.
Login 5: Failed - detection with Start on Login. My personal script-apps still worked fine on 5s though. Modified deviceListenDelay to 8.
Logins 6-8: Ok.
Login 9: Failed - detection with Start on Login. Modified deviceListenDelay to 10.
Logins 10-14: Ok. Keeping on 10s for now - will report back if detection fails frequently even on 10s. Otherwise, this is good enough a stop-gap for me personally. Cheers!
Great, thanks for the thorough testing! I think I have a clear enough picture now that I can put in a proper fix and you won't have to think about this one in the future.
As a side note, I don't see this at all on my end - it works properly without any changes. I'm curious what's different about your setup, but there's not really a good way to narrow down all of the things that could affect hardware detection.
Thanks! Looking forward to the more robust Magic Mouse detection for start on login.
Ok, so this latest release has improved the robustness of the device detection.
You can update within the app or from here: https://www.multitouch.app/downloads/multitouch1.27.40.dmg
It has a couple of adjustments, one of which will poll based off of the deviceListenDelay
setting. So you could set that to a lower number and it would try 5 times, spaced on that delay.
Another adjustment should make that unnecessary, though, and it should just properly register without having to poll.
In the menu bar menu, you can select help -> debug -> launch log viewer on start, and this would show us if the proper adjustment works or if it ends up polling when you reboot. (You would have to go back in and click on that menu item again to turn off the log viewer launching on start again)
v1.27.40 - Ok so the detection with start on login worked as tested through 5 reboot-logins, but I am not sure if it is the 'other' adjustment you spoke of or the polling (which I reduced to 5s) that worked. Issue is resolved by my view, barring any other abnormal observations. Thanks!
For your reference:
Login 1 2024-09-23T15:25:11+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:25:11+08:00: Found device: 1452 834 51 2024-09-23T15:25:11+08:00: Registering device type internalTrackpad2 with location id 51. 2024-09-23T15:25:11+08:00: Registering device type internalTrackpad2 with device id 216172782113783859. 2024-09-23T15:25:12+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:25:17+08:00: Check for devices 5 2024-09-23T15:25:17+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:25:19+08:00: Found device: 76 617 1027097337 2024-09-23T15:25:19+08:00: Registering device type magicMouse2 with location id 1027097337. 2024-09-23T15:25:19+08:00: Registering device type magicMouse2 with device id 288230377178809081. 2024-09-23T15:25:20+08:00: Failed to initialize Magic Mouse from device id: 288230377178809081, attempts remaining: 4. 2024-09-23T15:25:21+08:00: Registered Magic Mouse with id: 288230377178809081
Login 2 2024-09-23T15:29:33+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:29:33+08:00: Found device: 1452 834 51 2024-09-23T15:29:33+08:00: Registering device type internalTrackpad2 with location id 51. 2024-09-23T15:29:33+08:00: Registering device type internalTrackpad2 with device id 216172782113783859. 2024-09-23T15:29:34+08:00: Found device: 76 617 1027097337 2024-09-23T15:29:34+08:00: Registering device type magicMouse2 with location id 1027097337. 2024-09-23T15:29:34+08:00: Registering device type magicMouse2 with device id 288230377178809081. 2024-09-23T15:29:35+08:00: Failed to initialize Magic Mouse from device id: 288230377178809081, attempts remaining: 4. 2024-09-23T15:29:36+08:00: Registered Magic Mouse with id: 288230377178809081
Login 3 2024-09-23T15:33:00+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:33:00+08:00: Found device: 1452 834 51 2024-09-23T15:33:00+08:00: Registering device type internalTrackpad2 with location id 51. 2024-09-23T15:33:00+08:00: Registering device type internalTrackpad2 with device id 216172782113783859. 2024-09-23T15:33:01+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:33:05+08:00: Found device: 76 617 1027097337 2024-09-23T15:33:05+08:00: Registering device type magicMouse2 with location id 1027097337. 2024-09-23T15:33:05+08:00: Registering device type magicMouse2 with device id 288230377178809081. 2024-09-23T15:33:05+08:00: Check for devices 5 2024-09-23T15:33:05+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:33:06+08:00: Failed to initialize Magic Mouse from device id: 288230377178809081, attempts remaining: 4. 2024-09-23T15:33:07+08:00: Registered Magic Mouse with id: 288230377178809081
Login 4 2024-09-23T15:37:16+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:37:17+08:00: Found device: 76 617 1027097337 2024-09-23T15:37:17+08:00: Registering device type magicMouse2 with location id 1027097337. 2024-09-23T15:37:17+08:00: Registering device type magicMouse2 with device id 288230377178809081. 2024-09-23T15:37:17+08:00: Found device: 1452 834 51 2024-09-23T15:37:17+08:00: Registering device type internalTrackpad2 with location id 51. 2024-09-23T15:37:17+08:00: Registering device type internalTrackpad2 with device id 216172782113783859. 2024-09-23T15:37:18+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:37:18+08:00: Failed to initialize Magic Mouse from device id: 288230377178809081, attempts remaining: 4. 2024-09-23T15:37:19+08:00: Registered Magic Mouse with id: 288230377178809081
Login 5 2024-09-23T15:38:42+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:38:42+08:00: Found device: 1452 834 51 2024-09-23T15:38:42+08:00: Registering device type internalTrackpad2 with location id 51. 2024-09-23T15:38:42+08:00: Registering device type internalTrackpad2 with device id 216172782113783859. 2024-09-23T15:38:43+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:38:47+08:00: Found device: 76 617 1027097337 2024-09-23T15:38:47+08:00: Registering device type magicMouse2 with location id 1027097337. 2024-09-23T15:38:47+08:00: Registering device type magicMouse2 with device id 288230377178809081. 2024-09-23T15:38:47+08:00: Check for devices 5 2024-09-23T15:38:47+08:00: Registering device type internalTrackpad2 with device id 144115188075855923. 2024-09-23T15:38:48+08:00: Failed to initialize Magic Mouse from device id: 288230377178809081, attempts remaining: 4. 2024-09-23T15:38:49+08:00: Registered Magic Mouse with id: 288230377178809081
Awesome, this is really helpful, thanks!
This is signaling that my adjustment has worked and there is no need for the polling mechanism although I will leave the polling in place as a failsafe. I have one small adjustment to make that should remove the failed initialization and single retry.
This also means that the Magic Mouse will be detected by Multitouch at the time that it is detected by macOS (rather than having any sort of delay by means of polling).
I suspect that your scripts did have a role in making Multitouch "miss" the detection of the Magic Mouse, but it exposed a fragile part of Multitouch that had potential to fail regardless.
Thanks again! Let me know if anything else comes up.
I have Multitouch set to Start on login.
On update to macOS Sequoia, Multitouch will fail to detect my Magic Mouse, displaying the "No Magic Mouse Detected" notification in the button right corner of the Magic Mouse config pane.
I have to quit Multitouch post-start up, manually start it again, then it will detect my Magic Mouse and allow all configured gestures to work.