Nsight Graphics 2022.1 fails to launch "vkcube" on Ubuntu 20.04.3

The latest Nsight Graphics 2022.1 fails to launch “vkcube” on Ubuntu 20.04.3 (focal-proposed, nvidia-driver-510, 5.13.0-28-generic) .

The following error message is returned from “vkcube”:
vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.

While the following log is returned from Nsight:
Preparing to launch…
Launched process: vkcube (pid: 11770)
/home/doritos/libraries/vulkan/1.2.198.1/x86_64/bin/vkcube
Attempting to automatically connect…
Searching for attachable process 11770 on local socket…
Launch process exited. Searching for attachable child processes…
Searching for attachable process 11770 on local socket…
Failed to connect. The target process may have exited.

Should note:

  1. Version 2021.5 doesn’t face such a problem.
  2. I think “VK_LAYER_NV_nomad.sh” is broken, copy-pasted layers manually.
  3. Trying to upgrade to 2022.1 because on 2021.5 the visualization of BLASes doesn’t work (“Failed to create Vulkan rendering backend”).
  4. EDIT: Exact build: 2022.1.0.22025
  5. EDIT 2: The issue can be reproduced in focal (non-proposed) and nvidia-driver-495.

Thank you in advance. Hope you can help me.

Hello,
Thank you for your feedback on Nsight Graphics. I’m sorry you ran into this issue. I’ll consult with the Nsight Graphics engineering team to get a repro of this issue and get back to you.
Regards,

Thank you for your fast reply.
I will keep an eye on this thread. Feel free to ask for any further information in order to reproduce the issue.

One thing I forgot to mention in my main post is that I enabled “-proposed” and upgraded from 495 to 510 in order to try troubleshoot the issue or getting 2021.5’s Vulkan rendering backend working.

Hello,
I was having a problem trying to reproduce what you saw as it is working for me with Nsight Graphics 2022.1.0 and Driver Version 510.39.01. Have you had a chance to look at User Guide :: Nsight Graphics Documentation? This website provides some steps for those having an issue capturing a Vulkan Application. You may need to delete all VK_LAYER_NV_*.json in ~/.local/share/vulkan/implicit_layer.d/.
Regards,

Hey! First of all thank you for your time so far!
Well, found out that running vkcube with the following Launch/Environment works (for Frame Debugging)! :)
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/home/doritos/tools/Nsight/NVIDIA-Nsight-Graphics-2022.1/target/linux-desktop-nomad-x64/NomadVulkanLayer; *where doritos is my user name.

Looks like Nsight doesn’t translate ${XDG_DATA_DIRS} for me correctly.
So now (with some tweaking) everything is OKish!

Also, found out that "Failed to create Vulkan rendering backend” on 2021.5 happens when running with sudo.
On the other hand on 2022.1 running with sudoit has problem connecting. Anyway, I will just enable profiling for all users.

EDIT: Adding /home/doritos/tools/Nsight/NVIDIA-Nsight-Graphics-2022.1/target/linux-desktop-nomad-x64/GPUTraceVulkanLayer also allowed me to profile. So everything is good!

Backstory:
Knowing that it has something to do with my setup I got all the environment used by Nsight with env. Importing that environment in terminal also had the same problem.
Binary searched all the environment variables until the variable that won’t launch the application.
End up with XDG_DATA_DIRS=${XDG_DATA_DIRS}:/home/doritos/tools/Nsight/NVIDIA-Nsight-Graphics-2022.1/target/linux-desktop-nomad-x64/NomadVulkanLayer which by its own will crash any vulkan app, vulkaninfo included.
${XDG_DATA_DIRS} not translated was suspicious so I end up manually translating it.

Thanks for the update and good to hear it seems to be working now. I will pass along your other comments to the engineering team as well.