Skip to content
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

Trackpad not working #1

Closed
pankrashin opened this issue Aug 19, 2024 · 3 comments
Closed

Trackpad not working #1

pankrashin opened this issue Aug 19, 2024 · 3 comments

Comments

@pankrashin
Copy link
Owner

As you can see in this guide, I couldn't manage to get the touchpad working. If you have any ideas how to enable touchpad feel free to post it here.

@MinecraftNerrd1337
Copy link

MinecraftNerrd1337 commented Oct 5, 2024

Remove SSDT-HPET and its patches

That fixed the Synaptics trackpad for my Legion.
I'd be able to help further if you gave me your trackpad ID (not PNP0C50, the actual ID)

@pankrashin
Copy link
Owner Author

Remove SSDT-HPET and its patches

That fixed the Synaptics trackpad for my Legion. I'd be able to help further if you gave me your trackpad ID (not PNP0C50, the actual ID)

It worked for me too! You are a hero! Thank you very much!

@MinecraftNerrd1337
Copy link

MinecraftNerrd1337 commented Dec 17, 2024

I think I figured out why SSDT-HPET along with its patches breaks touchpad (which it shouldn't in theory), and I'll explain it with an example

The ACPI handling on those Lenovo Legions is pretty terrible, and one instance of this is the way it reacts when you rename a method that takes arguments:

In an attempt to fix sleep, which I got 90% working now btw, I tried to mod GPRW with an SSDT and a DSDT method rename patch.

When you do this, the GPRW method no longer exists in the DSDT as it's been renamed to XPRW. It is present in a custom SSDT. The thing is, if you've dealt with ACPI in the past, you probably know that every method or other object needs to be declared, either by being defined in the same ACPI table it's being used from, or by being declared in external.
Before the rename, GPRW was defined in the DSDT. Since it was renamed to XPRW, GPRW is no longer defined anywhere in the DSDT.
Fortunately, computers are smart. The way most firmwares seem to react to this is by auto adding a declaration as external, like so:
External (GPRW, MethodObj)
That way, code in the DSDT such as "Return (GPRW (0x0D, 0x00))" knows where to look for GPRW

The issue I noticed with my Legion, is that the firmware was declaring GPRW wrong, as an integer, like so:
External (GPRW, IntObj)
And then, as it cannot invoke an integer with arguments, it'll try to fix it by changing parts of the code that try to call GPRW with complete nonsense:
{
Return (GPRW)
0x0D
0x00
}
Effectively breaking anything GPRW-related.

What I believe must have happened with SSDT-HPET is the IRQ patches that use method renames made the firmware break the code in a similar way, and it ended up affecting the touchpad.
Luckily, those Legion laptops don't need such patches, so SSDT-HPET can be straight up removed from the EFI. If some patches were needed though, they'd have to be implemented differently.

Hope I made everything clear. If you need me to fix anything else with your Legion, feel free to ask me about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants