xHCI S4-resume regression on AMD Strix Halo: "invalid context state" warnings, USB devices die ~10s after hibernate wake (7.2.5-3 fine, 7.2.8-9 broken)
xHCI S4-resume regression on AMD Strix Halo: "invalid context state" warnings, USB devices die ~10s after hibernate wake (7.2.5-3 fine, 7.2.8-9 broken)
Summary
After upgrading linux-omarchy from 7.2.5-3 to 7.2.8-9, every hibernate (S4)
resume logs WARN: invalid context state for evaluate context command for
several USB devices. The devices enumerate normally and work for roughly 10
seconds, after which the xHCI driver's next port operation fails with
cannot reset (err = -71) / Cannot enable. Maybe the USB cable is bad? and
the input stack disappears. Only a real VBUS power cycle (physical replug)
restores the device.
Zero occurrences on 7.2.5-3 across many hibernate cycles; reproducible on every wake since the upgrade.
Environment
- HP Z2 Mini G1a Workstation Desktop PC (board
8D1D), BIOSX53 Ver. 01.08.00 - AMD Ryzen AI MAX+ PRO 395 (Strix Halo) w/ Radeon 8060S
- xHCI controllers:
1022:1587,1022:1588,1022:1589,1022:158b(Strix Halo USB 3.1 xHCI); USB4 Host Routers1022:158d/1022:158e - Kernel:
linux-omarchy 7.2.8-9(#1 SMP PREEMPT_DYNAMIC Sat, 17 Oct 2026 22:09:33 +0000), build date 2026-10-17 - Previous kernel:
linux-omarchy 7.2.5-3— no USB resume issues - systemd 262.1-1, hibernate to swap (S4)
Regression window
| Date | Kernel | Hibernate resumes | USB xHCI resume issues |
|---|---|---|---|
| 2026-10-13 .. 10-17 | 7.2.5-3 | multiple | none |
| 2026-10-18 07:09 | upgrade 7.2.5-3 → 7.2.8-9 | — | — |
| 2026-10-18 19:27 onward | 7.2.8-9 | 6 | 6/6 failed |
Reproduction
systemctl hibernate- Wake (power button)
- Kernel log at resume shows the warnings below for the affected devices.
- The System76 Launch keyboard (behind hubs
3-5→3-5.1) works for ~10 s, then dies; the SteelSeries mouse and UGREEN BT dongle are also affected but can be recovered with a deauthorize/reauthorize bounce. - The keyboard remains dead until its upstream port is power-cycled.
Evidence (journal excerpt, wake of 2026-10-22 21:16)
21:16:13 kernel: usb 3-5: reset high-speed USB device number 3 using xhci_hcd
21:16:13 kernel: usb 3-4.2: WARN: invalid context state for evaluate context command.
21:16:13 kernel: usb 3-5.2: WARN: invalid context state for evaluate context command.
21:16:13 kernel: usb 2-1: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
21:16:13 kernel: usb 3-5.1.5: WARN: invalid context state for evaluate context command.
21:16:13 kernel: usb 3-5.1.5: reset full-speed USB device number 7 using xhci_hcd
21:16:13 kernel: usb 2-1.1: reset SuperSpeed Plus Gen 2x1 USB device number 3 using xhci_hcd
... keyboard enumerates, input works for ~10 seconds ...
21:16:25 kernel: usb 3-5.1-port5: cannot reset (err = -71) [x dozens]
21:16:25 kernel: usb 3-5.1-port5: Cannot enable. Maybe the USB cable is bad?
21:16:25 kernel: usb 3-5.1-port5: cannot disable (err = -71)
... input stack gone; only a port power cycle (replug) recovers it ...
-71 is EPROTO. The "invalid context state" WARN appears at resume, and the
port failure follows ~10 s later — the devices limp along on broken endpoint
contexts until the next port operation.
Workarounds in use locally
- systemd-sleep hook power-cycles the keyboard's upstream hub port via
ClearPortFeature/SET_PORT_FEATURE(PORT_POWER)on hub3-5port 1 (both USB2 personality3-5.1.5and USB3 personality2-1.1), which restores the keyboard; mouse/BT dongle recover via deauthorize/reauthorize. - This is purely recovery, not a fix; the underlying resume state is broken on every wake.
Ask
What changed in xHCI / USB power management (or kernel config) between
7.2.5-3 and 7.2.8-9? Can the offending change be identified/reverted, or is
there a known workaround (module parameter, quirk)? Happy to test patches or
provide more traces (ftrace of xhci, dmesg full dump, etc.).
Follow-up: pcie_aspm=off tested — negative, ASPM is not involved.
- Added the parameter via a Limine cmdline drop-in, rebuilt the UKI, and verified it is present in the UKI
.cmdlinesection and in/proc/cmdline. - Kernel log confirms it took effect:
PCIe ASPM is disabled(plusACPI FADT declares the system doesn't support PCIe ASPM, so disable it— so this platform's ASPM was already largely inert). - Two hibernate cycles with ASPM disabled: identical failure. Same
WARN: invalid context state for evaluate context commandfor3-4.2,3-5.1.5,3-5.2, and the sameusb 3-5.1-port5: cannot reset (err = -71)storm (~20 occurrences per wake,EPROTO).
Extra scoping data from these runs (may help narrow it down):
- All affected devices are children of hubs on
0000:c5:00.0(1022:1588, Strix Halo xHCI). - Devices behind hubs on other controllers — e.g.
0000:c3:00.4(1022:1587), where the keyboard's USB3 personality2-1.1lives — resume without warnings. - So the corruption is scoped to hub-attached devices on that one controller, not to a particular device or hub model: the warned set spans two different hubs (
3-4and3-5).
Reverted the parameter (rebuild confirmed: no pcie_aspm in the UKI cmdline or /boot/limine.conf).
Happy to capture xhci_hcd dynamic-debug traces across a resume and attach them here if that would help locate the bad context restore.
Correction, plus dynamic-debug trace of the actual failure
Retracting one claim from my earlier comments: the usb 3-5.1-port5: cannot reset (err = -71) storm is not evidence of this kernel bug — it is produced by my local recovery hook's VBUS power-cycle (cutting power to a port the kernel still believes is live). Measured across five S4 wakes tonight:
| Wake | VBUS cycled by hook? | -71 lines |
|---|---|---|
| 21:16 | yes | 20 |
| 21:30 | yes | 20 |
| 21:41 | yes | 20 |
| 21:43 | yes | 20 |
| 21:58 | no | 0 |
Sorry for the noise. Everything below is from a xhci_hcd dynamic-debug capture across a resume (full trace: https://gist.github.com/jparlay/02f04a8c6c7a9d07524519433ea871fd).
What actually happens at resume
Every controller reports state loss (expected for S4):
xhci_hcd 0000:c5:00.0: HC state lost, performing host controller reset
After the reset, the reset-resume path refuses every device, because the slots are left in Default state:
xhci_hcd 0000:c5:00.0: Resetting device with slot ID 6
xhci_hcd 0000:c5:00.0: Can't reset device (slot ID 6) in default state
xhci_hcd 0000:c5:00.0: Not freeing device rings.
xhci_hcd 0000:c5:00.0: Successful setup address command
xhci_hcd 0000:c5:00.0: Max Packet Size for ep 0 changed.
xhci_hcd 0000:c5:00.0: Max packet size in usb_device = 64
xhci_hcd 0000:c5:00.0: Max packet size in xHCI HW = 0
xhci_hcd 0000:c5:00.0: Issuing evaluate context command.
usb 3-5.1.5: WARN: invalid context state for evaluate context command.
Can't reset device (slot ID N) in default state fires for all slots (1–7), i.e. every device on this controller, and the subsequent evaluate context runs while the slot's max-packet size is still 0 in hardware.
It is intermittent, and the warning is not a failure predictor
On wake 21:58 the identical three WARN: invalid context state lines appeared — yet the keyboard registered all its input nodes 4 seconds after resume and stayed healthy for 20+ seconds untouched. On wake 21:16 the same warnings appeared and the keyboard never registered input (checked for 11s+).
So: warnings ≈ always; actual failure ≈ sometimes.
Failure mode when it does fail
The System76 Launch is a composite device behind two hub levels (3-5 → 3-5.1 → 3-5.1.5). On failing wakes its HID interfaces never bind, and its downstream port shows a connect change:
usb 3-5.1-port5: status 0101 change 0001
after which nothing further happens — no retry, no recovery. Cutting and restoring VBUS on the upstream hub port (ClearPortFeature(PORT_POWER) / SetPortFeature(PORT_POWER) on 3-5 port 1, ~1.5s off, no unplug) brings the device back every time within ~2s.
Scoping (unchanged)
Only hub-attached devices on 0000:c5:00.0 (1022:1588) are affected. Devices behind hubs on 0000:c3:00.4 (1022:1587) — including this keyboard's own SuperSpeed personality 2-1.1 — resume cleanly.
Question for the maintainers: in the HC-lost-state resume path, is a device slot expected to be in Default state when xhci_reset_device() is called, and is the re-address + evaluate-context path with Max packet size in xHCI HW = 0 known to be handled? Happy to run any debug patches or provide more traces.
I read the report and both follow-ups. Your correction separates the recovery hook’s -71 errors from the intermittent failure of the keyboard’s HID interfaces to bind; the context warnings also occur on successful wakes, so they do not establish the cause by themselves. I have not reproduced this on the HP/Strix Halo hardware or verified a fix.
This pass was reviewed only by GPT-6 in Codex (reasoning effort is not exposed to this session). I classified the report as hardware compatibility, but the configured classification model, DeepSeek v4p1 Flash, returned no valid classification. Classification remains unsettled, so no labels or code changes were applied. This is waiting for maintainer review before diagnosis continues.