xxxzc / xps15-9570-macos

macOS Monterey/Ventura on XPS15-9570 with OpenCore
194 stars 28 forks source link

The touchscreen can work great in polling mode! You should re-enable it. #74

Closed Drowningfish223 closed 3 years ago

Drowningfish223 commented 3 years ago

Thanks for your work @xxxzc! A few commits ago, you said that you switched the touchscreen to polling mode, but it looks like you've since switched it back. I'm not sure what polling mode is, but I know that it uses way less energy resources than the default mode. In my testing, polling mode seems to save between 8-10 watts. As a result, I was able to keep the touchscreen enabled by default with very little battery life penalty. Even though I rarely use the touchscreen, it is nice not to have to reboot the laptop and enable a different ssdt every time I want to use it.

However, you also removed the USTP to one patch in that commit, which led to the trackpad and the touchscreen lagging occasionally. Adding the patch back fixed the issue for me!

On a separate note, does anybody's laptop turn on with just a keyboard press when it sleeps with the lid open? Mine requires a power button press and a keyboard press to turn on. Is that just me?

xxxzc commented 3 years ago

Thank you. Can you update VoodooI2C to 2.6 and see if everything works fine?

shasen1235 commented 3 years ago

Tried 2.6 with only trackpad enabled. First impression: kernel_task seems to be lower than 2.5.2 2.5.2: 5~ 10% at idle, 10% in use 2.6.0: 1~ 2% at idle, 4~8% in use

So far all gestures work as usual and maybe generally a bit more stable? I will bring this laptop to work tomorrow and see how it performs in a whole day usage. Also the touchscreen, I'll give it another shot to see if it still causes any problem. Would be nice to have both of them working without much sacrifice in terms of battery or usability.

=== Edit: Tried 2.6 with touchscreen enabled, got 2~3 times more kernel_task usage even without touching the screen on both idle and in use. I'll stick with trackpad only for now.

Drowningfish223 commented 3 years ago

2.6 works the same for me. kernel_task idles at 2-3% for me and jumps to 10-12% when I use the touchscreen or trackpad.

M69W commented 3 years ago

@Drowningfish223 @xxxzc let me tested it yesterday that lagging occasionally fixed atfer added USTP Patch back. works fine with 2.6

USTP patch

<dict>
                <key>Comment</key>
                <string>Rename USTP to One, pair with SSDT-I2CX</string>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                VVNUUBA=
                </data>
                <key>Replace</key>
                <data>
                AaOjoxA=
                </data>
            </dict>
shasen1235 commented 3 years ago

A bit off topic but today I found something interesting. https://github.com/VoodooSMBus/VoodooRMI

Basically a full Linux RMI driver port for macOS. Tried it a whole day and it seems to work quite well and a bit more responsive if not mistaken? Touchscreen still works in polling mode as usual. Kernel_task doesn't go crazy either.

Nevermind, there are two main benefits over just VoodooI2C -We no longer need to deal with ACPI It needs no ACPI patch, just inject after VoodooI2C and BOOM a working trackpad, hustle free!

-More gestures supported When using just VoodooI2C, I never get three finger left tap of middle tap in BetterTouchTool to work, now it's fully functional:D

A little down side is that four fingers pinch to expand launch pad seems to be a bit harder to trigger?

For now I wouldn't recommend this to all user since it's still under development, but it's worth to keep an eye on.

M69W commented 3 years ago

@shasen1235 interesting finding. The two touch devices both run well in GPIO interrupt mode with SSDT-OCI2C0-TP02-touchscreen.aml and VoodooI2C releases 2.6.1 . But show that three devices: image image image

I don't know how to remove a fake device with this SSDT and let them work well in GPIO interrupt mode. SSDT-OCI2C0-TP02-touchscreen.aml.zip

shasen1235 commented 3 years ago

The two touch devices both run well in GPIO interrupt mode with SSDT-OCI2C0-TP02-touchscreen.aml and VoodooI2C releases 2.6.1 . But show that three devices:

It works great on my machine too. If you compile the .aml, there are some warnings so maybe we need to check if there's any structural error. Also, I think there are some problems in "Darwin only" code that prevents me from booting into Windows.

==== Not a SSDT expert but I did a quick and rough edit on the .aml you uploaded SSDT-OCI2C0-TP02-touchscreen.aml.zip

Phantom device still exists and I don't know if this is the proper way, but at least now it doesn't inject code to Windows or any other OS.