Skip to contentSkip to conversation

ACPI: PM: Add acpi power resource quirk for THUNDEROBOT ZERO

PATCH Applied Zhai Can 2 participants 3 messages Feb 14 – Feb 16 ACPI

lore
Share & tools
lore

Zhai Can

author
#0 lore raw

Hello Rafael,

Since commit a1224f34d72a ("ACPI: PM: Check states of power resources during initialization"), on laptop (Vendor "THUNDEROBOT", Model "ZERO, Board "NLZA"), when the second NVMe slot is occupied, then during system boot, NVMe slot #2 plus the NVIDIA dGPU, will both be turned off in acpi_turn_off_unused_power_resources.

This is reported as an issue here: https://bugzilla.kernel.org/show_bug.cgi?id=221087, for more context. Relevant attachments (acpidump, dmesg and lspci) stay there too.

SSDT Override that nullifies all _OFF functions will solve the issue. However, I've found commit 9b04d99788cf ("ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini"), which I may believe my case is quite similar to it, or maybe? I'm not familiar with ACPI so didn't dive into the dumped ssdt table too much. What I know is, the ZERO model laptop has the PXP power resource which seems to control both NVMe #2 and the NVIDIA, and it gets unexpectedly shut down in acpi_turn_off_unused_power_resources. Note this only happens when NVMe #2 is occupied. Specifically, if NVMe #2 is not plugged in (NVMe #1 can be plugged in and has nothing to do here), PXP won't be shut down, and the NVIDIA dGPU will work as normal.

The following patch adds THUNDEROBOT ZERO model as a quirk - do not turn off any unused power resources for this model. During a test (based on v6.18), if no patch applied, power resource TBT1, WRST, BTRT and PXP (yea, the "NVMe #2 + NVIDIA" one) will be marked "unused" and be turned off.

If PXP is treated as a sole exception (that is, other three are getting turned off), during my test, didn't see any impact. However this patch just leaves all "unused" power resources on, which I'm not sure if this is the best approach.

Please let me know if there's any thoughts and suggestions.

Best,
zc

author
#1 lore raw

PATCH 1/1 ACPI: PM: Add unused power resource quirk for THUNDEROBOT ZERO

On the THUNDEROBOT ZERO laptop, the second NVMe slot and the discrete NVIDIA GPU are both controlled by power-resource PXP. Due to the SSDT table bug (lack of reference), PXP will be shut dow as an "unused" power resource during initialization, making the NVMe slot #2 + NVIDIA both inaccessible.

This issue was introduced by commit a1224f34d72a ("ACPI: PM: Check states of power resources during initialization"). Here are test results on the three consecutive commits:

(bad again!) a1224f34d72a ACPI: PM: Check states of power resources during initialization (good) bc2836859643 ACPI: PM: Do not turn off power resources in unknown state (bad) 519d81956ee2 Linux 5.15-rc6

On commit bc2836859643 ("ACPI: PM: Do not turn off power resources in unknown state") this was not an issue because the power resource state left UNKNOWN thus being ignored.

See also commit 9b04d99788cf ("ACPI: PM:
Do not turn of unused power resources on the Toshiba Click Mini") which is another almost identical case to this one.

Fixes a1224f34d72a ("ACPI: PM: Check states of power resources during initialization")
---
 drivers/acpi/power.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/acpi/power.c +13 -0
index 361a7721a6a8..7da5ae5594a7 100644
@@ -1113,6 +1113,19 @@ static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"),
 		},
 	},
+	{
+		/*
+		 * THUNDEROBOT ZERO laptop: Due to its SSDT table bug, power
+		 * resource 'PXP' will be shut down on initialization, making
+		 * the NVMe #2 and the NVIDIA dGPU both unavailable (they're
+		 * both controlled by 'PXP').
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "THUNDEROBOT"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "ZERO"),
+		}
+
+	},
 	{}
 };
 
Signature · 1 line
2.53.0
maintainer Applied
#2 lore raw

Re: [PATCH] ACPI: PM: Add unused power resource quirk for THUNDEROBOT ZERO

Quoted 43 lines · Zhai Can

On the THUNDEROBOT ZERO laptop, the second NVMe slot and the discrete NVIDIA GPU are both controlled by power-resource PXP. Due to the SSDT table bug (lack of reference), PXP will be shut dow as an "unused" power resource during initialization, making the NVMe slot #2 + NVIDIA both inaccessible.

This issue was introduced by commit a1224f34d72a ("ACPI: PM: Check states of power resources during initialization"). Here are test results on the three consecutive commits:

(bad again!) a1224f34d72a ACPI: PM: Check states of power resources during initialization (good) bc2836859643 ACPI: PM: Do not turn off power resources in unknown state (bad) 519d81956ee2 Linux 5.15-rc6

On commit bc2836859643 ("ACPI: PM: Do not turn off power resources in unknown state") this was not an issue because the power resource state left UNKNOWN thus being ignored.

See also commit 9b04d99788cf ("ACPI: PM:
Do not turn of unused power resources on the Toshiba Click Mini") which is another almost identical case to this one.

Fixes a1224f34d72a ("ACPI: PM: Check states of power resources during initialization")
---
 drivers/acpi/power.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/acpi/power.c +7 -0
index 361a7721a6a8..7da5ae5594a7 100644
@@ -1113,6 +1113,19 @@ static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"),
                },
        },
+       {
+               /*
+                * THUNDEROBOT ZERO laptop: Due to its SSDT table bug, power
+                * resource 'PXP' will be shut down on initialization, making
+                * the NVMe #2 and the NVIDIA dGPU both unavailable (they're
+                * both controlled by 'PXP').
+                */

drivers/acpi/power.c static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {

Quoted 10 lines
drivers/acpi/power.c +6 -1
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "THUNDEROBOT"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ZERO"),
+               }
+
+       },
        {}
 };
 
--

Applied as 7.0-rc material, thanks!