-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpu-context=wayland performance drop #7063
Comments
Try the master branch. It should be better I think (at least it seems that way for me). |
It really performs worse on wayland with the git version of MPV. |
Compiled the master branch ( mpv 0.29.0-851-g2fcd5271eb ) offtopic: |
To be clear, how does the performance of
There is a |
@Dudemanguy I'm aware of --vo=drm, that's why I mentioned it :P Will try out wlshm now :] edit: wlshm works, looks to be about the same as x11 / x11egl, if not a smidgen better. |
Yeah this seems pretty bad. Hopefully I can just cop out and blame drivers here. Doing some more testing on my Haswell, I seem to get basically the same fps (it isn't possible to disable vsync for wayland and benchmark in the master branch atm, but in one of my local branches it is) in sway regardless of x11egl/x11/wayland. Actually testing in i3, I seem to get slightly lower fps than in wayland which is interesting.
Hmm, I guess I should investigate further into this too. |
I finally got my new notebook battery from China and could give it a go on that Gemini Lake 2 core system: Playback seems to work flawlessly on Sway-git with VAAPI, OGL and Vulkan. Vsync jitter of ~0. |
Btw @SairesArt, you can benckmark the wayland backend in the master branch now if you use P.S. Oh and use sway-git/wlroots-git not 1.2. Sway's master branch has some additional fixes. |
@Dudemanguy I built sway, mpv and ffmpeg from git and magically, the performance is vastly improved! First of all: gpu-context=wayland has a major bug now: If A-V desync happens, it does not resync back by default! The default --video-sync=audio suddenly behaves like desync. It is not broken under gpu-context=x11 For some reason neither osd-msg1 nor term-status-msg report any dynamic data. It all remains just a static message like "fps", although pressing I shows information like estimated-display-fps properly. So I measured with two other methods: 1. I timed a long video without vsync and calculated fps based on time passed and total frames in the video file. This was done 5 times and times were averaged. 2. recorded dropped frames when vsynced. Now for the numbers... |
The fallback mechanism was removed 273cc30. Are you sure it's not just this? Before that commit getting a large enough A-V desync would automatically disable
Something is wrong here. If stats.lua can display the Glad that the performance is at least a little better at least. This is a weird problem though. I can't really wrap my head around it either. |
I spoke too soon, there are occasional jitter spikes on Gemini Lake causing mistimed frames. |
@SairesArt Try this branch and see if it helps any: https://github.com/xantoz/mpv/tree/fence-magic--v2 That reshuffling of fences helps performance in weston on sandy bridge for me, at least. And I'm not 100% sure why... |
Should be theoretically possible using DRM leasing, but for wayland there is currently only the experimental/non-standardized support in experimental branches on sway/wlroots. It seems mainly geared towards use with VR headsets and other "non-desktop" displays as well. There's also the question on how to handle input, as vo=drm/gpu-context=drm have no actual input code, and they just rely on mpv running in the underlying terminal you started mpv from (try starting mpv --gpu-context=drm over ssh to see what I mean) Note: You do not need root privileges to use either vo=drm or gpu-context=drm, you just need rw permission to |
@xantoz Your commit unfortunately doesn't improve my jitter spike issue. |
Wow, thanks for introducing me to this! I'm baffled how I managed to miss this. I recently started porting my OpenGl Application to DRM for performance reasons and this is awesome news. Since I'm on sway, I'll definitely start using those experimental branches.
Thanks for the amazing effort and digging. Unfortunately this does not change the outcome. Without display-resample the dropped frames aren't that bad and x11 without display-resample continues to be the best option. The combination of wayland's "every frame is perfect" and the 1920x1200 display just are too much for that poor GMA 4500 MHD and the weak drivers. |
I'm getting video desync on Wayland with mpv 30.0. Using Here are some logs: |
(For x11 and wlshm, try without subtitles and OSD, because these are handled extremely inefficiently on these VOs.) |
I think I am experiencing same problem with Wayland and nvdec - more here: https://www.reddit.com/r/mpv/comments/dpqn3l/nvdec_on_wayland/ |
Does nvdec even work on wayland? I'd be surprised if it does. vdpau doesn't at least. nvidia+wayland is just bad news and should be avoided (AKA just use x11 and hope that one day nvidia stops being a crappy company). I guess nouveau might work somewhat OK but I wouldn't count on good performance. No idea what the state of eglstreams is in gnome, but I'd be surprised if it was anywhere close to GBM. Edit: Regardless it's not really the same problem. Nvidia's wayland """support""" is inherently broken. Just use x11. |
Technically, nvdec with interop does work with wayland. I’ve tested it. You must use OpenGL and must force GL-ES as desktop gl silently fails and results in a blank texture. Vdpau does not work at all. But yes, wayland on Nvidia is mostly unusable and you should just use x11. |
and now with the new nvidia beta 495? greetings |
There's an FAQ entry on it. The gist is basically "who knows but don't expect much". |
now in KDE: |
In mutter too actually. I'll update that. |
I've got wlshm working alright in nvidia/wayland/gnome but I don't think it's using nvdec. I think I'm on nvidia gbm, using newer mutter. |
Don't use wlshm (nvdec won't work on it). opengl (the default) should work on the master branch with nvidia. |
Nevermind, it works fine if I delete everything and just do gpu-context=wayland
Thanks for the good work here! |
It works well when it works, with "gpu-context=wayland". But sometimes, videos can not be played and I see the following errors: [vo/gpu/opengl] Error: framebuffer completeness check failed (error=36061). |
I have nvdec-copy working on nvidia/gnome/wayland with 510 proprietary beta driver and using gbm
|
OP is a ghost now and this is pretty stale so I'll close it. Feel free to open up a new issue if there is one. |
mpv 0.29.1, linux, swaywm (wayland)
independent of other settings, running mpv with --gpu-context=wayland kills performance. Barely any video can be played when fullscreen, lagging with 5-10 fps. When it a small window, it's fine again. Whether --opengl-es is set or not, does not matter. Running mpv in X mode, thus being displayed via XWayland gives ironically almost good performance again.
Additional info:
GM45 chipset (GMA 4500MHD) - 2.1 Mesa 19.2.1
In X plays 1080p60 video 100% smooth
In XWayland plays 1080p30 almost smooth
With gpu-context=wayland, fails to play 1080p30 over 15 fps
The text was updated successfully, but these errors were encountered: