Linux PCI subsystem development
 help / color / mirror / Atom feed
* ACPI/PCI: GPU and HDMI audio inaccessible on FA608PP s2idle resume
@ 2026-11-30 11:06 Mahir
  2026-11-30 11:15 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Mahir @ 2026-11-30 11:06 UTC (permalink / raw)
  To: Shyam Sundar S K, platform-driver-x86
  Cc: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, linux-acpi,
	linux-pci, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5018 bytes --]

Hi,

On an ASUS TUF Gaming A16 FA608PP, the RTX 5070 and its HDMI audio
function become inaccessible during real s2idle resume. Both functions
are below Root Port 0000:00:01.1. The display stays black. An Ethernet
collector saved the E6 trace after resume.

The failure occurred on Arch Linux 7.3.6-arch1-1 and an instrumented
build, 7.3.6-arch1-1-pwtrace1. The Arch source base was commit
bba1a17262fbcd7bbc9c40220391c0765ff09c08. Reproduction on current
vanilla mainline has not been verified. No known-good kernel or
regression range is known. I am asking which evidence would best
separate the hypotheses.

Hardware and configuration

- BIOS FA608PP.311, Ryzen 9 8940HX, AMD PMC AMDI0008:00.
- Root Port 1022:14db at 0000:00:01.1, GPU 10de:2d58 at
  0000:01:00.0, HDMI audio 10de:22eb at 0000:01:00.1.
- Discrete-GPU MUX mode, Hyprland, NVIDIA open kernel modules 620.73.04.
- VRAM preservation and kernel suspend notifiers enabled. NVIDIA S0ix
  and runtime D3 disabled. AMD IOMMU enabled.
- Boot options include nvme_core.default_ps_max_latency_us=0 and
  pcie_port_pm=off. The Kioxia BG6 has previously disappeared with
  power management.

Steps used to reproduce

1. Boot the above configuration on AC power with amd_pmc bound.
2. Confirm /sys/power/mem_sleep selects s2idle and
   /sys/power/pm_test selects none.
3. Set an RTC wake alarm for 120 seconds. Start suspend.target
   once with systemctl and allow the system to wake.
4. Check the kernel log for D3hot-to-D0 access errors at 01:00.0
   and 01:00.1. Both functions should resume and the display should
   return.

E5 used the stock Arch kernel. It woke near the RTC alarm and
reproduced the failure. In E6, IRQ 7 woke the system before the alarm.
Kernel timekeeping reported 1.312 s asleep. The PMC reported 163,543 us
in S0i3. Both PCI functions became inaccessible again.

The only PMC-unbound run, E4, resumed successfully. This single
observation supports an association with the bound platform path.
Unbinding changes several callbacks. The sample cannot identify the
driver as the cause or establish a failure rate. The PMC-bound
pm_test=platform run passed late/noirq without a real s2idle loop.

E6 trace

Times are relative to the end of machine_suspend. Alignment between
kernel messages and ftrace is approximate.

 -1.854084 s  AMD PMC entry hint (0x03, argument 1) returned 0.
 +0.000088 s  AMD PMC exit hint (0x03, argument 0) returned 0.
 +0.000809 s  ACPI LPS0 exit completed.
 +0.001560 s  ACPI Modern Standby exit completed.
 +0.003396 s  Root Port 00:01.1 noirq callback returned 0.
 +0.004197 s  GPU: D3hot, platform_ret=0, config_ret=0, PMCSR=0xffff.
 +0.007271 s  Audio: D3hot, platform_ret=-22, config_ret=0, PMCSR=0xffff.
 +5.073452 s  First NVMe AMD-Vi I/O page fault trace event.
+35.555333 s  NVIDIA Xid 79.
+65.558380 s  NVIDIA Xid 154.
+65.558415 s  NVIDIA Xid 143.
+65.568055 s  Oops in nvEvoDisableVblankSemControl [nvidia_modeset].

The Root Port callback took 9 us. Its end preceded the first GPU
PMCSR event by 801 us. The system-wide noirq phase took 5.070411 s.
The trace filtered callbacks to three PCI functions, so it cannot
attribute the remaining time. The first NVMe IOMMU event appeared
43 us after the noirq end marker. That marker precedes
resume_device_irqs(). The originating DMA request time is unknown.

The x86 Type 1 config-access return code is 0, but the data is all
ones. The PCI core rejects that value before the D0 write and the
D3hot readiness wait. The audio platform return of -EINVAL also
occurred before suspend, with readable PMCSR 0x000b. Its ACPI
companion NHDA has no _PS0 or _PR0.

PCIe access loss predates the NVIDIA Oops. Shutdown later stalled and
required the power button. Further suspend tests are paused.

Questions for maintainers

Does the SMU exit acknowledgment guarantee downstream PCIe readiness
on this platform? The trace captured the mailbox response. It did not
measure physical power, reset or link state. Successful ACPI LPS0 exits
do not show whether PG00._ON or PEGP._PS0 ran. Which existing traces
or firmware evidence could clarify the Root Port resume path and the
power-resource sequence without extra config reads?

Attachments and tool disclosure

e6-linux-excerpt.txt contains selected events with host identifiers
removed. amd-pmc-pci-trace.patch is the diagnostic diff used in E6.
It records existing AMD PMC and PCI operations. It adds no hardware
reads, waits, retries or power changes. It is attached for diagnostic
context only. I am not proposing it as an upstream fix.

OpenAI Codex (GPT-6 family) helped inspect the source and trace,
calculate event intervals and draft this report. It also helped
design and write the two diagnostic tracepoints. The requests were
to trace the existing SMU hint and first PMCSR read without changing
their behavior, then document the captured failure. The instrumented
Arch build booted and captured E6. An independent review checked
the submission files and timing. No fix was developed or tested.

Thanks.

[-- Attachment #2: e6-linux-excerpt.txt --]
[-- Type: text/plain, Size: 2526 bytes --]

E6 excerpt. Origin: machine_suspend[1] end. Trace/journal alignment is approximate.
Ftrace records retained: 89/89; overruns and dropped events: 0.

-4.278184s [trace] pci_power_up_pmcsr: 0000:01:00.1 state=3 platform_ret=-22 config_ret=0 pmcsr=0x000b
-1.854144s [trace] amd_pmc_s2idle_hint: message=0x03 argument=0x00000001 begin ret=0
-1.854084s [trace] amd_pmc_s2idle_hint: message=0x03 argument=0x00000001 end ret=0
-1.853799s [trace] suspend_resume: machine_suspend[1] begin
-0.000130s [kmsg] PM: Triggering wakeup from IRQ 7
+0.000000s [trace] suspend_resume: machine_suspend[1] end
+0.000023s [trace] amd_pmc_s2idle_hint: message=0x03 argument=0x00000000 begin ret=0
+0.000088s [trace] amd_pmc_s2idle_hint: message=0x03 argument=0x00000000 end ret=0
+0.000809s [kmsg] ACPI: \_SB_.PEP_: Successfully transitioned to state lps0 exit
+0.001560s [kmsg] ACPI: \_SB_.PEP_: Successfully transitioned to state lps0 ms exit
+0.002998s [trace] suspend_resume: dpm_resume_noirq[16] begin
+0.003387s [trace] device_pm_callback_start: pcieport 0000:00:01.1, parent: pci0000:00, noirq bus [resume]
+0.003396s [trace] device_pm_callback_end: pcieport 0000:00:01.1, err=0
+0.003577s [trace] device_pm_callback_start: nvidia 0000:01:00.0, parent: 0000:00:01.1, noirq bus [resume]
+0.004163s [kmsg] nvidia 0000:01:00.0: Unable to change power state from D3hot to D0, device inaccessible
+0.004197s [trace] pci_power_up_pmcsr: 0000:01:00.0 state=3 platform_ret=0 config_ret=0 pmcsr=0xffff
+0.007220s [trace] device_pm_callback_end: nvidia 0000:01:00.0, err=0
+0.007224s [trace] device_pm_callback_start: snd_hda_intel 0000:01:00.1, parent: 0000:00:01.1, noirq bus [resume]
+0.007236s [kmsg] snd_hda_intel 0000:01:00.1: Unable to change power state from D3hot to D0, device inaccessible
+0.007271s [trace] pci_power_up_pmcsr: 0000:01:00.1 state=3 platform_ret=-22 config_ret=0 pmcsr=0xffff
+0.009395s [trace] device_pm_callback_end: snd_hda_intel 0000:01:00.1, err=0
+5.062578s [kmsg] PM: Triggering wakeup from IRQ 9
+5.073409s [trace] suspend_resume: dpm_resume_noirq[16] end
+5.073452s [trace] io_page_fault: IOMMU:nvme 0000:02:00.0 iova=0x000000800004b000 flags=0x0000
+5.073464s [trace] io_page_fault: IOMMU:nvme 0000:02:00.0 iova=0x000000800004c000 flags=0x0001

Deltas calculated within the same ftrace clock:
- Root Port noirq callback: 9 us.
- Root Port callback end to first GPU PMCSR event: 801 us.
- System-wide dpm_resume_noirq span: 5.070411 s.
- Noirq end marker to first NVMe IOMMU event: 43 us (DMA request time unknown).

[-- Attachment #3: amd-pmc-pci-trace.patch --]
[-- Type: text/plain, Size: 4120 bytes --]

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -35,6 +35,7 @@
 #include <linux/aer.h>
 #include <linux/bitfield.h>
 #include <linux/suspend.h>
+#include <trace/events/power.h>
 #include "pci.h"
 
 DEFINE_MUTEX(pci_slot_mutex);
@@ -1331,7 +1332,7 @@
 	bool need_restore;
 	pci_power_t state;
 	u16 pmcsr;
-	int ret;
+	int ret, platform_ret, config_ret;
 
 	/*
 	 * When setting power state to D0, platform_pci_set_power_state()
@@ -1343,7 +1344,7 @@
 	 * In all cases, the device is either Configuration-Ready or
 	 * inaccessible upon return.
 	 */
-	platform_pci_set_power_state(dev, PCI_D0);
+	platform_ret = platform_pci_set_power_state(dev, PCI_D0);
 
 	if (!dev->pm_cap) {
 		state = platform_pci_get_power_state(dev);
@@ -1360,7 +1361,9 @@
 		return -EIO;
 	}
 
-	pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
+	config_ret = pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
+	trace_pci_power_up_pmcsr(pci_name(dev), dev->current_state, platform_ret,
+				 config_ret, pmcsr);
 	if (PCI_POSSIBLE_ERROR(pmcsr)) {
 		pci_err(dev, "Unable to change power state from %s to D0, device inaccessible\n",
 			pci_power_name(dev->current_state));
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -31,6 +31,7 @@
 #include <linux/uaccess.h>
 
 #include <asm/amd/node.h>
+#include <trace/events/power.h>
 
 #include "pmc.h"
 
@@ -775,7 +776,9 @@
 		}
 	}
 
+	trace_amd_pmc_s2idle_hint(pdev->cpu_info->os_hint, arg, true, 0);
 	rc = amd_pmc_send_cmd(pdev, arg, NULL, pdev->cpu_info->os_hint, false);
+	trace_amd_pmc_s2idle_hint(pdev->cpu_info->os_hint, arg, false, rc);
 	if (rc) {
 		dev_err(pdev->dev, "suspend failed: %d\n", rc);
 		return;
@@ -819,7 +822,9 @@
 	struct amd_pmc_dev *pdev = &pmc;
 	int rc;
 
+	trace_amd_pmc_s2idle_hint(pdev->cpu_info->os_hint, 0, true, 0);
 	rc = amd_pmc_send_cmd(pdev, 0, NULL, pdev->cpu_info->os_hint, false);
+	trace_amd_pmc_s2idle_hint(pdev->cpu_info->os_hint, 0, false, rc);
 	if (rc)
 		dev_err(pdev->dev, "resume failed: %d\n", rc);
 
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -286,6 +286,59 @@
 		(__entry->start)?"begin":"end")
 );
 
+TRACE_EVENT(amd_pmc_s2idle_hint,
+
+	TP_PROTO(u8 message, u32 argument, bool start, int ret),
+
+	TP_ARGS(message, argument, start, ret),
+
+	TP_STRUCT__entry(
+		__field(u8, message)
+		__field(u32, argument)
+		__field(bool, start)
+		__field(int, ret)
+	),
+
+	TP_fast_assign(
+		__entry->message = message;
+		__entry->argument = argument;
+		__entry->start = start;
+		__entry->ret = ret;
+	),
+
+	TP_printk("message=0x%02x argument=0x%08x %s ret=%d",
+		  __entry->message, __entry->argument,
+		  __entry->start ? "begin" : "end", __entry->ret)
+);
+
+TRACE_EVENT(pci_power_up_pmcsr,
+
+	TP_PROTO(const char *device, int state, int platform_ret,
+		 int config_ret, u16 pmcsr),
+
+	TP_ARGS(device, state, platform_ret, config_ret, pmcsr),
+
+	TP_STRUCT__entry(
+		__string(device, device)
+		__field(int, state)
+		__field(int, platform_ret)
+		__field(int, config_ret)
+		__field(u16, pmcsr)
+	),
+
+	TP_fast_assign(
+		__assign_str(device);
+		__entry->state = state;
+		__entry->platform_ret = platform_ret;
+		__entry->config_ret = config_ret;
+		__entry->pmcsr = pmcsr;
+	),
+
+	TP_printk("%s state=%d platform_ret=%d config_ret=%d pmcsr=0x%04x",
+		  __get_str(device), __entry->state, __entry->platform_ret,
+		  __entry->config_ret, __entry->pmcsr)
+);
+
 DECLARE_EVENT_CLASS(wakeup_source,
 
 	TP_PROTO(const char *name, unsigned int state),
diff --git a/kernel/trace/power-traces.c b/kernel/trace/power-traces.c
--- a/kernel/trace/power-traces.c
+++ b/kernel/trace/power-traces.c
@@ -15,6 +15,7 @@
 #include <trace/events/power.h>
 
 EXPORT_TRACEPOINT_SYMBOL_GPL(suspend_resume);
+EXPORT_TRACEPOINT_SYMBOL_GPL(amd_pmc_s2idle_hint);
 EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle);
 EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_frequency);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-30 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 11:06 ACPI/PCI: GPU and HDMI audio inaccessible on FA608PP s2idle resume Mahir
2026-11-30 11:15 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox