ACPI: EC: Add quirk for Lenovo Yoga S740-14IIL
Subsystems (2)
PATCH 1/1 ACPI: EC: Add quirk for Lenovo Yoga S740-14IIL
On the Lenovo Yoga S740-14IIL (81RS, BIOS BYCN29WW), the ECDT advertises GPE 0x6E for the embedded controller, but the EC is actually wired to GPE 0x43, which is what the DSDT EC0 device's _GPE method returns. Since the ECDT and DSDT EC share the same command/data ports (0x66/0x62), acpi_ec_add() keeps the ECDT GPE, so no EC events are ever handled:
ACPI: EC: GPE=0x6e
/sys/firmware/acpi/interrupts/gpe6E: 0 EN enabled unmasked /sys/firmware/acpi/interrupts/gpe43: 0 EN STS invalid unmasked
GPE 0x6E never fires, while GPE 0x43 is left enabled with its status bit set and no handler, so each SCI it raises is counted in sci_not (about 7/s, 1.4 million over 55 hours of uptime). As a result, EC query events are lost: the brightness hotkeys and several other Fn hotkeys produce no input events at all, and battery/AC notifications/ laptop lid event are not delivered.
Add the machine to ec_dmi_table so that the DSDT GPE is used.
Tested by overriding the ECDT through the initrd with a copy whose GPE was changed from 0x6E to 0x43, and later by applying this patch and removing the override. With the fix the kernel reports "ACPI: EC: GPE=0x43", gpe43 receives events, sci_not stays at 0, and the brightness and other Fn hotkeys work.
--- drivers/acpi/ec.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/acpi/ec.c +10 -0
@@ -2007,6 +2007,16 @@ static const struct dmi_system_id ec_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "HP 250 G7 Notebook PC"), }, }, + { +/* +* Lenovo Yoga S740-14IIL +*/ + .callback = ec_honor_dsdt_gpe, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga S740-14IIL"), + }, + }, {/* * Samsung hardware
Signature · 1 line
2.54.0
Quoted 46 lines · Amir Sabbaghi
On the Lenovo Yoga S740-14IIL (81RS, BIOS BYCN29WW), the ECDT advertises GPE
0x6Efor the embedded controller, but the EC is actually wired to GPE0x43, which is what the DSDT EC0 device's_GPEmethod returns. Since the ECDT and DSDT EC share the same command/data ports (0x66/0x62),acpi_ec_add()keeps the ECDT GPE, so no EC events are ever handled:ACPI: EC: GPE=0x6e
/sys/firmware/acpi/interrupts/gpe6E: 0 EN enabled unmasked /sys/firmware/acpi/interrupts/gpe43: 0 EN STS invalid unmaskedGPE
0x6Enever fires, while GPE0x43is left enabled with its status bit set and no handler, so each SCI it raises is counted insci_not(about 7/s, 1.4 million over 55 hours of uptime). As a result, EC query events are lost: the brightness hotkeys and several other Fn hotkeys produce no input events at all, and battery/AC notifications/ laptop lid event are not delivered.Add the machine to
ec_dmi_tableso that the DSDT GPE is used.Tested by overriding the ECDT through the initrd with a copy whose GPE was changed from
0x6Eto0x43, and later by applying this patch and removing the override. With the fix the kernel reports "ACPI: EC: GPE=0x43", gpe43 receives events,sci_notstays at 0, and the brightness and other Fn hotkeys work.Signed-off-by Amir Sabbaghi <[email protected]>--- drivers/acpi/ec.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/acpi/ec.c +4
-0@@ -2007,6 +2007,16 @@ static const struct dmi_system_id ec_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "HP 250 G7 Notebook PC"), }, }, + { +/* +* Lenovo Yoga S740-14IIL +*/
drivers/acpi/ec.c static const struct dmi_system_id ec_dmi_table[] __initconst = {
Quoted 10 lines
drivers/acpi/ec.c +6
-1+ .callback = ec_honor_dsdt_gpe, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga S740-14IIL"), + }, + }, {/* * Samsung hardware --
Applied as 7.5 material, thanks!