diff mbox series

ACPI: EC: add quirk for Lenovo X13 G4 (AMD)

Message ID 20240831003610.89970-1-mail@david-bauer.net
State New
Headers show
Series ACPI: EC: add quirk for Lenovo X13 G4 (AMD) | expand

Commit Message

David Bauer Aug. 31, 2024, 12:36 a.m. UTC
This adds a quirk for the Lenovo X13 Gen 4 AMD platform.

If booted without the kernel-parameter acpi.ec_no_wakeup=1 the system
will resume from sleep upon change of AC state. Unplugging or plugging
the power cable thus wakes the system from suspend.

Disabling wakeups from the embedded controller fixes this behavior.
Resuming by opening the lid stays functional.

Only apply this fix for the AMD version, as it is unknown if the Intel
platform is also affected.

This was observed on a system with the following BIOS / EC software:
BIOS: 1.28 (R29ET54W)
EC: 1.31 (R29HT55W)

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 drivers/acpi/ec.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

David Bauer Aug. 31, 2024, 4:08 p.m. UTC | #1
Hey Mark,

thanks for your message.

On 8/31/24 02:53, Mark Pearson wrote:
> Hi David,
> 
> On Fri, Aug 30, 2024, at 8:36 PM, David Bauer wrote:
>> This adds a quirk for the Lenovo X13 Gen 4 AMD platform.
>>
>> If booted without the kernel-parameter acpi.ec_no_wakeup=1 the system
>> will resume from sleep upon change of AC state. Unplugging or plugging
>> the power cable thus wakes the system from suspend.
>>
>> Disabling wakeups from the embedded controller fixes this behavior.
>> Resuming by opening the lid stays functional.
>>
>> Only apply this fix for the AMD version, as it is unknown if the Intel
>> platform is also affected.
>>
>> This was observed on a system with the following BIOS / EC software:
>> BIOS: 1.28 (R29ET54W)
>> EC: 1.31 (R29HT55W)
>>
>> Signed-off-by: David Bauer <mail@david-bauer.net>
>> ---
>>   drivers/acpi/ec.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
>> index 38d2f6e6b12b..f00cdcf06eb8 100644
>> --- a/drivers/acpi/ec.c
>> +++ b/drivers/acpi/ec.c
>> @@ -2252,6 +2252,13 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
>>   			DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Yoga 3rd"),
>>   		},
>>   	},
>> +	{
>> +		.matches = {
>> +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>> +			/* ThinkPad X13 Gen 4 (AMD) */
>> +			DMI_MATCH(DMI_PRODUCT_SKU, "LENOVO_MT_21J3_BU_Think_FM_ThinkPad X13 Gen 4"),
>> +		},
>> +	},
>>   	{
>>   		.matches = {
>>   			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
>> -- 
>> 2.45.2
> 
> I believe you've hit the issue that is being tracked in https://bugzilla.kernel.org/show_bug.cgi?id=219196
> 
> We're working with Qualcomm to get that addressed. It impacts systems with the Qualcomm Wifi chip that uses the ath11k driver. I haven't specifically reproduced it on the X13 G4 - but we've seen it on three other platforms and it sounds exactly the same.
> 
> You can confirm by using a 6.9 kernel and it should work correctly. If it doesn't, please let me know and we can investigate further.
> This is a Linux certified platform and I'd rather get issues fixed correctly than have to quirk them in the kernel and potentially impact other functionality.

Understandable and i fully agree. I can confirm the wakeups do not occur 
on an older 6.9 kernel. So it's most likely the issue documented in the 
ticket.

I can also confirm that the wakes also happen when i disable Bluetooth 
and WiFi from within the BIOS and then boot Linux regardless of the 
kernel version.

Best
David

> 
> Thanks
> Mark
diff mbox series

Patch

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 38d2f6e6b12b..f00cdcf06eb8 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2252,6 +2252,13 @@  static const struct dmi_system_id acpi_ec_no_wakeup[] = {
 			DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Yoga 3rd"),
 		},
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			/* ThinkPad X13 Gen 4 (AMD) */
+			DMI_MATCH(DMI_PRODUCT_SKU, "LENOVO_MT_21J3_BU_Think_FM_ThinkPad X13 Gen 4"),
+		},
+	},
 	{
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "HP"),