Vulkan swapchain creation fails on NVIDIA GPU (VK_ERROR_INITIALIZATION_FAILED, driver 550.54.14, Wayland/Linux)
Opened this issue · 3 comments
Describe the bug
When running the 01_triangle sample from the Kore-Samples repository using the Vulkan backend, the application fails to create the Vulkan swapchain when executed on an NVIDIA GPU. The error does not occur when using an Intel integrated GPU.
To Reproduce
Steps to reproduce the behavior:
-
Clone the Kore-Samples repository.
-
Navigate to 01_triangle sample directory.
-
Run the project using: ../kore/make --run
-
Observe the error when running on an NVIDIA GPU.
Expected behavior
The application should create the Vulkan swapchain and render the triangle, regardless of the GPU vendor.
Screenshots
N/A
Execution Environment:
-
Host system: Linux (Wayland)
-
Target system: Same (local execution)
-
IDE and/or compiler used: GCC 12.2.0 / G++ 12.2.0
-
Kore revision: f5ff1de
-
Kore build output: Build completed successfully.
Application output:
Keyboard repeat rate: 25, delay: 660
Running with Vulkan validation layers enabled.
Chosen Vulkan device: NVIDIA GeForce RTX 3050 6GB Laptop GPU
Failed to create Vulkan swapchain: -3
Error: Run Error (code 1)
Additional context
To identify the problem more clearly, I added the following check after the swapchain creation code inside device.c:
if (result != VK_SUCCESS) {
kore_error_message("Failed to create Vulkan swapchain: %d", result);
swapchain = VK_NULL_HANDLE;
return;
}
-
I've looked up and found that the Vulkan error code -3 corresponds to VK_ERROR_INITIALIZATION_FAILED.
-
The same error occurs in other examples that require creating a swapchain.
-
Other Vulkan applications work as expected on this GPU.
-
This issue only occurs when using the NVIDIA GPU with proprietary drivers (version: 550.54.14).
-
No such error occurs when running on an Intel iGPU, using the same code and environment.
I can unfortunately not reproduce it, it's working fine for me via Wayland, nvidia driver 570.133.07 on an RTX 3080 Ti. Can you maybe debug it yourself? Or update your driver?
I'll see if i can find something, but i think this might be related to the driver.
Also feel free to play around with the code in create_swapchain. It's rather simple. Maybe it works with another surface-format.