I have this problem again on Ubuntu Gnome 15.04 (https://github.com/mpv-player/mpv/issues/1937)
If I start to play a video in fullscreen, I have to press 3 times "F" to switch to windowed mode.
Which mpv version are you using?
This one "mpv - 1:0.9.2+git20150620-1~vivid" from this ppa :
https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth
This should include the fix we did previously.
I suggest you report the bug to gnome.
OK, on what part of Gnome I should report the bug ?
Gnome Shell, Mutter, something else ?
Thank you.
Mutter is the window manager, so probably that one.
Thanks. Let me know if they think it's a mpv bug. (I don't feel like registering yet another account for a thing I don't actually use just to get CC'ed.)
regarding the bug report - it wouldn't matter if using gnome or mpv ppa's, this would occur with standard install (can be seen in 15.04 also.
What happens here is it only occurs when the video is at or larger the screen size, any vids smaller work fine.
So here with 1920x1080 display any vid smaller than that is ok, ex. a 720p vid. (actually any vid less than X x 1080
Also note that after the initial 3 times with 1080p or larger vids then f works fine with that vid/mpv instance
Also to note esc does not work but can 'count' towards 1 f press
So here with 1920x1080 display any vid smaller than that is ok, ex. a 720p vid.
That's not the case for me, I tried with a 720p video on my 1080p screen.
Also note that after the initial 3 times ... then f works fine with that vid/mpv instance
That's right
Also to note esc does not work but can 'count' towards 1 f press
For me ESC doesn't work too but works after 2 F press.
To clarify, this only occurs for me when starting with the --fullscreen (or --fs) flag. I felt like
I start to play a video in fullscreen
was a little ambiguous. Starting a video and then toggling to fullscreen using f does not trigger this bug. Neither does executing $ mpv --idle --force-window, toggling fullscreen, and then dragging a video to mpv. Having tried several video resolutions (720p and 1080p included) and formats (container and encoding), this bug occurs consistently when the --fullscreen flag is used.
I can get out of fullscreen by hitting ESC f ESC, f f f, double clicking on the video three times, single clicking on the appropriate OSD button, or any sensible combination of the above. Each action which would should normally change the fullscreen state does toggle the button on the OSD even when it does not cause mpv to exit fullscreen.
This will trigger the bug, but will properly change to windowed mode when the second video starts (even without any previous attempt to change to windowed mode):
$ mpv --{ --fs Episode\ 1\ 鈥揬 The\ World\ of\ Swords.flv --} Episode\ 2\ 鈥揬 Beater.flv
While this will not trigger the bug at all:
mpv Episode\ 1\ 鈥揬 The\ World\ of\ Swords.flv --{ --fs Episode\ 2\ 鈥揬 Beater.flv --}
$ mpv --version
mpv git-5c3196d (C) 2000-2015 mpv/MPlayer/mplayer2 projects
built on Sat Aug 22 22:40:46 CDT 2015
ffmpeg library versions:
libavutil 54.27.100
libavcodec 56.41.100
libavformat 56.36.100
libswscale 3.1.101
libavfilter 5.16.101
libswresample 1.2.100
$ mutter --version
mutter 3.16.3
$ gnome-shell --version
GNOME Shell 3.16.3
Does it work without using --fs as file-local option?
Oh, sorry. It was a little late and I forgot to include an example of what I was trying most of the time. The following will trigger the bug.
mpv --fs 'Dan Callahan - My Python'\''s a little Rust-y - PyCon 2015-3CwJ0MH-4MA.mp4'
OK. Short of installing Gnome (which is a huge package and is going to "contaminate" my system) and investigating this personally, I see no way of analyzing this further.
I'm testing Fedora 22 (Gnome Shell) with MPV 0.12. With the Nouveau drivers it seems to work.
I have to press only one time "F" to switch to windowed mode.
Not working for me - I still need to press "F" 3-times ...in Mint 17.2
even with mpv-0.12.0+git2 - git-fb19371 - from ppa:mc3man/mpv-tests
or with mpv-0.12.0.1 - git-532f05b - from ppa:noobslab/mpv-ppa
(Radeon R7-250 with free drivers)
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.
Have been having the same issue for months.
Linux Mint Cinnamon 17.3 (MDM and Cinnamon) on Nvidia 352
No problem on Kubuntu 14.04 with Nvidia drivers.
It seems that there is a difference if you use Nouveau or Nvidia drivers. I just did more tests with Nouveau on Manjaro, Gnome 3.18 nad MPV 0.14 :
I had a response of one of the Mutter developer but he don't have a Nvidia card.
Ok, Jasper, the Mutter developer, found the cause of the bug in Mutter !
https://bugzilla.gnome.org/show_bug.cgi?id=751585#c10
I guess we can close this one here ?
Still not sure. There's no fix yet, and the developer doesn't seem to be too sure about this. Either Mutter is incorrectly detecting mpv as using legacy fullscreening, or mpv is doing something wrong that triggers this.
So I've tried to run mutter on Debian to debug this, but it just crashes somewhere in gobject or glib.
How can we help ?
The Mutter devs don't answer yet to help us unfortunately. Maybe you can try with Fedora on a spare partition ?
I have contacted Jasper, the main Mutter developer, by mail but he said me that
I don't work on mutter anymore. Sorry.
I'm trying to find who work on it now.
As I stated in https://bugzilla.gnome.org/show_bug.cgi?id=751585#c13 and in another issue here that I can't find now: mpv shouldn't be requesting a position when unfullscreening, in particular when it started fullscreened to begin with and thus doesn't have a "previous position". Basically this diff should fix this issue:
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 034f785..10f0299 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1464,7 +1464,7 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
x11->fs = 1;
// The "saved" positions are bogus, so reset them when leaving FS again.
x11->size_changed_during_fs = true;
- x11->pos_changed_during_fs = true;
+ x11->pos_changed_during_fs = false;
}
if (vo->opts->fsscreen_id != -1) {
@wm4 Did you see the possible fix that Rui Matos (rtcm), a Mutter developer, made ?
Yes, but I can't tell whether this is the right or wrong fix, and/or whether it'd break something/reduce functionality in other WMs. Need to stare some more at this code.
Ok great. I hope it will make it ;)
@wm4 Any progress on this ?
I'm not working on this.
Ok. Will you ?
Probably not, until the WM starts working on debian.
That's not really respectful for the work of Rui Matos (rtcm) that provide us a fix but I understand that you can't do some proper tests without being able to install Mutter on your system.
That's probably true, but I don't feel so good about rtcm's patch, and there's probably something mpv does very wrong. So unless someone digs deeper, nothing will change.
Finally got mutter running in ArchLinux. But I can't reproduce the bug.
It happen for me with this 1080p sample, this command, a 1080p monitor and mutter 3.20.3 :
mpv --no-config --fs "h265 1080p 2mbps.mkv"
Now it seem that I have to press 2 times "F" to switch to windowed mode.
Oh, forgot that the video must have a specific size.
Tried again, and couldn't reproduce. I tested by running a terminal window within a "blank" mutter session, and starting a video that has exactly the same size as the screen. Starting with --fs and pressing "f" once dropped it out of fullscreen as expected. This is with the package extra/mutter 3.18.2-1 (gnome).
Maybe it's because of the way you test it ? I just resized a video to 1366x768 to test on my laptop, that have a intel iGPU and is on Fedora 24 / Mutter 3.20.3, and that happen too.
Is there something that I could try or test to help you ?
I don't know if it's relevant but it seem that Mutter can behave differently when you use it as standalone. Gnome Shell override some settings.
I think I couldn't reproduce because I made some sort of mistake (not sure what), but now I could reproduce it fully.
Thank you so much !
I just recompiled, and it's not working for me
Most helpful comment
I think I couldn't reproduce because I made some sort of mistake (not sure what), but now I could reproduce it fully.