linearmouse icon indicating copy to clipboard operation
linearmouse copied to clipboard

Delay before initialization after connecting mouse

Open derekalbert opened this issue 2 years ago • 6 comments

When using linearmouse prior to recent updates, its settings seemed to activate immediately upon connecting my magic mouse to my MacBook Pro. After recent updates, however, there appears to be a delay of about 15-20 seconds before linearmouse adjusts my tracking speed and reduces pointer acceleration upon connecting my mouse.

One additional variable, however, is that I recently upgraded from an Intel to Apple silicon mac.

derekalbert avatar Jul 18 '22 15:07 derekalbert

Could you please check if your Magic Mouse is shown in the device list immediately upon connected?

lujjjh avatar Jul 19 '22 01:07 lujjjh

Thank you for your prompt response.

I watched the sections of the settings window that you indicated, and I can confirm that linearmouse does, right away, switch from the internal trackpad to the magic mouse when it's connected and I start moving it. I already had "Auto switch to the active device" selected. I tried deselecting it and manually switching to the mouse after connecting it and linearmouse still did not kick in right away.

However, upon closer inspection, it actually seems that linearmouse doesn't kick in after connecting the magic mouse at all until I: a) load the linearmouse settings (if closed upon connecting the mouse); b) navigate to another window from the linearmouse settings window (if it was already open when I connected the mouse).

Please let me know if you need further clarification.

derekalbert avatar Jul 19 '22 12:07 derekalbert

Could you please attach the logs (#117) from the time you connect the magic mouse to the time the pointer settings are applied? That will be greatly helpful.

Thank you very much!

lujjjh avatar Jul 19 '22 13:07 lujjjh

Although I cannot reproduce this issue, I'm guessing there is some race conditions causing the pointer settings not being applied when the device is connected.

Would you like to try this build?

lujjjh avatar Jul 19 '22 16:07 lujjjh

No dice, unfortunately. Maybe I'll try unpairing and re-pairing my mouse and seeing if I can get it working. I'll try some things and let you know if any of my troubleshooting resolves the issue.

derekalbert avatar Jul 20 '22 13:07 derekalbert

I have the same issue with Magic Mouse, tracking speed and pointer acceleration settings are not applied when I connect it. But it applies just as I open linearmouse preferences window.

From logs it looks like these settings are applied but they're not. These are my logs when I connect my Magic Mouse (without opening preferences window):

debug	02:41:55.768404+0300	LinearMouse	found no value for key Recording in CFPrefsSearchListSource<0x6000025c2400> (Domain: com.apple.MultitouchSupport, Container: (null))
debug	02:41:55.768883+0300	LinearMouse	found no value for key BrickDevice in CFPrefsSearchListSource<0x6000025c2400> (Domain: com.apple.MultitouchSupport, Container: (null))
debug	02:41:55.812800+0300	LinearMouse	1 factories found for requested plugin type <CFUUID 0x600000bf20e0> 7DDEECA8-A7B4-11DA-8A0E-0014519758EF in plugin CFBundle/CFPlugIn 0x13681a310 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, loaded)
debug	02:41:55.812890+0300	LinearMouse	AddInstanceForFactory: Added instance on 0x600001ef5f40 for <CFUUID 0x600000bf1e20> 13AA9C44-6F1B-11D4-907C-0005028F18D5
debug	02:41:55.812932+0300	LinearMouse	Created instance of plugin for factory <CFUUID 0x600000bf1e20> 13AA9C44-6F1B-11D4-907C-0005028F18D5 type <CFUUID 0x600000bf20e0> 7DDEECA8-A7B4-11DA-8A0E-0014519758EF
debug	02:41:55.823519+0300	LinearMouse	Device initialized: Magic Mouse (VID=0x004C, PID=0x0269): HIDPointerResolution=1596.000000, HIDPointerAccelerationType=HIDMouseAcceleration
debug	02:41:55.823677+0300	LinearMouse	Device added: Magic Mouse (VID=0x004C, PID=0x0269)
debug	02:41:55.824630+0300	LinearMouse	Update pointer acceleration for device: Magic Mouse (VID=0x004C, PID=0x0269): 0.000000
debug	02:41:55.826704+0300	LinearMouse	Update pointer speed for device: Magic Mouse (VID=0x004C, PID=0x0269): 0.070000
error	02:41:55.827714+0300	LinearMouse	Unable to serialize CFObject: Property list invalid for format: 200 (property lists cannot contain objects of type 'CFNull')
debug	02:41:55.831206+0300	LinearMouse	looked up value <private> for key autoSwitchToActiveDevice in CFPrefsPlistSource<0x6000025c4700> (Domain: com.lujjjh.LinearMouse, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) via CFPrefsSearchListSource<0x6000025d0c80> (Domain: com.lujjjh.LinearMouse, Container: (null))
debug	02:41:55.831478+0300	LinearMouse	looked up value <private> for key autoSwitchToActiveDevice in CFPrefsPlistSource<0x6000025c4700> (Domain: com.lujjjh.LinearMouse, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) via CFPrefsSearchListSource<0x6000025d0c80> (Domain: com.lujjjh.LinearMouse, Container: (null))
debug	02:41:55.832210+0300	LinearMouse	_CSCheckFix(11325124,com.lujjjh.LinearMouse/0.7.3)=NOT-APPLIED
debug	02:41:55.834117+0300	LinearMouse	_CSCheckFix(11325124,com.lujjjh.LinearMouse/0.7.3)=NOT-APPLIED
debug	02:41:55.836200+0300	LinearMouse	_CSCheckFix(10507300,com.lujjjh.LinearMouse/0.7.3)=NOT-APPLIED
debug	02:41:55.836270+0300	LinearMouse	_CSCheckFix(40356500,com.lujjjh.LinearMouse/0.7.3)=NOT-APPLIED
debug	02:41:55.837481+0300	LinearMouse	Current device scheme index is updated: Optional(3)
debug	02:41:56.829102+0300	LinearMouse	found no value for key AppleShowScrollBars in CFPrefsSearchListSource<0x6000025d0c80> (Domain: com.lujjjh.LinearMouse, Container: (null))
debug	02:41:56.829224+0300	LinearMouse	looked up value <private> for key MouseVerticalScroll in CFPrefsPlistSource<0x6000025bca00> (Domain: com.apple.driver.AppleBluetoothMultitouch.mouse, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)
debug	02:41:56.829266+0300	LinearMouse	looked up value <private> for key MouseHorizontalScroll in CFPrefsPlistSource<0x6000025bca00> (Domain: com.apple.driver.AppleBluetoothMultitouch.mouse, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)
debug	02:41:56.829307+0300	LinearMouse	looked up value <private> for key com.apple.trackpad.scrollBehavior in CFPrefsPlistSource<0x6000025c4780> (Domain: kCFPreferencesAnyApplication, User: kCFPreferencesCurrentUser, ByHost: Yes, Container: (null), Contents Need Refresh: No) via CFPrefsSearchListSource<0x6000025d0c80> (Domain: com.lujjjh.LinearMouse, Container: (null))
debug	02:41:57.055785+0300	LinearMouse	Last active device changed: Magic Mouse (VID=0x004C, PID=0x0269), category=mouse (Reason: Received event from DeviceManager)
debug	02:41:57.056932+0300	LinearMouse	Active scheme is updated: {"pointer":{"acceleration":0,"speed":0.07000000000000001,"disableAcceleration":false},"if":{"app":"com.apple.Console","device":{"productName":"Magic Mouse","serialNumber":"","productID":"0x269","category":"mouse","vendorID":"0x4c"}}}

LinearMouse 0.7.3 MacOS 12.5.1 Apple M1

Farianit avatar Sep 01 '22 23:09 Farianit

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 02 '22 01:11 github-actions[bot]

Fixed in v0.7.6-beta.1.

lujjjh avatar Dec 28 '22 06:12 lujjjh