Gpu/Video decoding issue

Hello, currently some videos cause my gpu to “wedge”. They lag visually but play audio fine. Playing downloaded movies via mpv or streaming videos on youtube both suffer from this. Software decoding also seems to play youtube and a downloaded movie just fine. My gpu benchmarks fine as well as games fine other than superposition benchmark not detecting my vram here where as it did when i was testing mint.

Error source: dmesg | grep amdgpu

[24915.516603] amdgpu 0000:03:00.0: [drm] device wedged, but recovered through reset
[24930.225167] amdgpu 0000:03:00.0: amdgpu: Dumping IP State
[24930.227151] amdgpu 0000:03:00.0: amdgpu: Dumping IP State Completed
[24930.227164] amdgpu 0000:03:00.0: amdgpu: [drm] AMDGPU device coredump file has been created
[24930.227166] amdgpu 0000:03:00.0: amdgpu: [drm] Check your /sys/class/drm/card1/device/devcoredump/data
[24930.227167] amdgpu 0000:03:00.0: amdgpu: ring vcn_unified_0 timeout, signaled seq=34849, emitted seq=34850
[24930.227170] amdgpu 0000:03:00.0: amdgpu: Process mpv pid 36619 thread vo pid 36638
[24930.227172] amdgpu 0000:03:00.0: amdgpu: Starting vcn_unified_0 ring reset
[24930.233920] amdgpu 0000:03:00.0: amdgpu: Ring vcn_unified_0 reset succeeded
[24930.233923] amdgpu 0000:03:00.0: [drm] device wedged, but recovered through reset

System info

Operating System: EndeavourOS
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.19.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 32 GiB of RAM (30.7 GiB usable)
Graphics Processor: AMD Radeon RX 7900 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7E70
System Version: 2.0

vainfo

Trying display: wayland
vainfo: VA-API version: 1.23 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 26.0.2-arch1.1 for AMD Radeon RX 7900 XT (radeonsi, navi31, ACO, DRM 3.64, 6.19.8-arch1-1)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointEncSlice
VAProfileAV1Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

  • mpv --vo=gpu --gpu-api=opengl --hwdec=vaapi --ytdl-format=“bestvideo[vcodec=av1]+bestaudio/best” <video_url>… Results in dmesg errors
  • mpv --vo=gpu --gpu-api=opengl --hwdec=no --ytdl-format=“bestvideo[vcodec=av1]+bestaudio/best” <video_url> Plays videos just fine.

I attempted this with VG9 as well and seemed to have better results for a while but further testing seems to crop up with issues intermittently. I saw a suggestion to add amdgpu.gpu_recovery=1 to kernel config which seemed to keep the crash messages from sending as often but did not further resolve the issue.

I would love help and thoughts on this as well as requests for any more information I can provide to search for a solution. pacman -Syu has been run to ensure everything is up to date as well.

I wonder that allowing mpv to self-select hardware acceleration might yield better results @eucalyptis :

mpv --vo=gpu-next --hwdec=auto --ytdl-format=“bestvideo[vcodec=av1]+bestaudio/best” <video_url>

That’s using gpu-next as it supersedes gpu (GPU-Next vs GPU), and using auto as the hardware decoding option. I anticipate it’ll select vulkan.

Using hardware decoding (vulkan).
AO: [pipewire] 44100Hz stereo 2ch floatp
VO: [gpu-next] 1920x1080 vulkan[nv12]

Vulcan is being selection and when using both av1 and vg9 it does feel initially better. I may run for a few hours trying to test like this. If gpu-next does seem to be a decent solution for my issues is there an easy implementaion in firefox for longterm use? I believe I can set mpv up something like this? Not sure if I need to specify av1 if both end up smooth.

mpv config

vo=gpu-next
gpu-api=opengl

hwdec=auto

ytdl-format=bestvideo[vcodec=av1]+bestaudio/best

profile=fast

I’d suggest leaving off gpu-api=opengl, as you’re using Vulkan. If you’d like to specify it, it should probably be --gpu-api=vulkan.

why are you using opengl? it’s outdated.

Try this:

 mpv --no-config --video-sync=audio --gpu-api=vulkan --vo=gpu-next --hwdec=auto file.mp4