ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on
PATCH 1/1 ACPI: PM: Add Acer Aspire A515-53G to dmi_leave_unused_power_resources_on
On the Acer Aspire A515-53G (Whiskey Lake + NVIDIA GeForce MX230), the dGPU behind root port RP05 (00:1c.4) falls off the bus during boot and is unusable until the next power cycle:
nvidia 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
NVRM: The NVIDIA GPU 0000:02:00.0 ... has fallen off the bus
The firmware ships two SSDTs which both provide power management for the dGPU:
- One SSDT defines \_SB.PCI0.RP05.PC01 together with RP05._PR0/_PR2/_PR3 = { PC01 }.
- A second SSDT defines \_SB.PCI0.RP05.PCRP (_STA initially One, _OFF calls \_SB.PCI0.HGOF, which puts the link into L2/L3 and drops the dGPU power enable GPIO) and its own RP05._PR0/_PR2/_PR3/_S0W. The latter fail to load:
ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.RP05._PR0], AE_ALREADY_EXISTS
As a result PCRP is not referenced by any device and acpi_turn_off_unused_power_resources() turns it off right after the ACPI namespace scan. This cuts power to the dGPU, but PC01 still believes it is on, so its _ON method is a no-op when the PCI core later tries to bring the GPU back to D0.
Windows does not turn off unused power resources, so the dGPU works there.
Add the machine to dmi_leave_unused_power_resources_on, like the THUNDEROBOT ZERO which has a similar SSDT bug. With this change the dGPU stays on the bus and the nvidia driver binds. Runtime PM of the dGPU is unaffected, as it is handled through PC01: with no driver bound and power/control set to auto, RP05 reaches D3cold and the GPU comes back to D0 on resume.
--- drivers/acpi/power.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/acpi/power.c +13 -0
@@ -1121,6 +1121,19 @@ static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = { } }, + { +/* +* Acer Aspire A515-53G: Two SSDTs both define power resources +* for the dGPU root port RP05 ('PC01' and 'PCRP'). Only PC01 ends +* up in RP05's _PR0/_PR3, so 'PCRP' is shut down on +* initialization, cutting power to the NVIDIA dGPU behind the +* back of 'PC01' and making the dGPU unavailable. +*/ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A515-53G"), + }, + }, {} };
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 13 lines
On the Acer Aspire A515-53G (Whiskey Lake + NVIDIA GeForce MX230), the dGPU behind root port RP05 (00:1c.4) falls off the bus during boot and is unusable until the next power cycle:
nvidia 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
NVRM: The NVIDIA GPU 0000:02:00.0 ... has fallen off the busThe firmware ships two SSDTs which both provide power management for the dGPU:
- One SSDT defines \_SB.PCI0.RP05.PC01 together with RP05._PR0/_PR2/_PR3 = { PC01 }.
Quoted 8 lines
- A second SSDT defines \_SB.PCI0.RP05.PCRP (
_STAinitially One,_OFFcalls \_SB.PCI0.HGOF, which puts the link into L2/L3 and drops
[ ... ]
bound and power/control set to auto, RP05 reaches D3cold and the GPU comes back to D0 on resume.
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 58 lines · Krittikun Wongnin
On the Acer Aspire A515-53G (Whiskey Lake + NVIDIA GeForce MX230), the dGPU behind root port RP05 (00:1c.4) falls off the bus during boot and is unusable until the next power cycle:
nvidia 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
NVRM: The NVIDIA GPU 0000:02:00.0 ... has fallen off the busThe firmware ships two SSDTs which both provide power management for the dGPU:
- One SSDT defines \_SB.PCI0.RP05.PC01 together with RP05._PR0/_PR2/_PR3 = { PC01 }.
- A second SSDT defines \_SB.PCI0.RP05.PCRP (
_STAinitially One,_OFFcalls \_SB.PCI0.HGOF, which puts the link into L2/L3 and drops the dGPU power enable GPIO) and its own RP05._PR0/_PR2/_PR3/_S0W. The latter fail to load:ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.RP05._PR0],
AE_ALREADY_EXISTSAs a result PCRP is not referenced by any device and
acpi_turn_off_unused_power_resources()turns it off right after the ACPI namespace scan. This cuts power to the dGPU, but PC01 still believes it is on, so its_ONmethod is a no-op when the PCI core later tries to bring the GPU back to D0.Windows does not turn off unused power resources, so the dGPU works there.
Add the machine to
dmi_leave_unused_power_resources_on, like the THUNDEROBOT ZERO which has a similar SSDT bug. With this change the dGPU stays on the bus and the nvidia driver binds. Runtime PM of the dGPU is unaffected, as it is handled through PC01: with no driver bound and power/control set to auto, RP05 reaches D3cold and the GPU comes back to D0 on resume.Link https://lore.kernel.org/r/CADS-TgDQ1G8vrTQLJeQ3RTBVFTyMe0C+5p2=UBKS=EFCDFuaxw@mail.gmail.com/ open hereSigned-off-by Krittikun Wongnin <[email protected]>--- drivers/acpi/power.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/acpi/power.c +7
-0@@ -1121,6 +1121,19 @@ static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = { } }, + { +/* +* Acer Aspire A515-53G: Two SSDTs both define power resources +* for the dGPU root port RP05 ('PC01' and 'PCRP'). Only PC01 ends +* up in RP05's _PR0/_PR3, so 'PCRP' is shut down on +* initialization, cutting power to the NVIDIA dGPU behind the +* back of 'PC01' and making the dGPU unavailable.
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, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A515-53G"), + }, + }, {} }; --
Applied as 7.4 material, thanks!