-mpv-x86_64-20200816-git-7f67c52
-Windows 10 2004
-shinchiro SF repo
Play any video with --gpu-api=vulkan and enter fullscreen
Playback should continue normally in fullscreen
Playback freezes and shows the last frame from before entering fullscreen (playback returns normally after switching back into windowed mode). mpv fullscreen has always been rather problematic on AMD Windows, i.e. slow switching. But of course it always freezing makes it unusable. The AMD driver seems to treat it as "exclusive" fullscreen, and unfortunately no mpv config option seems to help to avoid that.
Can be any video.
I don't know if this is specific to AMD nor Windows given I've seen the same thing in Linux and NVIDIA? Vulkan can bring X to it's knees with a poorly encoded video
Linux and NVIDIA
Almost certainly a NVIDIA driver issue.
Might not be related but I'm also using AMD (RX570) on Windows 1909 using Vulkan and fullscreen causes my monitor to switch from 75hz to 60hz (the process causes a black screen for ~5secs) and is very laggy afterwards but I don't recall it freezing completely.
Almost certainly a NVIDIA driver issue.
Yep, switching into fullscreen on Windows worked fine with the Nvidia card that was installed before and Linux Xorg issues should be unrelated.
Might not be related but I'm also using AMD (RX570) on Windows 1909 using Vulkan and fullscreen causes my monitor to switch from 75hz to 60hz (the process causes a black screen for ~5secs) and is very laggy afterwards but I don't recall it freezing completely.
I waited like 10 seconds or so and it didn't recover. I'm also using single refresh rate EDID, so it can't change it.
I waited like 10 seconds or so and it didn't recover. I'm also using single refresh rate EDID, so it can't change it.
What happens when you don't? Seems like it's forcing to run at 60hz for some reason like it's hardcoded, maybe since it can't it ends up failing?
It happens also with my default EDID that features only 60Hz.
My RX570 with a 60HZ display experience no issue. Same Windows 10 2004 & Vulkan are being used. When switching to fullscreen, the screen will turn black for about 2 seconds then enter exclusive mode, playback will then be resumed.
Did you turn AMD FreeSync on? or flip it on and try again?
My display is not VRR capable. I also think that a 2s transition wouldn't be acceptable either. While this is certainly AMD's fault, it would still be nice to have a workaround (if possible).
While this is certainly AMD's fault, it would still be nice to have a workaround (if possible).
What makes you think it's AMD's fault? I haven't noticed anything like this in any other Vulkan app?
Also yeah, a 2s black screen isn't really great for a video player, might be fine for games though.
It works with Intel & Nvidia (without weird transition slowness) and fullscreen behavior can also be bad in other Vulkan fullscreen applications with AMD. E.g. it doesn't seem to "unredirect" DWM compositing when I alt + tab out and again into some games with DXVK on Windows when there are other windows at the same time, so ironically what would be more desirable for media players.
Comparing to freeze after switching to fullscreen, I think a short latency is totally acceptable! But it certainly could be better.
I use the "pro" version of the AMD's Radeon Software. afaik, the "pro" version is proprietary and the normal one is open source(at least for Linux), there might be some difference between them, you could probably give it a try.
Oh, I just realised MPV allows changing the swapchain mode, I can't really test it now but have you tried changing those settings? I have a feeling choosing another mode may solve this but it's just a theory.
EDIT: Actually tested fullscreen again and something has changed recently. It no longer changes my screen's refresh rate or blackscreens and instead doesn't open to fullscreen at all and trying to interact with the window is pretty much impossible but it's not frozen, the video will still play smoothly in the background if you try to alt-tab or press the window key but stops when you try to open that window or close the start/alt-tab menu.
vulkan-swap-mode=immediate is the only option that works properly with fullscreen but that means no vsync so probably not ideal for some. With no shaders and video-sync=display-resample I was getting 322fps without shaders and I wasn't seeing tearing but the reported vsync jitter was around 0.7. I'm not sure running without vsync and video-sync=audio does but it seemed to play fine (I think that's meant to disable interpolation but I couldn't really notice).
Also, using the default swapchain and "ontop" I can get fullscreen to show after alt-tabbing to it but interacting with the window will cause the image to freeze but audio continues playing and alt-tabbing again returns it to focus while continuing to play the video.
Another thing I noticed is running window-maximized with no-borders replicates the same issue.
Yes, that's what I meant ("freezes window content").
I tested with D3D11 -> Vulkan via DXVK and that way mpv can enter fullscreen normally.
Yes, it works fine with DXVK and not only that but it has the lowest Vsync jitter I've seen. That said, the Anime4k shaders I'm trying to run give a green screen under DX11 and the same thing happens when using DXVK.
Same thing here...works with any other API, but just freezes on Vulkan when i use fullscreen. That's pretty sad, since vulkan don't even stress the GPU (RX 5700 XT in my case). And for some weird reason, this just started some days ago, before that i was able to use without a single freeze, even with 4K or astonishing overkill 8K videos.
I don't think there's anything we can do to work around this, unfortunately. Until there's some sort of vulkan extension to control what happens when going into fullscreen. It's possible you can find some driver setting to disable it.
Only freezes on my non main monitors, fullscreening works fine on the main monitor.
Only freezes on my non main monitors, fullscreening works fine on the main monitor.
What about when you only have 1 monitor connected?
RX 580
144hz monitor
no freesync
same issue
!FIXED!: Run with mpvnet.exe instead of mpv.exe!
!FIXED!: Run with mpvnet.exe instead of mpv.exe!
no thanks
I've found this in the nvidia driver's readme, could it be related?
Vulkan applications crash when entering or leaving fullscreen, or when resized
Resizing a Vulkan application generates events that trigger an out-of-date swapchain.
Fullscreen Vulkan applications are optimized for performance by the driver. This optimization also generates events that trigger an out-of-date swapchain upon entering or leaving fullscreen mode. This is commonly encountered when using the alt-tab key combination, for example.
Applications that do not properly respond to the VK_ERROR_OUT_OF_DATE_KHR return code may not function properly when these events occur. The expected behavior is documented in section 30.8 of the Vulkan specification.
Unlikely. We respect those events.