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.
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:
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#
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.)
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!
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.,
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
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!
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
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