Open al3xtjames opened 6 years ago
Hello TheRacerMaster,
How are you?
It's nice to see you provide such a nice information. So we need to add some patches here for enabling EW mode while scrolling then disable it while we do other gestures right?
Regards, syscl
I'm doing OK. Based off RehabMan's description, I think DynamicEWMode should be disabling EW mode when it detects two fingers (or less). Conditionally re-enabling EW mode for 3/4 finger gestures should fix this:
diff --git a/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp b/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
index 7e667da..8e5f535 100644
--- a/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
+++ b/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
@@ -1432,6 +1432,23 @@ void ApplePS2SynapticsTouchPad::dispatchEventsWithPacket(UInt8* packet, UInt32 p
yraw = yraw * xupmm / yupmm;
int z = packet[2];
int f = z>z_finger ? w>=4 ? 1 : w+2 : 0; // number of fingers
+
+ // theracermaster: When DynamicEWMode is set, enable EW mode for 3/4 finger gestures
+ if (_dynamicEW && _extendedwmodeSupported)
+ {
+ if (!_extendedwmode && f > 2)
+ {
+ setModeByte(_touchPadModeByte | (1<<2));
+ _extendedwmode = true;
+ }
+ // Disable EW mode for 1/2 fingers
+ else if (_extendedwmode && f <= 2)
+ {
+ setModeByte(_touchPadModeByte & ~(1<<2));
+ _extendedwmode = false;
+ }
+ }
+
////int v = w; // v is not currently used... but maybe should be using it
if (_extendedwmode && _reportsv && f > 1)
{
@@ -3607,4 +3624,3 @@ bool ApplePS2SynapticsTouchPad::setTouchpadLED(UInt8 touchLED)
return 12 == request.commandsCount;
}
-
I can use gestures and scrolling performance is the same. However, I am not sure if this is efficient. When using gestures (back/forwards with three fingers), kernel_task's CPU usage spikes to ~20% in Activity Monitor. When using your version of VoodooPS2Controller (with DynamicEWMode disabled), I do not get such CPU usage spikes. Perhaps there is a better approach? Can you replicate this?
Thank you Racer! I will try it today and let you know!
And I will test this on some other laptops as well :)
Have a good day, syscl
As described by RehabMan in the README, enabling DynamicEWMode (via ACPI) significantly improves scrolling performance.
However, this breaks gesture inputs. They can still be triggered by clicking the trackpad while inputting the gesture, but this is not ideal (nor is it usable).