Describe the bug
After resuming from S3 suspend, the amdgpu kernel driver fails to restore KFD (Kernel Fusion Driver) process buffers, returning -EFAULT (-14). This causes the GPU driver resume to fail, which cascades into a KWin Wayland crash and a complete collapse of the Plasma session. The issue occurred when Ollama was actively using the GPU for local LLM inference (Ollama uses the ROCm/HSA backend on AMD GPUs via the amdgpu driver and KFD).
To Reproduce
Steps to reproduce the behaviour:
- Boot Manjaro KDE on a system with an AMD Radeon RX 7900 XTX (Navi 31 / RDNA3)
- Run Ollama with a large model loaded (e.g., llama3, mixtral) to heavily utilize VRAM via ROCm
- Ensure KFD module is loaded (default when Ollama uses GPU acceleration on AMD)
- (Suspected trigger): Ensure VRAM is near capacity (model fully loaded in VRAM)
- Trigger S3 suspend (sleep) via system menu or systemctl suspend
- Wake the system from suspend
- Observe the immediate crash of the display server and session fallback Note: I regularly resume from S3 without issues on this same hardware/kernel when Ollama is idle or when VRAM pressure is low. This crash only occurred when VRAM was heavily utilized at suspend time. I have not yet fully confirmed if high VRAM usage is the strict reproducible trigger, but it is highly suspected to be a contributing factor.
Expected behaviour
The system should resume from S3 suspend normally. The amdgpu driver should successfully restore GPU memory buffers via TTM/KFD without allocation failures, and the Plasma Wayland session should remain stable post-resume, regardless of prior VRAM usage.
Environment:
- Desktop Environment: KDE Plasma 6 (Wayland / KWin)
- Kernel Version: 7.0.9-1-MANJARO
- Manjaro Version: 26.1.0pre (rolling/unstable)
- Graphics Driver: AMD amdgpu (open-source) + ROCm HSA Runtime: v1.18 (gfx1100, 24 GB VRAM, 96 CUs) via Ollama v0.24.0 GPU acceleration
- Device: Desktop workstation (Motherboard: ASUS ROG CROSSHAIR VIII FORMULA, BIOS 5002 (2025-01-13)
Ryzen 5800X CPU, RAM: 32 GB (4x 8 GB DDR4 G.Skill), Radeon RX 7900 XTX Navi 31)
Additional context
The root cause is a failure in amdgpu_pmops_resume() during the KFD buffer restoration phase. The driver attempts to allocate contiguous memory via amdgpu_ttm_tt_populate(), which fails with -EFAULT (-14), likely due to a regression in the TTM/KFD resume path for RDNA3 GPUs when KFD processes hold large VRAM allocations.
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [1002:744c] (rev c8)
Subsystem: ASUSTeK Computer Inc. TUF Gaming Radeon RX 7900 XTX OC [1043:0506]
Kernel driver in use: amdgpu
Key kernel logs at resume time (journalctl -k around the event):
amdgpu 0000:0d:00.0: smu driver if version = 0x0000003d, smu fw if version = 0x00000040
amdgpu 0000:0d:00.0: SMU driver if version not matched
amdgpu 0000:0d:00.0: [drm] DMUB hardware initialized: version=0x07002F00
amdgpu: amdgpu_pmops_resume failed (-14)
pci 0000:0d:00.0: D3cold exit failed, device not available
Call trace points to:
amdgpu_amdkfd_gpuvm_restore_process_bos() → amdgpu_amdkfd_bo_validate() → amdgpu_ttm_tt_populate() returning -EFAULT
At the moment of failure, the system had ~379 MB free RAM + 22.6 GB swap available, ruling out a system-wide OOM condition. The failure is strictly tied to KFD's buffer validation during resume. It is suspected that high VRAM utilization at suspend time exacerbates or triggers this driver regression, as Ollama was running a large model in VRAM at the time.
Describe the bug
After resuming from S3 suspend, the amdgpu kernel driver fails to restore KFD (Kernel Fusion Driver) process buffers, returning -EFAULT (-14). This causes the GPU driver resume to fail, which cascades into a KWin Wayland crash and a complete collapse of the Plasma session. The issue occurred when Ollama was actively using the GPU for local LLM inference (Ollama uses the ROCm/HSA backend on AMD GPUs via the amdgpu driver and KFD).
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
The system should resume from S3 suspend normally. The amdgpu driver should successfully restore GPU memory buffers via TTM/KFD without allocation failures, and the Plasma Wayland session should remain stable post-resume, regardless of prior VRAM usage.
Environment:
Ryzen 5800X CPU, RAM: 32 GB (4x 8 GB DDR4 G.Skill), Radeon RX 7900 XTX Navi 31)
Additional context
The root cause is a failure in amdgpu_pmops_resume() during the KFD buffer restoration phase. The driver attempts to allocate contiguous memory via amdgpu_ttm_tt_populate(), which fails with -EFAULT (-14), likely due to a regression in the TTM/KFD resume path for RDNA3 GPUs when KFD processes hold large VRAM allocations.
Key kernel logs at resume time (journalctl -k around the event):
Call trace points to:
amdgpu_amdkfd_gpuvm_restore_process_bos() → amdgpu_amdkfd_bo_validate() → amdgpu_ttm_tt_populate() returning -EFAULT
At the moment of failure, the system had ~379 MB free RAM + 22.6 GB swap available, ruling out a system-wide OOM condition. The failure is strictly tied to KFD's buffer validation during resume. It is suspected that high VRAM utilization at suspend time exacerbates or triggers this driver regression, as Ollama was running a large model in VRAM at the time.