ERROR: ring vcn_unified_0 timeout - when using VAAPI encoder
(I know there is already an issue for "ring sdma0 timeout" (#2220 (closed)) and "ring gfx_0.0.0 timeout" (#2220 (closed)) but I'm having a different ring timeout error - "vcn_unified_0", so I decided to create this separate issue. If I should post this into one of the existing, please let me know)
Brief summary of the problem:
When using VAAPI encoding (HEVC / AV1) via FFMPEG (OBS-studio, Shotcut), I'm getting soft crashes with "ERROR ring sdma1 timeout" leading either to GNOME crash (login screen - GDM - appears) or black screen (that can only be escaped by reboot). It generates a lot of errors in journalctl, so that hopefully speaks for itself.
This only happens while:
- recording via OBS Studio (so far only happened once)
- encoding/rendering a video in Shotcut (99% of the time when this issue occurs)
Usually it helps to start the rendering again, then there's a ~50% chance the issue occurs again. If it happens 3 times in a row, reboot usually helps to get the rendering done. Can't reproduce this while not using VAAPI. As someone doing YT videos on Linux, I hit this bug often.
Hardware description:
- CPU: AMD Ryzen 5 7600
- GPU: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev cc)
- GPU model: Sapphire Pulse 7900 XT
- System Memory: 32GB DDR5
- Display(s): Samsung Odyssey G40B
- Type of Display Connection: DP
System information:
- Distro name and Version: Arch Linux
- Kernel version: 6.7.5-arch1-1
- Custom kernel: no, vanilla Arch
- AMD official driver version: mesa 1:24.0.1-1
How to reproduce the issue:
Encode a video using FFMPEG VAAPI (hevc_vaapi or av1_vaapi), preferably a longer high bitrate video. The one I'm using right now to trigger the bug is a 1:26:27 long 1080p gameplay video from GTA 5 recorded via ffmpeg HEVC (QP18) and encoded into ffmpeg AV1 (vglobal_quality=33) 1440p.
Log files (for system lockups / game freezes / crashes)
- Dmesg log: dmesg.txt
- Journalctl crash: vcn_timeout.txt