Bug 433334 - MPV player running on Wayland is partially out of the screen when video resolution is higher than screen resolution
Summary: MPV player running on Wayland is partially out of the screen when video resol...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.22.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://github.com/mpv-player/mpv/pul...
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2021-02-20 15:11 UTC by Patrick Silva
Modified: 2022-09-12 15:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-02-20 15:11:35 UTC
SUMMARY
Already reported on MPV bug tracker
https://github.com/mpv-player/mpv/issues/8585

Apparently it's a kwin issue:
"AFAIK this is left up to the window manager/wayland compositor to handle, and KWin behaves differently in this regard on X11 vs. Wayland. Report it to them."

STEPS TO REPRODUCE
1. start Wayland session
2. use MPV to open a video with resolution higher than screen resolution
3. 

EXPECTED RESULT
the same behavior that occurs on X11: MPV fits to the screen.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Matej Mrenica 2021-05-14 11:41:34 UTC
Same thing happens here.
Comment 2 Vlad Zahorodnii 2022-01-11 14:38:10 UTC
It will be fixed once mpv adds support for xdg_toplevel.configure_bounds https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/41
Comment 3 Vlad Zahorodnii 2022-01-29 12:26:59 UTC
wayland-protocols with xdg_toplevel.configure_bounds has been released. If mpv starts using it, this issue will be fixed.
Comment 4 Patrick Silva 2022-01-29 12:37:17 UTC
Thank you very much Vlad. :)
Comment 5 Patrick Silva 2022-08-30 14:29:27 UTC
Hi Vlad
xdg_toplevel.configure_bounds support was finally added to mpv. I'm using mpv-git on Arch Linux, the video is no longer partially out of the screen after the provided steps, but the playback controls on bottom are hidden behind Plasma panel.
Is this a kwin bug or a mpv bug?
Comment 6 Vlad Zahorodnii 2022-08-31 06:58:04 UTC
Not sure, I would need to take another look at it.
Comment 7 Vlad Zahorodnii 2022-08-31 08:17:54 UTC
kwin sends mpv the size of the work area, but mpv still provides a buffer bigger than the specified configure bounds, I assume that's because of the aspect ratio constraint. Not much that we can do, try disabling aspect ratio constraint in mpv.
Comment 8 Patrick Silva 2022-09-11 18:47:46 UTC
(In reply to Vlad Zahorodnii from comment #7)
> try disabling aspect ratio constraint in mpv.

I'm not sure if I'm doing it right, but playback controls of mpv are still behind Plasma panel when running the following:

$ mpv --video-aspect-override=no video.mkv
Comment 9 Vlad Zahorodnii 2022-09-12 12:58:10 UTC
Try mpv --keepaspect=no <video> instead
Comment 10 Vlad Zahorodnii 2022-09-12 12:58:36 UTC
or put

keepaspect=no

in mpv config file
Comment 11 Patrick Silva 2022-09-12 15:11:59 UTC
(In reply to Vlad Zahorodnii from comment #10)
> or put
> 
> keepaspect=no
> 
> in mpv config file

Thanks, Vlad, it works. :)
Should I report the issue with playback controls behind Plasma panel on Wayland to mpv devs?