Fail to open Nsight Compute 2024.1.0(Ubuntu)

I am learning cuda programming on my WSL2 ubuntu 22.04 with cuda 12.4.
The Nsight Compute cannot be opened properly:
image

It seems the dependency lib is missing. Can you try $export QT_DEBUG_PLUGINS=1 to see any detail error printed ?

qt.core.plugin.factoryloader: checking directory path "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archlevel": 1,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqoffscreen.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archlevel": 1,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-egl.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
qt.core.plugin.factoryloader: checking directory path "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/platforms" ...
qt.core.library: "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so" loaded library
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
qt.core.library: "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" cannot load: Cannot load library /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" : "Cannot load library /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, offscreen, wayland, wayland-egl.

Application could not be initialized!
    This is likely due to missing Qt platform dependencies.
    For a list of dependencies, please refer to https://doc.qt.io/qt-6/linux-requirements.html
    To view missing libraries, set QT_DEBUG_PLUGINS=1 and re-run the application.

"/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so" unloaded library
Warning: OpenGL Version check failed. Falling back to Mesa software rendering.
qt.core.plugin.factoryloader: checking directory path "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archlevel": 1,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqoffscreen.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archlevel": 1,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
qt.core.plugin.factoryloader: looking at "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-egl.so"
qt.core.plugin.loader: Found metadata in lib /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 394496
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
qt.core.plugin.factoryloader: checking directory path "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/platforms" ...
qt.core.library: "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqwayland-generic.so" loaded library
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
qt.core.library: "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" cannot load: Cannot load library /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" : "Cannot load library /opt/nvidia/nsight-compute/2024.1.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, offscreen, wayland, wayland-egl.

################# ERROR: CrashReporter #################
CrashReporter

Qt initialization failed

Failed to load Qt platform plugin: "wayland"
Application is going to abort
Warning: Missing charsets in String to FontSet conversion

Can you try to install these missing dependencies ?

I have install qtwayland5 on my wsl2 ubuntu 22.04 by apt install qtwayland5 but it still doesn’t work.

Here is the interesting thing: The Nsight compute 2024.1.0(Ubuntu) can be launched properply when my wsl2 is inactive and can’t be launched after wsl2 is activated.

I also found that I can use the Nsight compute that installed by windows cuda toolkit to profile my work too. So seems there is not necessary for me to use Nsight compute (ubuntu). But there is still a problem and always better for me to figure it out.

The Nsight compute 2024.1.0(Ubuntu) can be launched properply when my wsl2 is inactive

------What do you mean by this? If your wsl2 is inactive, then you are running on windows native, then it should be Nsight Compute(Windows)?

There are two nsight compute on my PC. The first is nsight comute 2024.1(ubuntu) that installed with the cuda toolkit on my wsl2 ubuntu. The second is the nsight compute 2024.1 that installed with cuda toolkit 12.4 on my windows. I have two cuda12.4 on my PC (one on wsl2, one on windows).
image

The Nsight compute 2024.1.0(Ubuntu) can be launched properply when my wsl2 is inactive and can’t be launched after wsl2 is activated.

So the launch issue is all about the upper one in the screenshot.

Hi, @karhoutam

We can’t reproduce your issue. The Nsight Compute(Ubuntu) can launched successfully both in and out of WSL.

Also this launched Nsight Compute(ubuntu) is actually the version that installed in WSL.

But anyway, i think it doesn’t block your usage as you can still launch it directly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.