Skip to content

Vulkan swapchain creation fails on NVIDIA GPU (VK_ERROR_INITIALIZATION_FAILED, driver 550.54.14, Wayland/Linux) #897

@Klaus-E-J

Description

@Klaus-E-J

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions