GNOME Bugzilla – Bug 751585
Mutter prevent MPV to switch between Fullscreen and Windowed mode
Last modified: 2016-04-15 14:11:11 UTC
If I start to play a video in fullscreen with MPV, I have to press 3 times "F" to switch to windowed mode. The 2 first time nothing happen. Wm4, the MPV developer, ask me to open a bug report here. https://github.com/mpv-player/mpv/issues/2072 Ubuntu Gnome 15.04 - Gnome 3.16.2 (with ppa https://launchpad.net/~gnome3-team/+archive/ubuntu/gnome3-staging) - Mutter 3.16.2 - MPV 0.92 (ppa https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth) Thank you
I'm testing Fedora 22 and the problem is here too.
With the Nouveau drivers it seems to work. I have to press only one time "F" to switch to windowed mode.
Some more tests. It seems to works if the video size is not 1080p (1080p display). If the video is 1080p I have to press 2 times "F" to switch to windowed mode. Fedora 22 (Gnome Shell) with MPV 0.13 and Nouveau drivers.
Is anybody saw this ?
Can you give an up-to-date and easy-to-follow set of steps to reproduce?
(In reply to Jasper St. Pierre from comment #5) > Can you give an up-to-date and easy-to-follow set of steps to reproduce? Of course and thank you a lot for looking at this ! Since I reported this bug nothing has changed : If I start to play a video in fullscreen with MPV (eg. with this command mpv --fs mymovie.mkv), I have to press 3 times the "F" key (3 with Nvidia drivers, 2 with Nouveau) to switch to windowed mode. It's the same with the "esc" key. The issue is still open on MPV github repo and have some infos too. https://github.com/mpv-player/mpv/issues/2072 I'm now (for testing) on Manjaro with Mutter 3.18.2 - MPV 0.14 Thank you
I can't reproduce on Intel. I don't have an NVIDIA machine to test on at the moment, sorry. Given that you have to press a different number of times between nouveau and NVIDIA, I'm a bit sure that something else is going on here. Try disabling all Shell extensions if you have any. If anyone else is able to reproduce this bug, let me know.
I just did more tests with Nouveau : - If the video size match the display size (eg. 1920x1080 video and display) it doesn't work. Need to press 2 times "F". - If the video size is different of the display size (eg. 1920x800 video or whatever size different of the display one) it does work. Did you try a video that has the same resolution as your display ?
An MPV user reported the same problem with Radeon driver: https://github.com/mpv-player/mpv/issues/2072#issuecomment-154856542
OK, thank you. With that, I was able to reproduce. It's an issue with our legacy fullscreen mode. You can verify it by disabling the force-fullscreen pref by entering "Meta.prefs_set_force_fullscreen(false)" in the Looking Glass. https://git.gnome.org/browse/mutter/tree/src/x11/window-x11.c#n2014 I don't know why it's triggering this mode -- I would have to spend a bit more time investigating.
Great I can confirm that works with "Meta.prefs_set_force_fullscreen(false)" ! I hope that will be an easy fix for you ;) Thank you.
*** Bug 760604 has been marked as a duplicate of this bug. ***
Here's what happens: 1) when you first press F, mutter gets the the _NET_WM_STATE client message to unfullscreen the window, which is does and as a side effect resizes/moves the window to enforce constraints 2) immediately, mpv seems to XConfigureWindow() asking for the window to be positioned at 0,0 and with a full monitor width/height (the video size) which ends up in mutter's workaround that Jasper already pointed and the window is fullscreened again I think mpv doesn't like its window being resized when mutter initially unfullscreens it but then overreacts by resizing *and* moving the window. It seems to me that mpv should at most try to resize the window at 2) and leave x,y unset in its ConfigureWindow request.
Any news on this ? Thanks !
Can we have an update on the situation please ? Thanks.
Wm4, the main MPV developer, tried to debug it but he came across that problem : "So I've tried to run mutter on Debian to debug this, but it just crashes somewhere in gobject or glib." https://github.com/mpv-player/mpv/issues/2072
Hello, I hope we can have some help to get rid of that bug ;)
https://github.com/mpv-player/mpv/issues/2072#issuecomment-210476810