lietxia / XiaoXinAir14IML_2019_hackintosh

小新Air14 2019款 i5 10210u黑苹果
BSD 3-Clause "New" or "Revised" License
138 stars 20 forks source link

TouchPad in Pinning mode #13

Closed Hasodikis closed 3 years ago

Hasodikis commented 3 years ago

Hi Lietxia.

I tested the touchpad ssdt you uploaded on Mariano's repo. I can confirm that touchpad works in pinning mode on my ideapad s540-14IWL (Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz), but the cursor movement is laggy and the CPU utilization very high. I tried to modify it based on my DSDT and although it still works after my noobish modifications, the same problems persist.

Do you think there is any chance for a solution or is it a faulty GPIO implementation for our laptops and it'a a lost cause?

This touchpad - pinning mode bothers me a lot because its literally the last step for a perfectly working Ideahack!!!

In polling mode it works but the cpu utilization is higher than normal and it consumes a lot of energy.

lietxia commented 3 years ago

hi, Hasodikis

I tried various methods before releasing the TouchPad patch and could not solve the laggy problem. I also have the laggy problem.

I asked the person who knows voodooi2c best in China, and he said it was a delay caused by abnormal GPIO interruption. But he was too busy to help me solve the problem carefully.

I still have no clue after many attempts myself.

Hasodikis commented 3 years ago

Thank you for the reply. I will mark this as closed.....

p.s. on your laptop do you have a battery maximum capacity fluctuation? For example: yesterday my maximum battery capacity was at 77 %.... now its at 62.2 %. If I charge it, run it on battery and recharge it, it will go up. After a while it will reach 77-78% and then again if I run on battery and restart a few times on battery it will drop to 62-64 %......

Screenshot 2021-01-10 at 9 17 55 AM

It drives me crazy.... Is it a faulty battery or is it something else in your opinion?

lietxia commented 3 years ago

I've been so busy with work lately that I haven't paid too much attention to these detailed parts. I'll try to test it out.

lietxia commented 3 years ago

I tested it for some time and restarted my computer many times and the maximum power capacity of my computer did not change. image

Hasodikis commented 3 years ago

Hi. Could you please tell me which patches (if any) you have implemented for the SSDT-TPAD? Is it just that SSDT or it is connected to config.plist patch or another SSDT?

I need to clear everything so that I can try to debug it......

Hasodikis commented 3 years ago

Lietxia why do I lose F11-F12 functionality when I remove your SSDT-TPAD-Air14IML? The touchpad still works but I cannot adjust brightness with f11 - f12

marianopela commented 3 years ago

I asked the person who knows voodooi2c best in China, and he said it was a delay caused by abnormal GPIO interruption. But he was too busy to help me solve the problem carefully.

Hi, I wonder who that might be. Was it maybe Goshin or Zhen-zen (just guessing)? I asked Ben Raz, and he too thinks 0x12 might just be a pin related to some other device, and as a consequence interrupt rate doesn't match the input

With a bit of research, I found this (which, accidentally, is our same device) in which basically what it's said is that:

A GPIO pin can be in ACPI mode, which means it cannot be used for interrupts.
When enabling an interrupt we perform this check, and if it's in ACPI mode we see the pin XXX cannot be used as IRQ message.
Apparently calling SHPO gets it out of ACPI mode and allows us to use the pin for interrupts.

I talked to Ben, and he said this

Someone might need to analyze the SHPO ACPI method to learn how to make GPIO pins usable as IRQ
If we can tell what SHPO does with Arg0 to put the pin out of ACPI mode, we can, in theory, mimic it.
Alternatively, you have I2C3.TPD0 I2C3.TPL1.
Each should have the INT1 field that has their GPIO pin.
If either has 0x38 too, we can find which value you need to pass to SHPO
You can try messing with ACPIDebug.kext to get their values

Seems fun, and I guess we found some more playground to keep ourselves busy

Hasodikis commented 3 years ago

Lietxia can you guide me on how I can remap F11-F12 for brightness ? I use your EFI to try to fix touchpad, but when I remove your SSDT-TPAD I lose F11-f12 functionality This is the EFI ...... I cannot explain it EFI.zip

lietxia commented 3 years ago

Hi. Could you please tell me which patches (if any) you have implemented for the SSDT-TPAD? Is it just that SSDT or it is connected to config.plist patch or another SSDT?

I need to clear everything so that I can try to debug it......

I only created a new virtual touchpad device TPXX, the content is the same as the TPADdevice, modified the pin to 12, and let the _CRS method return using SBFG

Hasodikis commented 3 years ago

There are several differences between your SSDT and the relevant section of my DSDT, minor but several. However even if i stream out the diefferences, the results are still the same.

I also tried several other pins with no luck....

lietxia commented 3 years ago

Lietxia can you guide me on how I can remap F11-F12 for brightness ? I use your EFI to try to fix touchpad, but when I remove your SSDT-TPAD I lose F11-f12 functionality This is the EFI ...... I cannot explain it EFI.zip

The key F11 F12 is mapped to the brightness adjustment function key via SSDT-RMCF.aml You can watch this https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/wiki/How-to-Use-Custom-Keyboard-Mapping

Hasodikis commented 3 years ago

I can see that... the question is why this mapping fails if i remove your TPAD SSDT........ I cannot understand this..

(I only removed SSDT-RMCF.aml from the EFI above after I decided to install brightness kext.)

lietxia commented 3 years ago

There are several differences between your SSDT and the relevant section of my DSDT, minor but several. However even if i stream out the diefferences, the results are still the same.

I also tried several other pins with no luck....

I was looking up the DSDT inside and wrote the pin value of the SBFG device, there are 5 of them, where pin=12 works. But not perfect.

lietxia commented 3 years ago

I can see that... the question is why this mapping fails if i remove your TPAD SSDT........ I cannot understand this..

(I only removed SSDT-RMCF.aml from the EFI above after I decided to install brightness kext.)

It should be a problem elsewhere, SSDT-TPAD does not affect the brightness adjustment.

Hasodikis commented 3 years ago

OK thanks... I will try to sort it out and report back

lietxia commented 3 years ago

I asked the person who knows voodooi2c best in China, and he said it was a delay caused by abnormal GPIO interruption. But he was too busy to help me solve the problem carefully.

Hi, I wonder who that might be. Was it maybe Goshin or Zhen-zen (just guessing)? I asked Ben Raz, and he too thinks 0x12 might just be a pin related to some other device, and as a consequence interrupt rate doesn't match the input

With a bit of research, I found this (which, accidentally, is our same device) in which basically what it's said is that:

A GPIO pin can be in ACPI mode, which means it cannot be used for interrupts.
When enabling an interrupt we perform this check, and if it's in ACPI mode we see the pin XXX cannot be used as IRQ message.
Apparently calling SHPO gets it out of ACPI mode and allows us to use the pin for interrupts.

I talked to Ben, and he said this

Someone might need to analyze the SHPO ACPI method to learn how to make GPIO pins usable as IRQ
If we can tell what SHPO does with Arg0 to put the pin out of ACPI mode, we can, in theory, mimic it.
Alternatively, you have I2C3.TPD0 I2C3.TPL1.
Each should have the INT1 field that has their GPIO pin.
If either has 0x38 too, we can find which value you need to pass to SHPO
You can try messing with ACPIDebug.kext to get their values

Seems fun, and I guess we found some more playground to keep ourselves busy

Thanks for your advice, I have some new ideas, I'll try again when I'm free from work.

lietxia commented 3 years ago

Lietxia can you guide me on how I can remap F11-F12 for brightness ? I use your EFI to try to fix touchpad, but when I remove your SSDT-TPAD I lose F11-f12 functionality This is the EFI ...... I cannot explain it EFI.zip

I looked at your EFI and if you are using SSDT-XOSI you will need additional patches to get F11 F12 to work properly.

download this : https://github.com/lietxia/XiaoXinAir14IML_2019_hackintosh/releases/download/2020.04.05/2020_04_05.zip

edit config.plist load SSDT-BKEY.AML edit ACPI -> patch commit find replace
_Q11 to XQ11 5F513131 58513131
_Q12 to XQ12 5F513132 58513132
Hasodikis commented 3 years ago

Thanks alot mate .... !!!! Thanks.....

The only thing left to do now is the cursed touchpad. Other than that I think that we are at the pick of the configuration .

win1010525 commented 3 years ago

Work fine now with 0x50.