-
Notifications
You must be signed in to change notification settings - Fork 46
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
QuietTimeAfterTyping works every 10-15th boot #1415
Comments
@witampanstwa: I added some additional debug statements. |
@lvs1974 Console log stream, filtered through "any PS2":
Can't see any keypress events in the console stream though. Was this intended? |
@witampanstwa: sorry for mentioning it now, but I think you filtered my additional messages. |
@lvs1974 Oh, that might've in fact been the case. Although, I'm afraid I don't see any messages like those you mentioned anyway actually console2.txt PS |
@witampanstwa: it is quite strange. |
@lvs1974 |
@witampanstwa: it is much better, at least I can analyse such logs. |
|
@witampanstwa: I would not expect IORegistryExplorer can find anything, I think search is broken there. |
@lvs1974 |
@witampanstwa: anyway, would be nice to have a look at IOReg. |
IOReg dump
|
Actually, when I said this, I looked at the |
And I would try to remove VoodooPS2Mouse.kext and VoodooPS2Trackpad.kext from VoodooPS2Controller.kext!!! |
Oh, didn't know I could modify that; wouldn't this break the signature? |
@witampanstwa: if you load these kexts using bootloader, you cannot break anything! |
Be aware that QuietTimeAfterTyping can be found more than once in one Info.plist, I would set them all to 1500. |
@lvs1974 |
@lvs1974 Yeah, same behaviour still https://user-images.githubusercontent.com/33933917/103934344-1b625100-5125-11eb-9ab1-c23717e13b56.mov |
I tried on my laptop - and it also does not work (in my case I have another class - VoodooI2CPrecisionTouchpadHIDEventDriver, which is inherited from VoodooI2CMultitouchHIDEventDriver, and VoodooI2CMultitouchHIDEventDriver implements the same logic:
Probably I do not understand it all, the way how it should work... |
Probably the best way to clear this up - ask VoodooI2C authors.... |
Yeah, I've been there, on gitter chat, yet Kishor pointed out the issue could indeed be the VoodooPS2 itself |
But now PS2 is not used here, this logic implemented in VoodooI2CELANTouchpadDriver! |
How could it then be, that I did some testing (not reliant on the VoodooInput as I'd installed it as a standalone module so that it would be always at its latest build), and it was the VoodooPS2 2.1.2 which proved guilty (specifically its acidanthera/VoodooPS2@8841fd8 commit), at least in context with its predecessor (2.1.1) which had not failed my tests once... That all is, of course, if only the way I2C communicates with PS2 hadn't changed since the PS2 2.1.1 was released |
From the conversation above to me this looks like there is a race condition in VoodooI2C, which results in the issue you observe. The change in VoodooPS2 only altered the order of the events, and coincidentally made the bug in VoodooI2C more obvious. So far there is no evidence of any real bug in VoodooPS2 as the actions of it are very simple, and the logic is pretty much all in the I2C side. For now I close this until further information is discovered. Feel free to post more details if found. CC @zhen-zen |
@witampanstwa: could you try an attached version, please? |
@lvs1974 Yeah, seems to be working! |
@witampanstwa: fix is already in master: |
The fix is a bit confusing since just to remove the notification source check won't help with a possible race condition issue. Also the For me, it sounds like https://github.com/VoodooI2C/VoodooI2CHID/blob/master/VoodooI2CHID/Info.plist#L103 (processed in init()) is too early and won't be captured. Maybe publish the property in start() could solve the problem. |
@zhen-zen: fix is self-explainable I think. This issue is not related to the moment when RM,deliverNotifications has been published in IOReg. It is only related to notificationHandler and using received INotifier pointer: we cannot reliably compare stored pointer (_publishNotify or _terminateNotify) with received pointer, since we receive a completely different pointer in notifications. I added logging into notificationHandler and notificationHandlerGated and discovered this issue. |
For me it doesn't make sense if returned pointer won't match received ones. Just digged into The handler is invoked in
Which is called from
The
So what passed to the handler should be the same as the return of The The latter one will initialize the Post-install calls to |
As the title says, VoodooPS2Controller's
QuietTimeAfterTyping
feature is loaded quite rarely. This has really intensified in the last couple of months (release 2.1.6 for example, fails only about 50% of the time) and that's why I've started to notice it only just recently.I've narrowed down the culprit of the issue to be acidanthera/VoodooPS2@8841fd8, the very first commit under the 2.1.2 tag (commits coming after this one don't fix the issue).
I'm running Haswell; both Catalina (15.6) and Big Sur (11.1) yield the same behaviour for me.
The text was updated successfully, but these errors were encountered: