-
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
Distorted subtitles in full screen while using vo=dmabuf-wayland #13961
Comments
I'm not able to reproduce. Do you have a sample file? |
I tried various video and subtitle files from different sources and problem occurs with all of them for me, so files certainly are not to blame here but something with my configuration. Do you use Plasma 6 as well? |
No, sway but weston works for me as well. |
Can you try running Kwin without direct scan out? Idk how to achieve that but running with a software cursor should implicitly disable direct scan out. Set |
Can confirm, on fedora 40/plasma 6. Things I noticed on two devices, one intel the other ryzen:
|
Can either of you confirm if it happens on another compositor like mutter or weston? I don't have a 768p screen. |
Gnome46/Mutter seems unaffected. And to clarify it also happens on 1080p displays at lower window sizes, its just that 1080p at fullscreen is safe, tested with autofit=1335. For reference, 1305 is safe. |
Going to assume this is a plasma bug in that case. |
That didn't change anything. And it is in fact 768p screen. |
@meelten: What if you try without aligning stride to 16? diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c
index 35a4dac464..f34762c78e 100644
--- a/video/out/vo_dmabuf_wayland.c
+++ b/video/out/vo_dmabuf_wayland.c
@@ -455,7 +455,7 @@ static void create_shm_pool(struct vo *vo)
struct vo_wayland_state *wl = vo->wl;
struct priv *p = vo->priv;
- int stride = MP_ALIGN_UP(vo->dwidth * 4, 16);
+ int stride = vo->dwidth * 4;
size_t size = vo->dheight * stride;
int fd = vo_wayland_allocate_memfd(vo, size);
if (fd < 0) From image you posted it is clear that stride is ignored. EDIT: Is this new issue? There were some changes in this area, but quite some time ago. https://invent.kde.org/plasma/kwin/-/merge_requests/4219 |
Don't really understand what this change means, but it did fix the distortion or at the very least can't reproduce it anymore. |
That align was cargoculted from wlshm. Does |
With --vo=wlshm I can't find any distortion during playback at any resolution. Curiously, a very similar distortion is visible in both the text and the video while resizing the window with the mouse. |
Just a wild guess, but does anything change if we use the actual correct number for the align?
If not, we could try removing it all together. |
Do I need re-compile to check this? Also confirm that there is no issue with wlshm. |
Why? I don't see anything wrong in mpv. kwin is ignoring stride set by
I don't think this is "correct" number in case of OSD. |
I'm not sure if it makes sense to align the stride in the first place for shm buffers though. |
Fair, doesn't change the fact it is upstream bug and we are wasting resources by even diagnosing it. mpv did nothing wrong. |
Yeah I guess it would be best if someone reported this to kwin regardless. |
Important Information
Provide following Information:
Reproduction steps
On Linux w/ Wayland play video file with subtitles (tried .ass and .srt) with
--vo=dmabuf-wayland
parameter. Enter full screen, don't move your mouse nor have any OSC elements displayed (like console). Wait for subtitles to appear.Expected behavior
Subtitles should be displayed correctly.
Actual behavior
Subtitles are distorted and unreadable as seen on the screenshot above. Happens only when no OSC is present on screen, meaning subtitles are temporarily corrected instantaneously whenever mouse is moved or key pressed. Does not happen at all when windowed.
Log file
output.txt
The text was updated successfully, but these errors were encountered: