* [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S
@ 2025-04-01 13:38 Mario Limonciello
2025-04-01 13:48 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2025-04-01 13:38 UTC (permalink / raw)
To: mario.limonciello, rafael; +Cc: Xino JS1 Ni, Antheas Kapenekakis, linux-acpi
From: Mario Limonciello <mario.limonciello@amd.com>
When AC adapter is unplugged or plugged in EC wakes from
HW sleep but APU doesn't enter back into HW sleep.
The reason this happens is that when APU exits HW sleep the power rails
the EC controls will power up the TCON. The TCON has a GPIO that will
be toggled during this time. The GPIO is not marked as a wakeup source,
however GPIO controller still has an unserviced interrupt. Unserviced
interrupts will block entering HW sleep again. Clearing the GPIO doesn't
help as the TCON continues to assert it until it's been initialized by
i2c-hid.
Fixing this would require TCON F/W changes and it's already broken
in the wild on production hardware.
To avoid triggering this issue add a quirk to avoid letting EC wake
up system at all. The power button still works properly on this system.
Cc: Xino JS1 Ni <nijs1@lenovo.com>
Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3929
Link: https://github.com/bazzite-org/patchwork/commit/95b93b2852718ee1e808c72e6b1836da4a95fc63
Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v2:
Add more tags
Fix a typo and grammar in commit
---
drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8db09d81918fb..3c5f34892734e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
},
},
+ /*
+ * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
+ * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
+ */
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
+ }
+ },
{ },
};
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S
2025-04-01 13:38 [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S Mario Limonciello
@ 2025-04-01 13:48 ` Rafael J. Wysocki
2025-04-01 14:18 ` Mario Limonciello
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-04-01 13:48 UTC (permalink / raw)
To: Mario Limonciello
Cc: mario.limonciello, rafael, Xino JS1 Ni, Antheas Kapenekakis,
linux-acpi
On Tue, Apr 1, 2025 at 3:39 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> When AC adapter is unplugged or plugged in EC wakes from
> HW sleep but APU doesn't enter back into HW sleep.
>
> The reason this happens is that when APU exits HW sleep the power rails
> the EC controls will power up the TCON.
I think that the above should be
"The reason this happens is that, when the APU exits HW sleep, the
power rails controlled by the EC will power up the TCON."
If I'm not mistaken, please let me know and I'll make this change when
applying the patch.
> The TCON has a GPIO that will
> be toggled during this time. The GPIO is not marked as a wakeup source,
> however GPIO controller still has an unserviced interrupt. Unserviced
> interrupts will block entering HW sleep again. Clearing the GPIO doesn't
> help as the TCON continues to assert it until it's been initialized by
> i2c-hid.
>
> Fixing this would require TCON F/W changes and it's already broken
> in the wild on production hardware.
>
> To avoid triggering this issue add a quirk to avoid letting EC wake
> up system at all. The power button still works properly on this system.
>
> Cc: Xino JS1 Ni <nijs1@lenovo.com>
> Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3929
> Link: https://github.com/bazzite-org/patchwork/commit/95b93b2852718ee1e808c72e6b1836da4a95fc63
> Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> v2:
> Add more tags
> Fix a typo and grammar in commit
> ---
> drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index 8db09d81918fb..3c5f34892734e 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
> DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
> },
> },
> + /*
> + * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
> + * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
> + */
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
> + }
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
> + }
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
> + }
> + },
> + {
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
> + }
> + },
> { },
> };
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S
2025-04-01 13:48 ` Rafael J. Wysocki
@ 2025-04-01 14:18 ` Mario Limonciello
2025-04-07 18:01 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2025-04-01 14:18 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: mario.limonciello, Xino JS1 Ni, Antheas Kapenekakis, linux-acpi
On 4/1/2025 8:48 AM, Rafael J. Wysocki wrote:
> On Tue, Apr 1, 2025 at 3:39 PM Mario Limonciello <superm1@kernel.org> wrote:
>>
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> When AC adapter is unplugged or plugged in EC wakes from
>> HW sleep but APU doesn't enter back into HW sleep.
>>
>> The reason this happens is that when APU exits HW sleep the power rails
>> the EC controls will power up the TCON.
>
> I think that the above should be
>
> "The reason this happens is that, when the APU exits HW sleep, the
> power rails controlled by the EC will power up the TCON."
>
> If I'm not mistaken, please let me know and I'll make this change when
> applying the patch.
Sounds good, thanks!
>
>> The TCON has a GPIO that will
>> be toggled during this time. The GPIO is not marked as a wakeup source,
>> however GPIO controller still has an unserviced interrupt. Unserviced
>> interrupts will block entering HW sleep again. Clearing the GPIO doesn't
>> help as the TCON continues to assert it until it's been initialized by
>> i2c-hid.
>>
>> Fixing this would require TCON F/W changes and it's already broken
>> in the wild on production hardware.
>>
>> To avoid triggering this issue add a quirk to avoid letting EC wake
>> up system at all. The power button still works properly on this system.
>>
>> Cc: Xino JS1 Ni <nijs1@lenovo.com>
>> Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
>> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3929
>> Link: https://github.com/bazzite-org/patchwork/commit/95b93b2852718ee1e808c72e6b1836da4a95fc63
>> Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
>> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>> v2:
>> Add more tags
>> Fix a typo and grammar in commit
>> ---
>> drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
>> index 8db09d81918fb..3c5f34892734e 100644
>> --- a/drivers/acpi/ec.c
>> +++ b/drivers/acpi/ec.c
>> @@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
>> DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
>> },
>> },
>> + /*
>> + * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
>> + * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
>> + */
>> + {
>> + .matches = {
>> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
>> + }
>> + },
>> + {
>> + .matches = {
>> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
>> + }
>> + },
>> + {
>> + .matches = {
>> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
>> + }
>> + },
>> + {
>> + .matches = {
>> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
>> + }
>> + },
>> { },
>> };
>>
>> --
>> 2.43.0
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S
2025-04-01 14:18 ` Mario Limonciello
@ 2025-04-07 18:01 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-04-07 18:01 UTC (permalink / raw)
To: Mario Limonciello
Cc: Rafael J. Wysocki, mario.limonciello, Xino JS1 Ni,
Antheas Kapenekakis, linux-acpi
On Tue, Apr 1, 2025 at 4:18 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> On 4/1/2025 8:48 AM, Rafael J. Wysocki wrote:
> > On Tue, Apr 1, 2025 at 3:39 PM Mario Limonciello <superm1@kernel.org> wrote:
> >>
> >> From: Mario Limonciello <mario.limonciello@amd.com>
> >>
> >> When AC adapter is unplugged or plugged in EC wakes from
> >> HW sleep but APU doesn't enter back into HW sleep.
> >>
> >> The reason this happens is that when APU exits HW sleep the power rails
> >> the EC controls will power up the TCON.
> >
> > I think that the above should be
> >
> > "The reason this happens is that, when the APU exits HW sleep, the
> > power rails controlled by the EC will power up the TCON."
> >
> > If I'm not mistaken, please let me know and I'll make this change when
> > applying the patch.
>
> Sounds good, thanks!
Now applied as 6.15-rc material with the above modification and some
other minor edits in the changelog.
Thanks!
> >> The TCON has a GPIO that will
> >> be toggled during this time. The GPIO is not marked as a wakeup source,
> >> however GPIO controller still has an unserviced interrupt. Unserviced
> >> interrupts will block entering HW sleep again. Clearing the GPIO doesn't
> >> help as the TCON continues to assert it until it's been initialized by
> >> i2c-hid.
> >>
> >> Fixing this would require TCON F/W changes and it's already broken
> >> in the wild on production hardware.
> >>
> >> To avoid triggering this issue add a quirk to avoid letting EC wake
> >> up system at all. The power button still works properly on this system.
> >>
> >> Cc: Xino JS1 Ni <nijs1@lenovo.com>
> >> Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
> >> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3929
> >> Link: https://github.com/bazzite-org/patchwork/commit/95b93b2852718ee1e808c72e6b1836da4a95fc63
> >> Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
> >> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> >> ---
> >> v2:
> >> Add more tags
> >> Fix a typo and grammar in commit
> >> ---
> >> drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++
> >> 1 file changed, 28 insertions(+)
> >>
> >> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> >> index 8db09d81918fb..3c5f34892734e 100644
> >> --- a/drivers/acpi/ec.c
> >> +++ b/drivers/acpi/ec.c
> >> @@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
> >> DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
> >> },
> >> },
> >> + /*
> >> + * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
> >> + * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
> >> + */
> >> + {
> >> + .matches = {
> >> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> >> + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
> >> + }
> >> + },
> >> + {
> >> + .matches = {
> >> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> >> + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
> >> + }
> >> + },
> >> + {
> >> + .matches = {
> >> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> >> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
> >> + }
> >> + },
> >> + {
> >> + .matches = {
> >> + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
> >> + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
> >> + }
> >> + },
> >> { },
> >> };
> >>
> >> --
> >> 2.43.0
> >>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-07 18:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 13:38 [PATCH v2] ACPI: EC: Set ec_no_wakeup for Lenovo Go S Mario Limonciello
2025-04-01 13:48 ` Rafael J. Wysocki
2025-04-01 14:18 ` Mario Limonciello
2025-04-07 18:01 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).