From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=109.224.244.108 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796036839; b=Mw1c6JwGvr8eJo+JiBK/mQNGtQjnFEpNy7WhQwd5hWKCYw9oRHwRCfe7KZKNCvB0QILV WpxPQ/+3RNe4KwFmqJLhQckOdTwaG2TINXLR9sdcxHIbi/scruPe/y9c3UQ5+g6Ep6Ns+ wBdeT6jKg/B+9hJQrgBI44ZBsox7H8SkrIz0ylNudkPMCHoVtqxXl8jk66Y+bpASbdK+T 4D6fI30/S1zWVPOruLkvmO9EYelqH+Gvje90RKDnOLAS7SVKth/HDizIGcTF67W23Egi3 887E7+w+NCarNiXsiyj30XmP7YmMG9OY4SvkOY/u+ePQNCirJAiiebi/QeEZJ9aPSAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796036839; h=DMARC-Filter:DKIM-Signature:X-Pm-Submission-Id:From:Reply-To:Subject: To:Cc:Date:Message-ID:MIME-Version:Content-Type; bh=c6p9YCJF2P4nVJx6HnGFONlofsr+y7LtlyfhaE88zmc=; b=2NWtLnjZUFUAf8YzL0Yw6DPfeJmjj50baiAaBu8dfPr4Y5No0Uf2GDASCQ3oOg96joIv CDIogpMC4ftkm1w+udWSi/bJ0p8j+VPQQdrox3ssUi7RaLys+o6mXCITUOJFbV2peqDPP +8pplBDw6/M75wiCIxRCCN3nvPD4JnlvQC5PSYAG3sqDIgrcNfjXIU4Yh+m96TQfmt5x1 KsDvV5Xyew2Cwvt5st9Gz10m6OQm8RNMltjt1V8mmdzbQfEu+uI1RBJxBbRtpdmhChdL4 F9QDMNo2C/KJ1vkrwqwkKocZCi9NJ4UyuhcQwZn62CN9UW9D+7Gm2kL4X1z4IwbvdsA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mahirsn.net; spf=pass smtp.mailfrom=mahirsn.net; dkim=pass header.d=mahirsn.net header.i=@mahirsn.net header.a=rsa-sha256 header.s=protonmail header.b=bJbA9cuN; arc=none smtp.remote-ip=109.224.244.108 Received: from mail-244108.protonmail.ch (mail-244108.protonmail.ch [109.224.244.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A18D606A320; Mon, 30 Nov 2026 11:07:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6A18D606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mahirsn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mahirsn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mahirsn.net header.i=@mahirsn.net header.a=rsa-sha256 header.s=protonmail header.b=bJbA9cuN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mahirsn.net; s=protonmail; t=1796036834; x=1796296034; bh=c6p9YCJF2P4nVJx6HnGFONlofsr+y7LtlyfhaE88zmc=; h=From:Reply-To:Subject:To:Cc:Date:Message-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=bJbA9cuNLO3bL8Prk+nBn8XyXK/jQUUjnHGEL3rfGePJV7/Xx53falUBM9L5S86V1 nrt6s4Nd6/kUiDy75M/TJ/ea3VA5ndILczh/8VLKRbnLQYW7SlbhpGU+HUUhJkZPbF LGazHZ39fdG6bO1ojYnLABg7JwzX2cetB33DgtZePiS3IoDrMW7T5sHuICf7HylOPP c4o6Qvr6i4zCCVUH6pi12tSsjG39qu4Dy9YzREHi5S8daKA3Hr4EWBm6E/qhBk0qCs l6a9/nK/166Dt+Rlbf5x7Ne1bwmCGne8ZGYOHGo5ilXK7yqrxBQDPEheXnU3K4U2oS nIseucPrgqVTA== X-Pm-Submission-Id: 4jdLnr0qWzz1DFF2 From: Mahir Reply-To: mail@mahirsn.net Subject: ACPI/PCI: GPU and HDMI audio inaccessible on FA608PP s2idle resume To: Shyam Sundar S K , platform-driver-x86@vger.kernel.org Cc: Rafael J. Wysocki , Len Brown , Bjorn Helgaas , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 30 Nov 2026 11:06:22 +0000 Message-ID: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4451575554078428839==" --===============4451575554078428839== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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. --===============4451575554078428839== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="e6-linux-excerpt.txt" MIME-Version: 1.0 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). --===============4451575554078428839== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="amd-pmc-pci-trace.patch" MIME-Version: 1.0 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 #include #include +#include #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 #include +#include #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 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); --===============4451575554078428839==--