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)