среда

[Bug 2162959] Re: System hangs on shutdown/reboot ~50% of the time since kernel 7.0.0-28 (PCI/ASPM regression)

Additional data point: same regression on the Ubuntu 24.04 LTS HWE kernel, on a mobile AMD Phoenix platform with integrated graphics only, no discrete GPU and no PCIe switch. This may widen the scope beyond the reports so far. ## Hardware - Lenovo ThinkPad P16s Gen 2 AMD (21K90004CK) - GPU: AMD Phoenix1 [1002:15bf], integrated, amdgpu. No discrete GPU present. - BIOS: LENOVO R2FET61W (1.41), 2024-11-15; EC firmware 1.30 (fwupd/LVFS report both as latest available — no pending updates) - NVMe: KIOXIA KXG8AZNV2T04; root on LVM + ext4 - Secure Boot disabled ## Software - Ubuntu 24.04.4 LTS (noble), GNOME - BROKEN: 7.0.0-28-generic (#28~24.04.1, upstream 7.0.12) - BROKEN: 7.0.0-29-generic (#29~24.04.2) - GOOD: 6.17.0-40-generic (#40~24.04.1) — multiple consecutive clean poweroffs - 7.0.0-27 not tested; not offered in the noble HWE stream, so I cannot confirm the -27/-28 boundary reported here. ## Symptoms - Roughly 2 of 3 poweroff attempts hang. - Display goes dark; power LED and keyboard backlight stay lit; fan keeps running. - Never completes power-off; requires holding the power button. - Journal ends at exactly the same point reported in this bug: systemd[1]: Reached target poweroff.target - System Power Off. systemd[1]: Shutting down. systemd-shutdown[1]: Syncing filesystems and block devices. systemd-shutdown[1]: Sending SIGTERM to remaining processes... systemd-journald[456]: Received SIGTERM from PID 1 (systemd-shutdow). systemd-journald[456]: Journal stopped - Magic SysRq at the hang (Alt+SysRq+o) has no effect. ## Isolation already performed — all negative, problem persists - Reproduces from a bare TTY with no desktop session running. - Reproduces with rabbitmq-server, mssql-server and apache2 stopped. - Reproduces with every ACPI wake source disarmed (all entries in /proc/acpi/wakeup set to *disabled, plus mhi0 power/wakeup disabled). - Reproduces with no Thunderbolt dock and no external devices attached. - Reproduces after unloading VirtualBox out-of-tree modules (vboxdrv, vboxnetflt, vboxnetadp) and disabling vboxdrv.service. - Platform power profile (balanced vs power-saver) makes no difference. - Firmware is current; no BIOS or EC update available via LVFS. ## Reboot vs poweroff Initially 5/5 clean reboots on 7.0.0-29 while poweroff was failing ~2 in 3. A reboot hang was observed later, so reboot is affected too, but at a much lower rate than poweroff on this machine. This is consistent with the report here that both paths are affected. ## Firmware observation — possibly relevant to why some platforms hang hard I decompiled this machine's DSDT. `_PTS(5)` routes several SMM calls through a helper that polls a handshake flag in ACPI NVS with no timeout and no iteration bound: OperationRegion (SMI0, SystemIO, 0xB0, 0x02) Field (SMI0, ByteAcc, NoLock, Preserve) { APMC, 8, APMD, 8 } Method (SMI, 5, Serialized) { Acquire (MSMI, 0xFFFF) CMD = Arg0 ERR = 0x01 PAR0 = Arg1 ... PAR3 = Arg4 APMC = 0xF5 While ((ERR == 0x01)) // unbounded { Sleep (0x01) APMC = 0xF5 } Local0 = PAR0 Release (MSMI) Return (Local0) } `_PTS(5)` reaches this via `SCMS(0x0D)` (SMI 0x02) and `AWON(0x05)` (SMI 0x12). If the SMM response is delayed or dropped, the ACPI interpreter spins here indefinitely and the PM1_CNT SLP_TYP/SLP_EN write never happens — which matches the observed state (fully powered, EC alive, no OS). For contrast, Lenovo's own `SECM` method in SSDT1 on this same machine uses the identical polling idiom but bounds it: Local0 = 0x64 While (((\_SB.SCMD != 0x00) && (Local0 != 0x00))) { Sleep (0x01) Local0-- } So the unbounded loop looks like an omission rather than intent. This firmware defect predates the regression — the machine shipped in 2024 and powered off reliably for two years — but it may explain why affected platforms wedge completely instead of merely stalling. ## Not yet tested here - `pcie_aspm=off` (the workaround noted in this bug) - 7.0.0-27, to confirm the boundary Happy to test proposed kernels or collect further data on this platform. -- You received this bug notification because you are subscribed to linux in Ubuntu. Matching subscriptions: Bgg, Bmail, Nb https://bugs.launchpad.net/bugs/2162959 Title: System hangs on shutdown/reboot ~50% of the time since kernel 7.0.0-28 (PCI/ASPM regression) Status in linux package in Ubuntu: Confirmed Bug description: ### Summary System intermittently hangs during shutdown and reboot on kernel 7.0.0-28-generic and 7.0.0-29-generic. The issue does not occur on 7.0.0-27-generic. ### Symptoms - ~50% of shutdown/reboot attempts result in a hang - Display turns off, but: USB peripherals remain powered (LEDs on keyboard/joystick), power LED on case stays lit, fans keep spinning - System never completes power-off; requires holding the physical power button - Affects both shutdown and reboot (not just power-off) - The issue is a race condition — not 100% reproducible but very frequent ### Reproduction 1. Boot with kernel 7.0.0-28-generic or 7.0.0-29-generic 2. Shut down or reboot the system 3. Approximately 50% of attempts will hang after journal stops (after `systemd-shutdown[1]: Sending SIGTERM to remaining processes...`) ### Bisect Results - **7.0.0-27-generic** (upstream v7.0.6): OK — no hangs - **7.0.0-28-generic** (upstream v7.0.12): BROKEN — hangs ~50% - **7.0.0-29-generic** (upstream v7.0.12 + CVE fixes): BROKEN — hangs ~50% ### Workaround Adding pcie_aspm=off to kernel boot parameters seems to reduce the frequency of the issue but does not fully eliminate it ### Suspected Patches The regression was introduced in 7.0.0-28 which includes a large upstream stable bump (v7.0.6 → v7.0.12). Two ASPM-related patches are the most likely culprits: 1. **`PCI/ASPM: Fix link state exit during switch upstream function removal`** (from upstream v7.0.12 stable)    - Directly relevant: the GPU is connected through a PCIe switch (Navi 10 XL Upstream/Downstream Port). This patch modifies behavior during switch upstream function removal, which occurs at shutdown/reboot. A race condition in link state exit could explain the intermittent hang. 2. **`SAUCE: PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of`** (LP: #2072679)    - Ubuntu-specific patch originally targeting Tiger Lake idle states. On AMD X570, the BIOS may intentionally not expose ASPM control; forcing OS control could lead to incorrect link state transitions during teardown. The fact that the GPU sits behind a PCIe switch makes patch #1 especially suspicious — the patch title literally describes the scenario (switch upstream function removal). ### Hardware - **CPU:** AMD Ryzen 7 5800X3D - **Motherboard:** Gigabyte X570 AORUS ELITE - **BIOS:** F40 (2025-10-28), American Megatrends International - **GPU:** AMD Radeon RX 6700 XT (Navi 22) [1002:73df] — connected via PCIe switch (Navi 10 XL Upstream [1002:1478] / Downstream [1002:1479]) - **NIC:** Intel I211 Gigabit - **NVMe:** 2× Phison E18 PCIe4 ### PCIe Topology (relevant) ``` [00:03.1] AMD Starship/Matisse GPP Bridge   └─[09:00.0] AMD/ATI Navi 10 XL Upstream Port of PCI Express Switch       └─[0a:00.0] AMD/ATI Navi 10 XL Downstream Port of PCI Express Switch           ├─[0b:00.0] AMD/ATI Navi 22 (RX 6700 XT)           └─[0b:00.1] AMD/ATI Navi 21/23 HDMI/DP Audio Controller ``` ### System Info - **OS:** Ubuntu 26.04 LTS (Resolute) - **Kernel (broken):** 7.0.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC (7.0.12) - **Kernel (working):** 7.0.0-27-generic (7.0.6) - **ASPM policy:** `[default] performance powersave powersupersave` - **ACPI Power Buttons:** PWRB (PNP0C0C:00) + PWRF (LNXPWRBN:00) ### Journal (last entries before hang) ``` systemd[1]: Reached target poweroff.target - System Power Off. systemd[1]: Shutting down. systemd-shutdown[1]: Syncing filesystems and block devices. systemd-shutdown[1]: Sending SIGTERM to remaining processes... systemd-journald[414]: Received SIGTERM from PID 1 (systemd-shutdow). systemd-journald[414]: Journal stopped ``` (System hangs after this point — no further progress, hard power-off required) ### Additional Notes - `amdgpu.runpm=0` was tested on 7.0.0-28 — did NOT help (rules out amdgpu runtime PM) - The `drm_fb_helper_damage_work hogged CPU for >10000us` warning appears in kernel logs, but this may be unrelated - The issue affects both shutdown and reboot equally, ruling out ACPI wakeup GPE issues ### Related - LP: #2072679 (SAUCE: PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of) - LP: #2156636 (Resolute update: v7.0.12 upstream stable release) ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: linux-image-generic 7.0.0-29.29 ProcVersionSignature: Ubuntu 7.0.0-29.29-generic 7.0.12 Uname: Linux 7.0.0-29-generic x86_64 ApportVersion: 2.34.1-0ubuntu0.1 Architecture: amd64 AudioDevicesInUse:  USER PID ACCESS COMMAND  /dev/snd/controlC2: tommyq 2222 F.... wireplumber  /dev/snd/controlC1: tommyq 2222 F.... wireplumber  /dev/snd/controlC0: tommyq 2222 F.... wireplumber  /dev/snd/seq: tommyq 2198 F.... pipewire CasperMD5CheckResult: pass CurrentDesktop: KDE Date: Thu Aug 6 15:37:11 2026 InstallationDate: Installed on 2022-11-11 (1364 days ago) InstallationMedia: Kubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221020) MachineType: Gigabyte Technology Co., Ltd. X570 AORUS ELITE ProcEnviron:  LANG=cs_CZ.UTF-8  LANGUAGE=  PATH=(custom, no user)  SHELL=/bin/bash  XDG_RUNTIME_DIR=<set> ProcFB: 0 amdgpudrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-29-generic root=UUID=6e49607c-2ecc-46c8-869f-dca543a37ec6 ro ipv6.disable_ipv6=1 pcie_aspm=off quiet splash PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon. RfKill:  0: hci0: Bluetooth   Soft blocked: yes   Hard blocked: no SourcePackage: linux UpgradeStatus: Upgraded to resolute on 2026-03-28 (131 days ago) acpidump:  Error: command ['pkexec', '/usr/share/apport/dump_acpi_tables.py'] failed with exit code 127: Error executing command as another user: Not authorized  This incident has been reported. dmi.bios.date: 10/28/2025 dmi.bios.release: 5.17 dmi.bios.vendor: American Megatrends International, LLC. dmi.bios.version: F40 dmi.board.asset.tag: Default string dmi.board.name: X570 AORUS ELITE dmi.board.vendor: Gigabyte Technology Co., Ltd. dmi.board.version: Default string dmi.chassis.asset.tag: Default string dmi.chassis.type: 3 dmi.chassis.vendor: Default string dmi.chassis.version: Default string dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrF40:bd10/28/2025:br5.17:svnGigabyteTechnologyCo.,Ltd.:pnX570AORUSELITE:pvr-CF:rvnGigabyteTechnologyCo.,Ltd.:rnX570AORUSELITE:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:skuDefaultstring:pfaX570MB: dmi.product.family: X570 MB dmi.product.name: X570 AORUS ELITE dmi.product.sku: Default string dmi.product.version: -CF dmi.sys.vendor: Gigabyte Technology Co., Ltd. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2162959/+subscriptions

Комментариев нет:

Отправить комментарий