Can not detect the nvidia 1080

#1

Once I went past the physical device detection part of the tutorial, I started seeing error that nvidia cards are not found.

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# ./vulkanTutorial-phys-dev
Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  Failed to detect any valid GPUs in the current config
validation layer: setupLoaderTrampPhysDevs:  Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
failed to find GPUs with Vulkan support!

So I tried to figure where this error message is emitting from but egrep text search points to:
/root/vulkan/1.1.114.0/source/Vulkan-Loader/loader/loader.c
VkResult setupLoaderTermPhysDevs() function.

I will probably eventually figure out why, but If you have any idea please let me know.

Here is 1080 info I have:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.26       Driver Version: 430.26       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080    Off  | 00000000:01:00.0 Off |                  N/A |
| 34%   48C    P0    42W / 180W |      0MiB /  8116MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 1080    Off  | 00000000:02:00.0 Off |                  N/A |
|  0%   47C    P5    14W / 180W |      0MiB /  8119MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# lspci | grep nvidia -i
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
02:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest#

root@guyen-MS-7B22:/usr/share/vulkan/icd.d# ls
nvidia_icd.json

root@guyen-MS-7B22:/usr/share/vulkan/icd.d# cat nvidia_icd.json
{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.1.99"
    }
}
#2

As a debugging effort, at least I was able to build Vulkan loader (libvulkan.so) by hacking the loader.c in appropraite function and put following statement:

    loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
               "setupLoaderTermPhysDevs:  total_icd_count: "
               "0x0%d",
               inst->total_icd_count);

This printed out total_icd_count being one. I am assuming this is because one icd serves both NVIDIA GPU i installed.

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# ./vulkanTutorial-phys-dev
Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x01
validation layer: setupLoaderTermPhysDevs:  Failed to detect any valid GPUs in the current config
validation layer: setupLoaderTrampPhysDevs:  Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
failed to find GPUs with Vulkan support!

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest#
#3

Try updating the NV drivers. There’s something about GLX in changelog.

#4

Your $DISPLAY being set to localhost:10.0 suggests that you may not be running directly on the machine, but are instead logged into it remotely (e.g. via ssh using X11 forwarding: -X or -Y option).

Retry when you’re logged in directly. In this case, your display will be set to something like :0, :1, etc. (or unix:0, unix:1), which will use local IPC for communicating with the X server and allow (relatively) direct access to the GPU without a network protocol in the middle (such as GLX).

(GLX will work for some old OpenGL programs, if support for it is enabled in the X server. But I’ve not heard that Vulkan offers anything like this.)

#5

Dark photon. As a matter of fact I did but still get the error below.
I logged locally and started GUI desktop (startx) and tried. I also replaced nvidia with amd vega 56 and got following:

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# !1972
./vulkanTutorial-phys-dev 
Xlib:  extension "NV-GLX" missing on display ":0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x01
validation layer: setupLoaderTermPhysDevs:  Failed to detect any valid GPUs in the current config
validation layer: setupLoaderTrampPhysDevs:  Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
failed to find GPUs with Vulkan support!
#6

I see a few hits out there for your problem. You might check out the following links for possible solutions.

It sounds like some folks were able to get rid of this error just by reinstalling the latest NVidia graphics drivers.

Have you tried running vulkaninfo?

#7

I dont think I have tried. Since I already installed MAD VEGA 56, Nvidia driver version probably not relevant. I may try but other concerns remain that whether it is going to break anything else after I upgraded the driver. Thanks.,

#8

I got some progress. Download public version of AMDVLK and build the ICD driver and installed it.
Now I only built the 64-bit version and not 32-bit, did not bother with 32-bit and now I seem to be getting progress, save for a 32-bit version missing complaint. This looks promising.

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# ./vulkanTutorial-phys-dev
validation layer: /usr/lib/i386-linux-gnu/amdvlk32.so: cannot open shared object file: No such file or directory
Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
#9

Now I continued to push forward without taking care of 32-bit version and see far I can go and at the swap chain tutorial it exited with error. I will try putting some debugging message into loader code again and re-compile and see if I can figure out something.

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# ./vulkanTutorial-swapchain
validation layer: /usr/lib/i386-linux-gnu/amdvlk32.so: cannot open shared object file: No such file or directory
Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
failed to create swap chain!
#10

Previous post was also through ssh. Now through local run, I got following, I am not gettign “faield to create swap chain” problem anymore!!
The window has not crash closed, which I presume means probably has not failed. What I am not sure if whether it has succeeded though.

root@guyen-MS-7B22:/git.co/dev-learn/vulkan/vulkantest# ./vulkanTutorial-swapchain 
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Xlib:  extension "NV-GLX" missing on display ":0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
[2295:2450:0912/233610.352789:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
/usr/share/libdrm/amdgpu.ids: No such file or directory
[2424:2424:0912/233628.189700:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
[2295:2295:0912/233630.074048:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot obtain local name", source: chrome-extension://ebongfbmlegepmkkdjlnlmdcmckedlal/page.html (0)
[2424:2424:0912/233630.076205:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[2424:2424:0912/233630.081505:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[2295:2471:0912/233631.205581:ERROR:udev_watcher.cc(94)] Failed to begin udev enumeration.
[2295:2295:0912/233714.953016:ERROR:component_updater_impl.cc(817)] [AU]An error occured while installing an update for PartnerRules

ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234333.234845:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234333.234884:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234351.557298:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234351.557376:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
[2424:2424:0912/234434.191250:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234809.781714:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234809.781761:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234846.005188:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234846.005216:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234901.357238:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234901.357272:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234906.784296:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234906.784345:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[2295:2421:0912/234917.182263:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[2295:2421:0912/234917.182292:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
#11

Why do you have a bunch of Google Chrome (chromium) error messages mixed in here? It makes it difficult to tell what output your program generated.

My guess is that all of the ALSA (sound) and Gtk (GUI) messages, as well as those with timestamps, are from Chromium. That leaves pretty much what you posted before, with minor changes:

# ./vulkanTutorial-swapchain 
Xlib:  extension "NV-GLX" missing on display ":0".
validation layer: Added messenger
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
validation layer: setupLoaderTermPhysDevs:  total_icd_count: 0x02
/usr/share/libdrm/amdgpu.ids: No such file or directory

To see if your graphics drivers are installed properly, try running other Vulkan apps, such as the Vulkan Hardware Capabilties Viewer.