mpv
                                
                                 mpv copied to clipboard
                                
                                    mpv copied to clipboard
                            
                            
                            
                        no window display when with gpu-api=vulkan and nvidia GPU in wayland
Important Information
Provide the following Information:
- MPV version: test in 0.34.1 and HEAD(https://github.com/mpv-player/mpv/commit/37aea112c15958052bcc6d0582593edf3bfead8f)
- libplacebo version: test in 4.208.0 and HEAD(https://github.com/haasn/libplacebo/commit/6ed1b0097460472c375a3e5ec22af0c1632123b9)
- Linux Distribution and Version: Arch Linux
- Window Manager and version: KDE Plasma 5.25.4 Wayland
- GPU driver and version: Nvidia 515.65.01 with Nvidia open source kernel driver
- GPU: NVIDIA GeForce RTX 3050 Laptop GPU
Reproduction steps
mpv --no-config --gpu-api=vulkan with Nvidia GPU in Wayland (in three vulkan gpu context, only waylandvk happened)
if Nvidia is not default, please specify Nvidia GPU with --vulkan-device=
Expected behavior
display window and play video and audio
Actual behavior
no window display but display tray icon and play audio and I found
[vo/gpu/vulkan/libplacebo] vk->CreateSwapchainKHR(...): VK_ERROR_INITIALIZATION_FAILED (../src/vulkan/swapchain.c:577)
[vo/gpu/vulkan/libplacebo] Failed (re)creating swapchain!
Log file
https://0x0.st/oLEp.txt
Sample files
Any file with both video and audio.
Gonna assume this is just NVIDIA being NVIDIA.
I'm not able to reproduce this with Nvidia on Weston using mpv --no-config --gpu-api=vulkan --gpu-context=waylandvk jellyfish-90-mbps-hd-hevc-10bit.mkv. The video plays as expected.
It looks like some other conditions are needed for this to happen.
According to https://forums.developer.nvidia.com/t/negativo17-wayland-vkcreateswapchainkhr-returns-vk-error-initialization-failed/215593:
[ekurzinger](https://forums.developer.nvidia.com/u/ekurzinger)
[Employee](https://forums.developer.nvidia.com/g/Employee)
[Jun 8](https://forums.developer.nvidia.com/t/negativo17-wayland-vkcreateswapchainkhr-returns-vk-error-initialization-failed/215593/4)
There is an ABI incompatibility between the 515 driver and previous versions of our egl-wayland library which might be the cause of this. Updating to the latest version, 1.1.10, should resolve the issue if that is the case.
Going forward this should never happen again as we’ve eliminated the driver <=> egl-wayland ABI which the Vulkan WSI depended on. However, doing so required one final breaking change, unfortunately.
However, I'm not sure if this is the actual issue despite the similarities, because I still experience the issue despite having the latest egl-wayland version:
[-@fedora ~]$ nvidia-smi
Mon Sep 19 03:06:20 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   40C    P8     5W /  N/A |      4MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2269      G   /usr/bin/gnome-shell                2MiB |
+-----------------------------------------------------------------------------+
[-@fedora ~]$ sudo dnf install egl-wayland
Last metadata expiration check: 2:57:35 ago on Mon 19 Sep 2022 12:08:50 AM EDT.
Package egl-wayland-1.1.11-1.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
I assume nvidia fixed this upstream by now.
Still reproducible on current setup:
mpv 0.35.0-391-gec58670a0d Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Fri May 19 01:52:15 2023
libplacebo version: v5.264.0-256-ga28c2b49
FFmpeg version: n6.0
FFmpeg library versions:
   libavutil       58.2.100
   libavcodec      60.3.100
   libavformat     60.3.100
   libswscale      7.1.100
   libavfilter     9.3.100
   libswresample   4.10.100
- Linux Distribution and Version: Arch Linux
- Window Manager and version: KDE Plasma 5.27.5 Wayland
- GPU driver and version: Nvidia 530.41.03 proprietary
- GPU: NVIDIA GeForce RTX 3060 Laptop GPU
Commands: mpv --no-config --gpu-api=vulkan or mpv --no-config --gpu-context=waylandvk