NVIDIA / open-gpu-kernel-modules

NVIDIA Linux open GPU kernel module source
Other
14.18k stars 1.18k forks source link

mpv/libplacebo VK_ERROR_INITIALIZATION_FAILED with nvidia vulkan and wayland #354

Open CoelacanthusHex opened 1 year ago

CoelacanthusHex commented 1 year ago

NVIDIA Open GPU Kernel Modules Version

515.65.01-5

Does this happen with the proprietary driver (of the same version) as well?

Yes

Operating System and Version

Arch Linux

Kernel Release

5.19.2-zen1-1-zen

Hardware: GPU

GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU (UUID: GPU-7ef8ea0d-17bb-7e77-0311-e1e259621525)

Describe the bug

when use mpv with nvidia, vulkan and wayland, mpv will play audio but don't display video window. in log, we can see 'vk->CreateSwapchainKHR(...): VK_ERROR_INITIALIZATION_FAILED'

To Reproduce

mpv --no-config --gpu-api=vulkan with Nvidia GPU in Wayland if Nvidia is not default, please specify Nvidia GPU with --vulkan-device=

Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

https://github.com/mpv-player/mpv/issues/10552

CoelacanthusHex commented 1 year ago

Since it only happened on Wayland and https://github.com/NVIDIA/open-gpu-kernel-modules/issues/317 too. Maybe wayland part of vulkan driver has problems.

moldimolt commented 1 year ago

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!
CoelacanthusHex commented 1 year ago

I still meet this problem although I installed egl-wayland 1.1.11 on Arch Linux

apprehensions commented 1 year ago

can reproduce this issue as well

1-minute-to-midnight commented 1 week ago

No updates on this issue? I have this problem as well. Can't use mpv in KDE wayland