Skip to main content
Question

S3 suspend/resume → permanent DMA timeout on Metis M.2 (AMD64 desktop) — driver has no resume path. Please fix or document.

  • June 14, 2026
  • 2 replies
  • 87 views

Hello, i just got my m.2 card and on my AMD64 desktop workstation, the Metis M.2 AIPU does not survive an S3
(suspend-to-RAM) cycle. After resume, every large DMA transfer to the card
fails permanently. Only a full cold power-cycle restores function — a warm
reboot is not enough. This makes the card unusable on any normal desktop,
where suspend/resume is the standard daily workflow.

I narrowed this down together with Claude Opus 4.8 (Anthropic) over a detailed
debugging session. Full diagnosis below.

## Hardware / Software

- Host: AMD Ryzen, B850 platform, RTX 3090 in primary slot
- OS: CachyOS (Arch-based), kernel 7.0.12 (Clang/LLVM-built), Secure Boot off
- Metis M.2 AIPU, PCIe 0000:0c:00.0 (1f9d:1100 rev 02), Gen3 x4
- Driver: axelera-driver release/v1.6 (module version 1.4.17), built with
  make LLVM=1, DKMS-managed
- SDK: Voyager 1.6.1 (axelera-rt / devkit), inference via distrobox/Ubuntu 24.04

## Reproduction

1. Cold boot. Run inference (yolo26s-coco-onnx, fakevideo) → works, ~529 fps.
2. systemctl suspend → resume (verified as a real S3 resume via dmesg marker,
   NOT a reboot).
3. Run the same inference again → DMA timeout, crash.

Kernel side:
  axl 0000:0c:00.0: DMA RD CH0 timeout (irq 4)
  axl 0000:0c:00.0: DMA WR CH0 status -110
Userspace side:
  DMABUF_METIS_WAIT failed: Connection timed out
  Failed to write module binary to device memory
  → inference aborts.

## Key diagnostic evidence (this is the important part)

After resume, with DMA already dead, I checked the device state:

- power_state = D0 (NOT D3cold)
- runtime PM = active
- PCIe link = full 8GT/s x4
- DevSta clean: no CorrErr / NonFatalErr / FatalErr
- dmesg from the resume marker onward shows NO AER and NO DMA error at resume
  itself — only "axl vmsi configured" (driver re-inits MSI).
- No AMD-Vi IO_PAGE_FAULT → IOMMU is not involved.

So the link never drops, ASPM is not the cause, and the device does not fall
into D3cold. The loss is device-internal: the DMA engine (and the on-device
firmware / model-binary state) is lost across S3, and the driver's resume only
re-initializes MSI — it never re-initializes the DMA engine or reloads
firmware. This is consistent with the fact that only a cold power-cycle
(= firmware reload) recovers the card.

## Things that do NOT fix it (already tested, please save others the time)

- pcie_port_pm=off : no effect (link never enters D3cold anyway)
- pcie_aspm=off : pointless (link is already full speed)
- axdevice --reboot (device self-reset) : does NOT restore DMA
- PCIe remove + rescan as a resume workaround
  (echo 1 > /sys/.../remove ; echo 1 > /sys/bus/pci/rescan) :
  caused a complete kernel HARD-FREEZE requiring a hard power-off — see
  related unload bug below.

## Related driver bug (likely blocks a clean resume workaround)

modprobe -r metis / rmmod metis crashes in the unload path:
  RIP: axl_aipu_irq_fn_metis+0x27 [metis], called from cleanup_module
i.e. the IRQ handler fires (card sends an MSI) while module_exit is already
freeing DMA memory → use-after-free. cleanup_module never completes, module
stuck in "going", refcnt -1, only a reboot recovers. The PCIe sysfs "remove"
path hits this same detach code, which is why remove+rescan freezes the box.
Interrupts appear to be torn down too late in the v1.4.17 unload sequence.

## Request

This issue is already acknowledged by Axelera staff on AMD64 and RK3588
("systematic warm-boot issue across multiple host platforms", cold power-cycle
required), and the SDK v1.2.5 release notes (SDK-5176) document the same cold-power-cycle requirement for RK3588 hosts. But there is currently NO suspend/resume (.suspend/.resume
dev_pm_ops) path in the driver at all.

For anyone using Metis in a desktop/workstation — not a 24/7 edge box —
suspend/resume is mandatory. Please either:
  1. implement a proper S3 resume path (re-init DMA engine + reload firmware
     on .resume), and
  2. fix the unload/detach IRQ ordering so a remove+rescan recovery is at
     least possible,
or, at minimum, document prominently that the card requires a cold power-cycle
and is not suitable for systems that suspend.

Happy to provide full dmesg, lspci -vvv, and re-run any diagnostics you need.

 

As a note, i really wanted to play arround with this card but the suspend thing is really a deal breaker for my use case.

 

Best regards,

 

Markus with the help of opus 4.8

2 replies

  • Author
  • Cadet
  • June 15, 2026

hi, there was a issue in the kernel and the card could not be proper released with modprobe -r metis nor used after s3 suspend.  i am not a programmer, but opus 4.8 fixed it and made a hook so that i can use the card after s3 suspend which is handy for me and my project. here is the issue and fix

https://github.com/axelera-ai-hub/axelera-driver/issues/4

maybe it is of use.

best regards,

 

Markus

 


Forum|alt.badge.img
  • Cadet
  • August 12, 2026

I had the exact same thing on my AM5 desktop, Metis M.2 in a Gen3 x4 slot, and it drove me crazy for a couple of weeks. Cold boot was the only thing that "fixed" it for me too, and that's obviously not a workflow.
What ended up working: the driver genuinely has no resume path, so instead of fighting it I made the kernel reload it on wake. A simple hook in /usr/lib/systemd/system-sleep/ (or a udev rule if you prefer) that does rmmod metis && modprobe metis after resume. I also disabled ASPM on that specific PCIe root port (setpci on the port / pcie_aspm=off in the kernel cmdline) and set the port's power control to on so the link doesn't go into a low-power state it can't recover from. After that, suspend/resume has been stable for me.
One thing I noticed: on my board the issue was much more reproducible when the NVMe and the Metis shared the same controller, and it got worse once I enabled suspend-to-idle vs deep. Might be worth checking what your BIOS is actually doing — on a lot of AM5 boards the default S3 is really s2idle, and it behaves differently.
Also, since you're on CachyOS: if you ever reboot instead of power-cycle after a hang, don't bother, warm reboot doesn't clear it either. That matched my experience 1:1.