Vulkan under Wayland does not seem to work on dual GPU Laptop RTX 3050

Driver version: 580.82.09

I am using vkcube to test what GPU is being used. Here are the results for the following commands:

> vkcube
Selected WSI platform: wayland
Selected GPU 0: Intel(R) Graphics (RPL-P)
(WORKS)

> __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only vkcube
Selected WSI platform: wayland
Selected GPU 1: Intel(R) Graphics (RPL-P)
(WORKS)

> vkcube --gpu_number 1
Selected WSI platform: wayland
Selected GPU 1: NVIDIA GeForce RTX 3050 6GB Laptop GPU, type: DiscreteGpu
Could not find both graphics and present queues
(CRASHES)

> vkcube --wsi xlib --gpu_number 1
Selected GPU 1: Intel(R) Graphics (RPL-P), type: IntegratedGpu
(WORKS)

> vkcube --wsi xlib --gpu_number 0
Selected GPU 0: NVIDIA GeForce RTX 3050 6GB Laptop GPU, type: DiscreteGpu
(WORKS)

I then tried using the project GitHub - JoseD92/vkdevicechooser: Vulkan layer to force a specific device to be used . With this, vkcube reported the GPU I wanted to use correctly, however it would segfault when the nvidia card was selected. This might not be relevant.

So, it looks like I can only use the dGPU with Vulkan on XWayland for some reason. It also seems like the gpu_number is swapped on XWayland vs Wayland, although I would assume that is not the issue.

nvidia-bug-report.log.gz (437.3 KB)

1 Like

Note that this bug is not vkcube exclusive, I just used it to showcase the problem effectively. It seems to happen on any Vulkan program under Wayland.

Have the same issue on RTX 5080 Max-Q, same driver version. I’m gonna test with 580.82.07 and 580.76.05 (think the latter is what I was using before I updated)

Edit it was broken on both fo those versions too, I’m trying some older versions but maybe the reason it’s broken is something unexpected

FYI I saw the same error (not on Wayland but on X11), I managed to resolve by disabling one of the graphics cards by making a custom udev rule. See my post RTX 4060 Ti detected by nvidia-smi on Ubuntu 24.04, but NOT utilized - #3 by iisaac.saito