mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Gnome 3.14 / Wayland

Open d3xter opened this issue 12 years ago • 18 comments

Hey guys,

I've tried to run mpv 0.6.0/vo=opengl on gnome 3.14.

Video/Audio playback is fine, but there are 2 major problems:

There is no client side decoration of the playback window, but i'm still able to move the window.

Fullscreen works partially: The video gets resized to the maximum width or height, but the black bars to fill the screen are missing, so if the video is too wide, the video playback is placed on the top of the screen and beneath it, the desktop or any window behind it is shown

d3xter avatar Oct 07 '14 12:10 d3xter

There is no client side decoration of the playback window,

#139

Fullscreen works partially

Not sure about that.

ghost avatar Oct 07 '14 17:10 ghost

The video gets resized to the maximum width or height, but the black bars to fill the screen are missing, so if the video is too wide, the video playback is placed on the top of the screen and beneath it, the desktop or any window behind it is shown

Hi, I will try to test this as soon as possible. There were similiar problems in the past with fullscreen under wayland.

giselher avatar Oct 08 '14 04:10 giselher

Just got around testing this on gnome. I will try to create a fix as fast as possible. But it looks like gnome is broken. Can try using wayland-next?

giselher avatar Oct 11 '14 14:10 giselher

Hi, I just tried with wayland-git (I'm on archlinux) and fullscreen is not good either :)

victornoel avatar Dec 06 '14 17:12 victornoel

I'l second this bug. I'm also on arch w/ the lmpv 0.7.1. No window decorations in wayland & incorrect fullscreen behaviour.

jashandeep-sohi avatar Dec 17 '14 04:12 jashandeep-sohi

The missing decorations will probably be never fixed.

It would require us linking to the whole gnome stack, which we don't want to. However, gnome/wayland folks seem to insist on this design, so it will remain this way.

ghost avatar Dec 17 '14 05:12 ghost

Hi, i am currently unable to test this. I will try to fix at least the fullscreen behaviour in a few weeks.

giselher avatar Dec 17 '14 06:12 giselher

No rush. Gnome w/ Wayland is barely usable right now.

jashandeep-sohi avatar Dec 18 '14 10:12 jashandeep-sohi

I played a bit with gnoome on wayland and the wl_shell interface reports wrong resolutions and frame rates. This will not be fixed any time soon.

giselher avatar Feb 28 '15 09:02 giselher

Latest upgrade (0.8.3-1 -> 0.9.0-2) on ArchLinux made --vo wayland and --vo opengl unusable on Gnome 3.16.1. But it works fine on Weston.

$ mpv blah.mp4
[vo/opengl/wayland] error occurred on the display fd: closing file descriptor
$ mpv --vo wayland blah.mp4
[vo/wayland/wayland] error occurred on the display fd: closing file descriptor

My compositor info, running Gnome 3.16.1. Information is obtained with weston-info:

interface: 'wl_drm', version: 2, name: 1
interface: 'wl_compositor', version: 3, name: 2
interface: 'wl_shm', version: 1, name: 3
    formats: XRGB8888 ARGB8888
interface: 'wl_output', version: 2, name: 4
    x: 0, y: 0,
    physical_width: 310 mm, physical_height: 170 mm,
    make: 'LGD', model: '0x028d',
    subpixel_orientation: horizontal rgb, output_transform: normal,
    mode:
        width: 1366 px, height: 768 px, refresh: 0 Hz,
        flags: current preferred
interface: 'wl_data_device_manager', version: 2, name: 5
interface: 'xdg_shell', version: 1, name: 6
interface: 'wl_shell', version: 1, name: 7
interface: 'gtk_shell', version: 1, name: 8
interface: 'wl_subcompositor', version: 1, name: 9
interface: 'wl_seat', version: 4, name: 10
    name: seat0
    capabilities: pointer keyboard
    keyboard repeat rate: 33
    keyboard repeat delay: 500

m13253 avatar Apr 26 '15 13:04 m13253

CC @Cloudef

ghost avatar Apr 26 '15 17:04 ghost

@m13253: I can second your problem with --vo=wayland, --vo=opengl and --vo=openg-hq. I'm also using Arch & upgraded mpv 0.8.3-1 --> 0.9.0-2.

--vo=opengl & --vo=opengl-hq was working before the upgrade. --vo-wayland was segfaulting.

jashandeep-sohi avatar Apr 26 '15 19:04 jashandeep-sohi

mpv does not actually draw the black borders. It's compositor drawing black behind fullscreen clients, which gnome doesn't do in this case. I did look around wayland_common.c and it's probably good idea to use WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE instead of the WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT though.

Cloudef avatar Apr 26 '15 20:04 Cloudef

@jashandeep-sohi @m13253 Arch linuxer here. I ran git bisect:

c10fb4ce9fcd3dbbf69741eb8499c4cfabbf5412 is the first bad commit
commit c10fb4ce9fcd3dbbf69741eb8499c4cfabbf5412
Author: Jari Vetoniemi <[email protected]> 
Date:   Sun Mar 22 02:48:09 2015 +0200

    vo_wayland: define opaque region

    This allows compositor to optimize rendering, as it will know mpv is not
    transparent.

:040000 040000 4d60543f8cae97d35734bb9100c88c9d5a0811d8 
2a31ce4bc871988cf6f7c09874ddd5afaa51a3dc M  video

Reverting that commit fixes it for me. It is a very small commit about transparent regions in wayland. Probably a functionality that weston provides, but GNOME doesn't.

Link to the commit

mjrh avatar Apr 27 '15 18:04 mjrh

@mjrh I did something similar, but just commented out the commit line, since it was complaining about committing a NULL buffer:

struct wl_region *region = wl_compositor_create_region(wl->display.compositor);
if (region) {
    wl_region_add(region, x, y, width, height);
    wl_surface_set_opaque_region(wl->window.video_surface, region);
    //wl_surface_commit(wl->window.video_surface);
    wl_region_destroy(region);
}

However, I don't really know what the implications are of not committing right away, so I'm not sure if this is the proper way of fixing it.

jashandeep-sohi avatar Apr 27 '15 23:04 jashandeep-sohi

Fullscreen now works with: eb6b2b6e

EDIT: removed incorrect statement.

giselher avatar Feb 07 '16 14:02 giselher

:clap: :clap: :clap: :bow:

jashandeep-sohi avatar Feb 08 '16 04:02 jashandeep-sohi

can confirm, fullscreen works. This issue may be up for closing if your stance on CSD has not changed.

ignisf avatar Jul 22 '16 03:07 ignisf