mpv
mpv copied to clipboard
gpu-next + vulkan under heavy system load leads to partially presented or out-of-order frames on amdgpu
Important Information
Provide following Information:
- mpv version: mpv v0.37.0-663-g9cee44147a and libplacebo v7.349.0 (v6.338.0-120-g7b294350-dirty)
- Linux Distribution and Version: Arch Linux, x86_64, Linux 6.8.2-arch2-1
- Source of the mpv binary: mpv-build
- If known which version of mpv introduced the problem: N/A
- Window Manager and version: kwin_wayland 6.0.2
- GPU model, driver and version: AMD Radeon Vega 10 iGPU (Ryzen 7 Pro 3700U "Picasso"), Mesa 24.0.3, RADV
- Possible screenshot or video of visual glitches: https://overviewer.org/~pillow/up/0306cb4fe7/corruption_vulkan_gpu-next.mp4
Reproduction steps
Be on a Ryzen 7 Pro 3700U, have some CPU-heavy task running in the background making the whole SoC throttle to stay within its power envelope.
mpv --no-config --log-file=/tmp/mpvsucks-vulkanagain.log --gpu-api=vulkan --profile=high-quality --vo=gpu-next --hwdec=auto --ytdl-format='bestvideo[height<=1080]+bestaudio/best' https://www.youtube.com/watch?v=dpiYR1_CsiI
Glitches do not happen with OpenGL. Glitches do not happen with vo=dmabuf-wayland.
Glitches also occasionally occur without CPU heavy tasks in the background, probably due to something taking a little too long and ruining the timing.
Expected behavior
mpv drops the whole frame.
Actual behavior
mpv partially draws the frame, sometimes drawing a few frames in the future or past but only in parts, and is generally unpleasant to look at.
Log file
https://overviewer.org/~pillow/up/d916e5bf9c/mpvsucks-vulkanagain.log
Sample files
YouTube link in the repro command should suffice.
And here's another logfile with both mpv and libplacebo updated to latest master and rebuilt without whatever weird shit keeps touching my git checkouts preventing the git pulls of ./rebuild from working: https://overviewer.org/~pillow/up/53b48aa64b/mpvsucks-vulkanupdated.log
same happens on arm device: Rk3288. --vo=gpu-next --gpu-hwdec-interop=drmprime
very high system load compares with --vo=gpu --gpu-hwdec-interop=drmprime-overlay
with a cooling fan at full speed, system temperature still higher than 70C.
and also glitches.
I have an issue which looks identical to the demo video provided here.
Ryzen 5000 U-series, amdgpu Sway. 4K screen, scale factor 2.
vo=gpu-next gpu-api=vulkan gpu-context=waylandvk hwdec=vulkan profile=gpu-hq
No system load. No load with video playing. hwdec appears irrelevant. Source is h264 480p video. Happens when playback speed is > ~2x Issue manifests when fullscreen or window size crosses a threshold.
commenting out
profile=gpu-hq
Resolves the issue.
Might be related to: https://github.com/Nevcairiel/LAVFilters/issues/496 https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/380 Unless it also happen without hwdec, which the above issues are mostly about.
Only happens with hwdec, can still reproduce as of current master.
Can you reproduce with ffplay or ffmpeg?
No, on account of ffplay crashing xwayland.
This also only happens with hwdec=vaapi + gpu-next, and not with hwdec=vulkan + gpu-next as reported in IRC.