mpv
mpv copied to clipboard
Both gpu-next and hwdec=vulkan causes unstable refresh rate on a monitor in adaptive-sync mode.
mpv Information
mpv v0.38.0-711-g67e087dcae Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0 (v7.349.0-5-g82bf46ae)
FFmpeg version: N-116730-g7e5410eadb
FFmpeg library versions:
libavcodec 61.11.100
libavdevice 61.2.100
libavfilter 10.2.102
libavformat 61.5.101
libavutil 59.34.100
libswresample 5.2.100
libswscale 8.2.100
Other Information
- Linux version: Arch Linux
- Kernel Version: 6.10.5-zen1-1-zen
- GPU Model: [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c0)
- Mesa/GPU Driver Version:Mesa 24.1.6-arch1.1
- Window Manager and Version: KWin 6.1.4-1
- Source mpv: AUR mpv-build-git
- Introduced in version:
Reproduction Steps
It causes unstable refresh rate in adaptive sync mode. There are 5 situations that I have tested.
vo=gpu+no hwdec+target-colorspace-hint=yes= stable.vo=gpu-next+no hwdec+target-colorspace-hint=yes= unstable.vo=gpu-next+hwdec=vaapi+target-colorspace-hint=yes= stable.vo=gpu-next+hwdec=vulkan+gpu-context=waylandvk+target-colorspace-hint=yes= unstablevo=gpu-next+no hwdec+gpu-context=waylandvk+target-colorspace-hint=yes= stable
Expected Behavior
No matter gpu-next or hwdec=vulkan, the refresh rate should be as stable as default.
Actual Behavior
They causes issue in adaptive sync mode.
Log File
- vo=gpu.log
- vo=gpu-next.log
- vo=gpu-next_hwdec=vaapi.log
- vo=gpu-next_hwdec=vulkan.log
- vo=gpu-next_no-hwdec_waylandvk.log
Sample Files
Any videos, but you can search [email protected]_15200kbps_fmp4
I carefully read all instruction and confirm that I did the following:
- [X] I tested with the latest mpv version to validate that the issue is not already fixed.
- [X] I provided all required information including system and mpv version.
- [X] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - [X] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [X] I attached the full, untruncated log file.
- [X] I attached the backtrace in the case of a crash.
What does "unstable" mean and how are you checking your refresh rate? And what is your configured modeline?
What does "unstable" mean and how are you checking your refresh rate? And what is your configured modeline?
The OSD on my monitor. https://youtu.be/EtiwF7JNKag
If the videos is at 60fps, the refresh rate should be near 60Hz, it does show on the stable result.
target-colorspace-hint=yes
Is this relevant to reproducing the issue? Also I can't reproduce on sway, can you try another compositor?
target-colorspace-hint=yes
Is this relevant to reproducing the issue?
After removing target-colorspace-hint=yes, the refresh rate is much stable, but not as stable as those stable results.
I need it to play HDR videos on HDR monitor.
Also I can't reproduce on sway, can you try another compositor?
It also happens on Gnome46.
What does "unstable" mean and how are you checking your refresh rate? And what is your configured modeline?
It is how a stable refresh rate looks like: https://youtu.be/_x7xZ2PGk2E
By the way, ENABLE_HDR_WSI=1 is in /etc/environment, with it, I can watch HDR videos directly in KDE Plasma6.1.
It shouldn't be the reason to cause the problem, becasue Gnome has the problem, too.
Is this still an issue? I still can't reproduce this. If this only occurs with target-colorspace-hint=yes then the issue is most likely elsewhere
vo=gpu + no hwdec + target-colorspace-hint=yes = stable.
target-colorspace-hint=yes does nothing for vo=gpu.
Does your monitor have issues with VRR and HDR enabled? mpv literally does not care about VRR, so only thing that differs is enabling HDR apparently, in your monitor.
Highly doubt gpu-next is a factor here.
Same problem here. With gnome wayland session. gpu-next nvdec context=x11vk combination works smooth, gpu-next nvdec context=waylandvk stutters. Btw, waylandvk seems to have better color.