on wayland, mpv opens without window elements, OSD missing

Bug #1739880 reported by emk2203
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mpv (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Gnome/Wayland is the standard Ubuntu version, starting at 18.04LTS. A standard mpv install here (0.27.0-2ubuntu4 from universe) will give a mpv without window decorations or OSD, limiting mpv usability significantly.

I propose to change the packaged mpv.conf in way that opengl-backend=x11egl is included. This way, mpv works as expected in a standard environment.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mpv (Ubuntu):
status: New → Confirmed
Revision history for this message
emk2203 (emk2203) wrote :

Another option would be to go to `mpv` 0.28.0. A test install from Doug McMahon's mpv-tests ppa ppa:mc3man/mpv-tests shows that the current version 0.28 works on wayland with OSD, window decoration and also menu options working. No entries in mpv.conf needed.

Revision history for this message
emk2203 (emk2203) wrote :

Also, URL dropping works with 0.28.0 under wayland, but not file dropping. This switch to 0.28.0 would take care of this bug (#1739880), #1720835 and half of #1730625.

Revision history for this message
James Cowgill (jcowgill) wrote :

Unfortunately mpv 0.28.0 depends on ffmpeg 3.5 which is not yet released and is also an ABI breaking version. I am planning on keeping Debian at 0.27 for a few months because of this. Unless Ubuntu is planning on bundling FFmpeg (a security nightmare) or heavily patching mpv, I think there is little chance 0.28.0 will be in 18.04.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I agree this is annoying. We would all like to see nice consistent window decorations. So before reading on, remember we're on the same side :)

Firstly you should know that choosing Wayland instead of X11 is an Ubuntu feature and not a bug. We patch that in on Ubuntu in order to provide hardware-accelerated playback:

https://launchpad.net/ubuntu/+source/mpv/0.26.0-3ubuntu1

But that change is not upstream for reasons such as the missing window decorations:

https://github.com/mpv-player/mpv/pull/4556

Choosing Wayland and not X11 is necessary because libva (VA-API) only supports DRI2 and Xwayland only supports DRI3. They are not compatible with each other so --opengl-backend=x11* will never get acceleration in a Wayland session.

Hardware-accelerated video playback was a major feature in Ubuntu 17.10. The problem is we have to choose between having window decorations or having hardware acceleration. And Ubuntu has chosen hardware acceleration. In fact, the missing window decorations are not an mpv bug, but a general problem with all native wayland apps right now. The app/toolkit has to provide its own window decorations with Wayland. GTK does that so you won't notice a problem with GTK apps.

Unfortunately using --opengl-backend=x11egl undoes this change, turning off hardware acceleration. And that's a very big deal because modern 4K and HEVC videos simply can't be played without hardware acceleration even on high-end CPUs. So we'll stick with the Ubuntu default of --opengl-backend=wayland. We need acceleration working.

If mpv 0.28 somehow fixes this then great. But I suspect actually that PPA only works because it omits the Ubuntu patches which we would like to keep.

I suggest a better solution you would be happy with is to install gnome-mpv instead. That will give you window decorations. But that does mean inefficient playback (see https://community.ubuntu.com/t/hardware-accelerated-video-playback/304/4).

Changed in mpv (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Doug McMahon (mc3man) wrote :

"But I suspect actually that PPA only works because it omits the Ubuntu patches which we would like to keep."
Not really though patches not not included, nor needed.
What you'll find in 0.28+ is that hwdec in wayland needs to be specifically commanded, what's used for wayland will not work with xserver & vice versa
So there will not be a generic 'one size fits all' solution.

(- users of ppa - if you look in the quicklists of the launcher's mpv icon there is one to pull up a command list for vaapi* hwdec in wayland
xserver users can just go with previous, i.e. hwdec= hwdec=yes or hwdec=vaapi
xserver user with nvidia hybrid device, nvidia drivers installed but on the intel profile should only use hwdec=vaapi

Revision history for this message
Doug McMahon (mc3man) wrote :

What was mwaent by above 'specifically commanded' & 'one size fits all' was specific to vaapi hwdec
For vaapi-copy the old generic commands work...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the heads up.

If there isn't a one-size-fits-all solution in mpv 0.28 then I'll need to author/patch one in... or we can just stick to 0.27. But probably the former.

mpv is great, but if Ubuntu is to be "for human beings" then we need to make it easier to use. So it should just work automatically. I would prefer not resort to vaapi-copy though, because last time I checked that incurred an order of magnitude higher CPU usage than plain vaapi.

Revision history for this message
Doug McMahon (mc3man) wrote :

Just to illustrate on 0.28+ (- from quicklist help file ,

mpv --gpu-context=x11egl --hwdec=vaapi-copy (-hwdec w/ deco
mpv hwdec= or mpv --hwdec=yes or mpv --hwdec=auto (- hwdec w/ deco, same as above, (vaapi-copy) with terminal warnings..

mpv --gpu-context=wayland --hwdec=vaapi-copy (- hwdec w/ no deco
mpv --gpu-context=wayland --hwdec=vaapi (- hwdec w/ no deco

If a user on X11 used --gpu-context=wayland (or gpu-context=wayland in mpv.conf) they'd be thrown to Xv which is worse than no hwdec at all.

As far as window deco in wayland (gpu-context=wayland) maybe this will help if it's shows up in gnome (mutter?)
https://bugzilla.gnome.org/show_bug.cgi?id=781909

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.