felixdoerre / primus_vk

Vulkan GPU-offloading layer
BSD 2-Clause "Simplified" License
229 stars 18 forks source link

Last steam-manjaro version with pvkrun, does not run the dedicated gpu and vulkan #77

Closed zimudec closed 3 years ago

zimudec commented 3 years ago

The latest version of steam-manjaro (1.0.0.66-1) still shows an error when trying to run vulkan:

PrimusVK: Searching for display GPU:
PrimusVK: 0x56731a60: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x56731a60.
PrimusVK: No device for the rendering GPU found. Is the correct driver installed?
PrimusVK: VK_ICD_FILENAMES not set
vkCreateInstance failed with error -3
BInit - Unable to initialize Vulkan!
[0929/203723.960952:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer
[0929/203724.054021:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer
[0929/203724.172321:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer
Installing breakpad exception handler for appid(steam)/version(1599174997)

I go back to the previous version (1.0.0.61-7) and pvkrun with vulkan, steam and optimus works without problems.

I do not know the cause of the problem, I need guidance.

felixdoerre commented 3 years ago

Could you share the output with the environment variable VK_LOADER_DEBUG=info set? The error clearly shows that the nvidia driver is not loading and not reporting any vulkan devices, and I would like to know if the loader skips it (for some reason) or the driver simply does not respond with any devices.

zimudec commented 3 years ago

This is the result:

`Manjaro steam native configuration found! Running Steam on manjarolinux 20.1 64-bit STEAM_RUNTIME is disabled by the user Can't find 'steam-runtime-check-requirements', continuing anyway /home/zimudec/.local/share/Steam/ubuntu12_32/steam WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work. [2020-09-30 20:58:18] Startup - updater built Sep 3 2020 21:18:09 Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-09-30 20:58:19] Loading cached metrics from disk (/home/zimudec/.local/share/Steam/package/steam_client_metrics.bin) Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-09-30 20:58:19] Verificando instalación... [2020-09-30 20:58:19] Verification complete Loaded SDL version 2.0.13-5919606

(steam:2798): Gtk-WARNING **: 20:58:21.609: Unable to locate theme engine in module_path: "murrine",

(steam:2798): Gtk-WARNING **: 20:58:21.632: Unable to locate theme engine in module_path: "murrine",

(steam:2798): Gtk-WARNING **: 20:58:21.632: Unable to locate theme engine in module_path: "murrine",

(steam:2798): Gtk-WARNING **: 20:58:21.632: Unable to locate theme engine in module_path: "murrine",

(steam:2798): Gtk-WARNING **: 20:58:21.649: Unable to locate theme engine in module_path: "adwaita",

(steam:2798): Gtk-WARNING **: 20:58:21.650: Unable to locate theme engine in module_path: "adwaita",

(steam:2798): Gtk-WARNING **: 20:58:21.653: Unable to locate theme engine in module_path: "murrine",

(steam:2798): Gtk-WARNING **: 20:58:21.653: Unable to locate theme engine in module_path: "murrine", STEAM_RUNTIME_HEAVY: 0 Installing breakpad exception handler for appid(steam)/version(1599174997) [0930/205826.402867:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: browser [0930/205826.686080:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [0930/205826.686217:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [0930/205826.686267:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [0930/205826.686291:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [0930/205828.499315:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [0930/205828.499445:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [0930/205828.499499:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [0930/205828.499518:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [0930/205828.500330:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: gpu-process [0930/205828.832675:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process. [0930/205829.759802:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [0930/205829.759933:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [0930/205829.759943:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [0930/205829.759952:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [0930/205829.811928:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: utility Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CAppInfoCacheReadFromDiskThread took 2880 milliseconds to initialize Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 8 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CApplicationManagerPopulateThread took 9630 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Proceed to auto login Opted-in Controller Mask for AppId 0: 0

(steam:2798): Gtk-WARNING **: 20:58:42.343: gtk_disable_setlocale() must be called before gtk_init() INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" Installing breakpad exception handler for appid(steam)/version(1599174997) local (potentially out of sync) copy of roaming config loaded - 14868 bytes. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_LAYER_PATH will be ignored. INFO: Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) INFO: Insert instance layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) Xlib: extension "NV-GLX" missing on display ":0.0". Xlib: extension "NV-GLX" missing on display ":0.0". INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x55964a423c10: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x55964a423c10. PrimusVK: No device for the rendering GPU found. Is the correct driver installed? PrimusVK: VK_ICD_FILENAMES not set vkCreateInstance failed with error -3 BInit - Unable to initialize Vulkan! Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) roaming config store loaded successfully - 14868 bytes. migrating temporary roaming config store BRefreshApplicationsInLibrary 1: 42ms INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_LAYER_PATH will be ignored. INFO: Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nvidia_icd.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) INFO: Insert instance layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) Xlib: extension "NV-GLX" missing on display ":0.0". Xlib: extension "NV-GLX" missing on display ":0.0". INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x56cd5be0: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x56cd5be0. PrimusVK: No device for the rendering GPU found. Is the correct driver installed? PrimusVK: VK_ICD_FILENAMES not set vkCreateInstance failed with error -3 BInit - Unable to initialize Vulkan! Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Failed to init SteamVR because it isn't installed Installing breakpad exception handler for appid(steam)/version(1599174997) [0930/205850.625005:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer ExecCommandLine: "'/home/zimudec/.local/share/Steam/ubuntu12_32/steam'" System startup time: 30.07 seconds Installing breakpad exception handler for appid(steam)/version(1599174997) [0930/205852.431286:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [0930/205852.437064:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) BuildCompleteAppOverviewChange: 332 RegisterForAppOverview 1: 33ms RegisterForAppOverview 2: 34ms Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997)`

felixdoerre commented 3 years ago

So we can see: the nvidia driver is loaded, however it does not report a device. From the output, I can see, that you didn't remove /usr/share/vulkan/icd.d/nvidia_icd.json. Could you please try to do that?

Loading the nvidia driver twice (once unwrappend and once wrapped) can cause the wrapped driver to not work (and the unwrapped driver never works on optimus laptops in any case). The "real" error message is Xlib: extension "NV-GLX" missing on display ":0.0"., this is where the nvidia driver complains that it tries to connect to display :0 which is not an nvidia-X-server. This is exactly the behavior that the "wrapped" driver intends to fix. However loading the driver twice can nullify this workaround.

zimudec commented 3 years ago

I deleted the json file and tried running pvkrun steam, but it showed the same above mentioned error again.

Something very curious:

I ran lutris with pvkrun, it detects my nvidia gpu with no problems. Then, without closing lutris, I ran pvkrun steam, and it also correctly detected my nvidia gpu. But of course, if I close steam and lutris, and then run only pvkrun steam, it doesn't start nvidia and again shows the error.

[zimudec@zimudec ~]$ VK_LOADER_DEBUG=info pvkrun lutris Unable to load locale dir, translations won't work. 2020-10-01 20:48:16,516: Failed to get libraries from ldconfig: Command '['/usr/bin/ldconfig', '-p']' died with <Signals.SIGSEGV: 11>. 2020-10-01 20:48:17,923: MAME XML generation launched in the background, not returning anything this time 2020-10-01 20:48:17,924: Getting full game list from MAME... 2020-10-01 20:48:17,926: MAME isn't installed, can't retrieve systems list. 2020-10-01 20:48:17,997: Running Lutris 0.5.7.1 2020-10-01 20:48:17,997: Using NVIDIA Corporation 2020-10-01 20:48:17,997: GPU: 8086:0166 17AA:3904 using i915 drivers 2020-10-01 20:48:17,998: i386 libGL.so.1 missing (needed by opengl) 2020-10-01 20:48:17,998: x86_64 libGL.so.1 missing (needed by opengl) 2020-10-01 20:48:17,998: i386 libvulkan.so.1 missing (needed by vulkan) 2020-10-01 20:48:17,998: x86_64 libvulkan.so.1 missing (needed by vulkan) INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_LAYER_PATH will be ignored. INFO: Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) INFO: Insert instance layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x557a4ac82fa0: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x557a4ac82fa0. PrimusVK: 0x557a4ab92c50. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 2020-10-01 20:48:19,124: Vulkan is supported 2020-10-01 20:48:19,774: MAME XML written

Without closing lutris:

[zimudec@zimudec ~]$ VK_LOADER_DEBUG=info pvkrun steam Manjaro steam native configuration found! Running Steam on manjarolinux 20.1 64-bit STEAM_RUNTIME is disabled by the user Can't find 'steam-runtime-check-requirements', continuing anyway /home/zimudec/.local/share/Steam/ubuntu12_32/steam WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work. [2020-10-01 20:52:36] Startup - updater built Sep 3 2020 21:18:09 Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-01 20:52:36] Loading cached metrics from disk (/home/zimudec/.local/share/Steam/package/steam_client_metrics.bin) Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-01 20:52:36] Verificando instalación... [2020-10-01 20:52:36] Verification complete Loaded SDL version 2.0.13-5919606

(steam:7774): Gtk-WARNING **: 20:52:37.110: Unable to locate theme engine in module_path: "murrine",

(steam:7774): Gtk-WARNING **: 20:52:37.112: Unable to locate theme engine in module_path: "murrine",

(steam:7774): Gtk-WARNING **: 20:52:37.112: Unable to locate theme engine in module_path: "murrine",

(steam:7774): Gtk-WARNING **: 20:52:37.112: Unable to locate theme engine in module_path: "murrine",

(steam:7774): Gtk-WARNING **: 20:52:37.114: Unable to locate theme engine in module_path: "adwaita",

(steam:7774): Gtk-WARNING **: 20:52:37.114: Unable to locate theme engine in module_path: "adwaita",

(steam:7774): Gtk-WARNING **: 20:52:37.116: Unable to locate theme engine in module_path: "murrine",

(steam:7774): Gtk-WARNING **: 20:52:37.116: Unable to locate theme engine in module_path: "murrine", Installing breakpad exception handler for appid(steam)/version(1599174997) STEAM_RUNTIME_HEAVY: 0 [1001/205237.365573:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: browser [1001/205237.394294:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1001/205237.394374:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1001/205237.394386:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1001/205237.394396:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1001/205237.441335:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1001/205237.441418:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1001/205237.441429:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1001/205237.441439:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1001/205237.442136:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: gpu-process [1001/205237.472483:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process. [1001/205237.517278:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1001/205237.517377:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1001/205237.517387:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1001/205237.517396:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1001/205237.518152:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: utility Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 8 Warning: failed to set thread priority: set failed for priority 8 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CAppInfoCacheReadFromDiskThread took 143 milliseconds to initialize Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CApplicationManagerPopulateThread took 6568 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Proceed to auto login Opted-in Controller Mask for AppId 0: 0

(steam:7774): Gtk-WARNING **: 20:52:45.026: gtk_disable_setlocale() must be called before gtk_init() local (potentially out of sync) copy of roaming config loaded - 14868 bytes. INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_LAYER_PATH will be ignored. INFO: Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) INFO: Insert instance layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x558231586f20: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x558231586f20. PrimusVK: 0x558231586f80. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 INFO: Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so INFO: Inserted device layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) INFO: Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so PrimusVK: fetching dispatch for 0x5582316a9e50 PrimusVK: Creating display device finished!: 0 PrimusVK: fetching dispatch for 0x5582316a8bb0 PrimusVK: CreateDevice done Installing breakpad exception handler for appid(steam)/version(1599174997) INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/primus_vk.json, version "1.0.0" INFO: Found manifest file /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json, version "1.0.0" INFO: Found manifest file /home/zimudec/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_LAYER_PATH will be ignored. INFO: Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version "1.0.0" INFO: Loader is running with elevated permissions. Environment variable XDG_DATA_HOME will be ignored. INFO: Loader is running with elevated permissions. Environment variable VK_ICD_FILENAMES will be ignored. INFO: Found ICD manifest file /usr/share/vulkan/icd.d/nv_vulkan_wrapper.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" INFO: Found ICD manifest file /usr/share/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" INFO: Insert instance layer VK_LAYER_MESA_device_select (libVkLayer_MESA_device_select.so) INFO: Insert instance layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x579193b0: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x579193b0. PrimusVK: 0x57b4bb00. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 INFO: Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so INFO: Inserted device layer VK_LAYER_PRIMUS_PrimusVK (libprimus_vk.so.1) INFO: Failed to find vkGetDeviceProcAddr in layer libVkLayer_MESA_device_select.so PrimusVK: fetching dispatch for 0x57b4dc60 PrimusVK: Creating display device finished!: 0 PrimusVK: fetching dispatch for 0x578e1e10 PrimusVK: CreateDevice done Installing breakpad exception handler for appid(steam)/version(1599174997) roaming config store loaded successfully - 14868 bytes. migrating temporary roaming config store BRefreshApplicationsInLibrary 1: 25ms [1001/205248.043860:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1001/205248.149118:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1001/205248.266152:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Installing breakpad exception handler for appid(steam)/version(1599174997) Failed to init SteamVR because it isn't installed ExecCommandLine: "'/home/zimudec/.local/share/Steam/ubuntu12_32/steam'" Installing breakpad exception handler for appid(steam)/version(1599174997) System startup time: 13.45 seconds [1001/205250.535708:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings [1001/205250.556680:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings BuildCompleteAppOverviewChange: 332 RegisterForAppOverview 1: 30ms RegisterForAppOverview 2: 31ms Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997)

felixdoerre commented 3 years ago

When you run pvkrun steam now it can not show the same output. At least the lines with nvidia_icd.json have to vanish. (I currently don't run pvkrun steam, but modify the individual game commands to run pvkrun %command%. That way the dedicated graphics card is not triggered when only steam is running, but only for the individual games). Could you show the exact output of running pvkrun steam when it does not work?

felixdoerre commented 3 years ago

you can also try to run ENABLE_PRIMUS_LAYER=1 optirun -b none steam (and post the output when it fails)? That way the wrapper explicitly powers on the dedicated graphics card and it is not only powered on when an access to the graphics API is detected (maybe such a detection is broken). This would fit to the symptoms of a successful launch when another application is using bumblebee in parallel.

zimudec commented 3 years ago

When you run pvkrun steam now it can not show the same output. At least the lines with nvidia_icd.json have to vanish. (I currently don't run pvkrun steam, but modify the individual game commands to run pvkrun %command%. That way the dedicated graphics card is not triggered when only steam is running, but only for the individual games). Could you show the exact output of running pvkrun steam when it does not work?

[zimudec@zimudec ~]$ pvkrun steam Manjaro steam native configuration found! Running Steam on manjarolinux 20.1 64-bit STEAM_RUNTIME is disabled by the user Can't find 'steam-runtime-check-requirements', continuing anyway /home/zimudec/.local/share/Steam/ubuntu12_32/steam WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work. [2020-10-02 20:52:01] Startup - updater built Sep 3 2020 21:18:09 Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-02 20:52:02] Loading cached metrics from disk (/home/zimudec/.local/share/Steam/package/steam_client_metrics.bin) Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-02 20:52:02] Verificando instalación... [2020-10-02 20:52:02] Verification complete Loaded SDL version 2.0.13-5919606

(steam:3150): Gtk-WARNING **: 20:52:02.951: Unable to locate theme engine in module_path: "murrine",

(steam:3150): Gtk-WARNING **: 20:52:02.954: Unable to locate theme engine in module_path: "murrine",

(steam:3150): Gtk-WARNING **: 20:52:02.954: Unable to locate theme engine in module_path: "murrine",

(steam:3150): Gtk-WARNING **: 20:52:02.954: Unable to locate theme engine in module_path: "murrine",

(steam:3150): Gtk-WARNING **: 20:52:02.966: Unable to locate theme engine in module_path: "adwaita",

(steam:3150): Gtk-WARNING **: 20:52:02.967: Unable to locate theme engine in module_path: "adwaita",

(steam:3150): Gtk-WARNING **: 20:52:02.972: Unable to locate theme engine in module_path: "murrine",

(steam:3150): Gtk-WARNING **: 20:52:02.972: Unable to locate theme engine in module_path: "murrine", Installing breakpad exception handler for appid(steam)/version(1599174997) STEAM_RUNTIME_HEAVY: 0 [1002/205203.507188:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: browser [1002/205203.543996:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/205203.544093:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/205203.544114:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/205203.544134:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/205203.590648:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/205203.590720:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/205203.590733:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/205203.590743:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/205203.591668:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: gpu-process [1002/205203.620580:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process. [1002/205203.663657:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/205203.663738:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/205203.663751:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/205203.663760:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/205203.664461:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: utility Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 8 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CAppInfoCacheReadFromDiskThread took 134 milliseconds to initialize Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CApplicationManagerPopulateThread took 6528 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Proceed to auto login Opted-in Controller Mask for AppId 0: 0

(steam:3150): Gtk-WARNING **: 20:52:11.039: gtk_disable_setlocale() must be called before gtk_init() Xlib: extension "NV-GLX" missing on display ":0.0". INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x560cc4b75f90: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x560cc4b75f90. PrimusVK: No device for the rendering GPU found. Is the correct driver installed? PrimusVK: VK_ICD_FILENAMES not set vkCreateInstance failed with error -3 BInit - Unable to initialize Vulkan! Installing breakpad exception handler for appid(steam)/version(1599174997) local (potentially out of sync) copy of roaming config loaded - 14868 bytes. Xlib: extension "NV-GLX" missing on display ":0.0". INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x5694ae80: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x5694ae80. PrimusVK: No device for the rendering GPU found. Is the correct driver installed? PrimusVK: VK_ICD_FILENAMES not set vkCreateInstance failed with error -3 BInit - Unable to initialize Vulkan! roaming config store loaded successfully - 14868 bytes. migrating temporary roaming config store BRefreshApplicationsInLibrary 1: 32ms [1002/205214.020722:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/205214.118370:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/205214.238605:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Installing breakpad exception handler for appid(steam)/version(1599174997) Failed to init SteamVR because it isn't installed ExecCommandLine: "'/home/zimudec/.local/share/Steam/ubuntu12_32/steam'" System startup time: 12.15 seconds Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings [1002/205214.837514:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/205214.862030:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings BuildCompleteAppOverviewChange: 332 RegisterForAppOverview 1: 22ms RegisterForAppOverview 2: 22ms Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997)

When I run only steam (to run with the integrated gpu), and then in the game properties I enter pvkrun %command%, there if it runs with the dedicated gpu!

I checked with darkest dungeon and sleeping dogs definitive edition with proton GE-5.5-1 (both run without issue over the older version of steam-manjaro with pvkrun steam).

Will I have to do the same for each game? will there be a more elegant solution? why does this affect only steam? (well it might affect another app as well and I haven't checked yet)

zimudec commented 3 years ago

you can also try to run ENABLE_PRIMUS_LAYER=1 optirun -b none steam (and post the output when it fails)? That way the wrapper explicitly powers on the dedicated graphics card and it is not only powered on when an access to the graphics API is detected (maybe such a detection is broken). This would fit to the symptoms of a successful launch when another application is using bumblebee in parallel.

[zimudec@zimudec ~]$ ENABLE_PRIMUS_LAYER=1 optirun -b none steam Manjaro steam native configuration found! Running Steam on manjarolinux 20.1 64-bit STEAM_RUNTIME is disabled by the user Can't find 'steam-runtime-check-requirements', continuing anyway /home/zimudec/.local/share/Steam/ubuntu12_32/steam WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work. [2020-10-02 21:12:18] Startup - updater built Sep 3 2020 21:18:09 Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-02 21:12:18] Loading cached metrics from disk (/home/zimudec/.local/share/Steam/package/steam_client_metrics.bin) Installing breakpad exception handler for appid(steam)/version(1599174997) [2020-10-02 21:12:18] Verificando instalación... [2020-10-02 21:12:18] Verification complete Loaded SDL version 2.0.13-5919606

(steam:7098): Gtk-WARNING **: 21:12:19.580: Unable to locate theme engine in module_path: "murrine",

(steam:7098): Gtk-WARNING **: 21:12:19.605: Unable to locate theme engine in module_path: "murrine",

(steam:7098): Gtk-WARNING **: 21:12:19.605: Unable to locate theme engine in module_path: "murrine",

(steam:7098): Gtk-WARNING **: 21:12:19.605: Unable to locate theme engine in module_path: "murrine",

(steam:7098): Gtk-WARNING **: 21:12:19.620: Unable to locate theme engine in module_path: "adwaita",

(steam:7098): Gtk-WARNING **: 21:12:19.621: Unable to locate theme engine in module_path: "adwaita",

(steam:7098): Gtk-WARNING **: 21:12:19.624: Unable to locate theme engine in module_path: "murrine",

(steam:7098): Gtk-WARNING **: 21:12:19.624: Unable to locate theme engine in module_path: "murrine", Installing breakpad exception handler for appid(steam)/version(1599174997) STEAM_RUNTIME_HEAVY: 0 [1002/211220.258108:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: browser [1002/211220.294450:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/211220.294534:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/211220.294546:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/211220.294555:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/211220.353024:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/211220.353101:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/211220.353114:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/211220.353123:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/211220.353804:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: gpu-process [1002/211220.385991:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process. [1002/211220.454545:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0 [1002/211220.454626:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1599167902 [1002/211220.454638:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public [1002/211220.454649:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve [1002/211220.455381:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: utility Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CAppInfoCacheReadFromDiskThread took 137 milliseconds to initialize Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 8 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings Warning: failed to set thread priority: set failed for 8: -1: setpriority() failed Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) CApplicationManagerPopulateThread took 6725 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Proceed to auto login Opted-in Controller Mask for AppId 0: 0

(steam:7098): Gtk-WARNING **: 21:12:28.288: gtk_disable_setlocale() must be called before gtk_init() INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x5625330e0d50: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x5625330e0d50. PrimusVK: 0x5625330e5930. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 PrimusVK: fetching dispatch for 0x562533208d20 PrimusVK: Creating display device finished!: 0 PrimusVK: fetching dispatch for 0x562533207a80 PrimusVK: CreateDevice done Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) local (potentially out of sync) copy of roaming config loaded - 14868 bytes. roaming config store loaded successfully - 14868 bytes. migrating temporary roaming config store BRefreshApplicationsInLibrary 1: 21ms INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0x57119bc0: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0x57119bc0. PrimusVK: 0x57325b30. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 PrimusVK: fetching dispatch for 0x57327c90 PrimusVK: Creating display device finished!: 0 PrimusVK: fetching dispatch for 0x570bbe10 PrimusVK: CreateDevice done [1002/211231.552044:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/211231.687466:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/211231.867036:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Installing breakpad exception handler for appid(steam)/version(1599174997) Failed to init SteamVR because it isn't installed ExecCommandLine: "'/home/zimudec/.local/share/Steam/ubuntu12_32/steam'" System startup time: 13.78 seconds Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings [1002/211233.129473:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer [1002/211233.136881:INFO:crash_reporting.cc(270)] Crash reporting enabled for process: renderer Warning: failed to set thread priority: set failed for 4: -1: setpriority() failed Warning: failed to set thread priority: set failed for priority 4 Warning: support for elevated priorities is most likely unavailable, suppressing future warnings BuildCompleteAppOverviewChange: 332 RegisterForAppOverview 1: 37ms RegisterForAppOverview 2: 37ms Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997) Installing breakpad exception handler for appid(steam)/version(1599174997)

With that steam command it starts perfectly with the dedicated gpu! unlike with pvkrun steam (result shown above).

I tested sleeping dogs which requires vulkan to work, and it seems to run without any problems, without any launch parameters in properties.

With ENABLE_PRIMUS_LAYER=1 optirun -b primus steam same result.

felixdoerre commented 3 years ago

Yes, probably we need to get more debug output from prvkrun steam to see what's going on (maybe with LD_DEBUG=libs), and who messes around with the configuration that makes primus start the GPU. I've just upgraded to steam 1.0.0.66 (from debian experimental), and see a similar error message (indicating that vulkan didn't start), but steam seems to start successfully nevertheless (I probably wrongly assumed from your issue description that this error causes steam not to start). But steam seems to mess with the environment variables preventing the game from starting with primus-vk. I will try to understand this better later today.

Regarding adding pvkrun %command% to every game: That's what I am currently doing. As many games still require a few additional tweaks to their proton settings, I adjust the run command for most games in any case. (And the comfort of keeping steam running with the graphics card powered off and only activating it per-game is worth it for me :D ). I believe in lutris you can set this globally, to run games with pvkrun.

felixdoerre commented 3 years ago

Yes, this version of steam messes around with the LD_LIBRARY_PATH which breaks the activation of (OpenGL)-primus, which primus-vk relies on for powering on the gpu (this explains the "when I run another application with primus-vk in parallel, it works"). However this would mean that in that case only primus-vk works, but (OpenGL)-primus does not.

Here are my observations: When changing a game's run command to env > /tmp/steam-environ # %command%, I can observe that in the target environment ENABLE_PRIMUS_LAYER=1 is still set, but LD_LIBRARY_PATH is set to:

LD_LIBRARY_PATH=/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib32:/usr/lib32:/libx32:/usr/libx32:/lib:/usr/lib:/usr/lib/i386-linux-gnu/i686:/usr/lib/i386-linux-gnu/sse2:/usr/lib/i386-linux-gnu/i686/sse2:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/lib:/home/user/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib:/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus

Running and vulkan application with that environment fails, as we don't use the libGL provided by primus (last path entries), but the libGL provided by the "normal" system library path, which the steam runtime explicitly adds in the middle of all this mess (and before the primus path entries). So this is pretty clearly a bug in the steam runtime, that is does not respect existing LD_LIBRARY_PATHs correctly. I will open a bug against the steam runtime.

felixdoerre commented 3 years ago

This is the issue, I opened against the steam-runtime: https://github.com/ValveSoftware/steam-runtime/issues/274

zimudec commented 3 years ago

I also opened this issue about a problem with libglvnd 1.3 and steam. It may be related to the LD_LIBRARY_PATH problem. This causes me other problems running certain games mentioned.

https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/211

This issue of pvkrun, primus and steam, I have always tested them with libglvnd 1.1, so as not to mix the 2 problems.

zimudec commented 3 years ago

I add to the above:

Some time ago, rise of tomb raider native to linux worked fine, but recent tests (independent of the version of steam and libglvnd), it fails showing the following error:

Captura de pantalla de 2020-10-03 16-02-58

I sent the dump file delivered by tomb raider to Feral, and they tell me that the cause of the error seems to be related to the vulkan libraries of the operating system. They gave me possible solutions, but without success. They can't give me any more help because they don't support manjaro.

This may have some indirect bearing on this whole primus, steam and vulkan thing.

felixdoerre commented 3 years ago

... I also have both the tomb raiders (rise and shadow) and they both work flawlessly on my system. However I always add "pvkrun" to the individual games and not to steam as a whole. The crash message itself will not be really useful, you will probably have to start the game in a debugger to get a stack trace. "the errors seems to be related to the vulkan libraries" can mean anything (from "driver not found" to "segfault inside a vulkan driver"). Do you have standard output from that game starting?

zimudec commented 3 years ago

... I also have both the tomb raiders (rise and shadow) and they both work flawlessly on my system. However I always add "pvkrun" to the individual games and not to steam as a whole. The crash message itself will not be really useful, you will probably have to start the game in a debugger to get a stack trace. "the errors seems to be related to the vulkan libraries" can mean anything (from "driver not found" to "segfault inside a vulkan driver"). Do you have standard output from that game starting?

Using that methodology, running steam, when running the game with pvkrun %command% in game properties, the terminal displays the following, and then displays the error mentioned above.

Opted-in Controller Mask for AppId 391220: 0
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to ProcessingShaderCache with ""
Installing breakpad exception handler for appid(steam)/version(1599174997)
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 391220, ActionID 1] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 391220, ActionID 1] : LaunchApp continues with user response "CreatingProcess"
Game update: AppID 391220 "", ProcID 12657, IP 0.0.0.0:0
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Starting app 391220
>>> Adding process 12657 for game ID 391220
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
>>> Adding process 12658 for game ID 391220
GameAction [AppID 391220, ActionID 1] : LaunchApp changed task to Completed with ""
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
>>> Adding process 12675 for game ID 391220
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12682 for game ID 391220
pid 12686 != 12682, skipping destruction (fork without exec?)
pid 12685 != 12682, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12688 for game ID 391220
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12689 for game ID 391220
>>> Adding process 12692 for game ID 391220
>>> Adding process 12694 for game ID 391220
>>> Adding process 12693 for game ID 391220
pid 12690 != 12658, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 12698 != 12658, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12697 for game ID 391220
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12699 for game ID 391220
>>> Adding process 12700 for game ID 391220
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x83adf0: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x83adf0.
PrimusVK: 0x82cfa0.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/zimudec/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 12705 for game ID 391220
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
>>> Adding process 12706 for game ID 391220
SDL2 initialised [built against 2.0.7, running with 2.0.7]
Game update: AppID 391220 "", ProcID 12706, IP 0.0.0.0:0
RecordSteamInterfaceCreation (PID 12706): SteamUtils008 / Utils
Setting breakpad minidump AppID = 391220
RecordSteamInterfaceCreation (PID 12706): SteamUser019 / User
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
RecordSteamInterfaceCreation (PID 12706): SteamUser019 / User
RecordSteamInterfaceCreation (PID 12706): SteamFriends015 / Friends
RecordSteamInterfaceCreation (PID 12706): SteamUtils008 / Utils
RecordSteamInterfaceCreation (PID 12706): SteamMatchMaking009 / Matchmaking
RecordSteamInterfaceCreation (PID 12706): SteamMatchMakingServers002 / MatchmakingServers
RecordSteamInterfaceCreation (PID 12706): STEAMUSERSTATS_INTERFACE_VERSION011 / UserStats
RecordSteamInterfaceCreation (PID 12706): STEAMAPPS_INTERFACE_VERSION008 / Apps
RecordSteamInterfaceCreation (PID 12706): SteamNetworking005 / Networking
RecordSteamInterfaceCreation (PID 12706): STEAMREMOTESTORAGE_INTERFACE_VERSION013 / RemoteStorage
RecordSteamInterfaceCreation (PID 12706): STEAMSCREENSHOTS_INTERFACE_VERSION002 / Screenshots
RecordSteamInterfaceCreation (PID 12706): STEAMHTTP_INTERFACE_VERSION002 / HTTP
RecordSteamInterfaceCreation (PID 12706): STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001 / UnifiedMessages
RecordSteamInterfaceCreation (PID 12706): SteamController003 / Controller
RecordSteamInterfaceCreation (PID 12706): STEAMUGC_INTERFACE_VERSION008 / UGC
RecordSteamInterfaceCreation (PID 12706): STEAMAPPLIST_INTERFACE_VERSION001 / AppList
RecordSteamInterfaceCreation (PID 12706): STEAMMUSIC_INTERFACE_VERSION001 / Music
RecordSteamInterfaceCreation (PID 12706): STEAMMUSICREMOTE_INTERFACE_VERSION001 / MusicRemote
RecordSteamInterfaceCreation (PID 12706): STEAMHTMLSURFACE_INTERFACE_VERSION_003 / HTMLSurface
RecordSteamInterfaceCreation (PID 12706): STEAMINVENTORY_INTERFACE_V001 / Inventory
RecordSteamInterfaceCreation (PID 12706): STEAMVIDEO_INTERFACE_V001 / Video
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
RiseOfTheTombRaider: dumped to "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes/01ee0f89-0698-1242-5ef09acd-22819308.dmp"
RiseOfTheTombRaider: crash reporter "/home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/feral_linux_crash_reporter" launching
Game crashed with signal 11
Game crashed with signal SIGSEGV(11): Segmentation fault.

You may be able to relaunch the game to send the crash log automatically.
You can also contact support@feralinteractive.com directly with details of the crash, Steam System Info, and the dump file:
/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes/01ee0f89-0698-1242-5ef09acd-22819308.dmp
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
Game removed: AppID 391220 "", ProcID 12706 
Game 391220 created interface STEAMAPPLIST_INTERFACE_VERSION001 / AppList
Game 391220 created interface STEAMAPPS_INTERFACE_VERSION008 / Apps
Game 391220 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_003 / HTMLSurface
Game 391220 created interface STEAMHTTP_INTERFACE_VERSION002 / HTTP
Game 391220 created interface STEAMINVENTORY_INTERFACE_V001 / Inventory
Game 391220 created interface STEAMMUSICREMOTE_INTERFACE_VERSION001 / MusicRemote
Game 391220 created interface STEAMMUSIC_INTERFACE_VERSION001 / Music
Game 391220 created interface STEAMREMOTESTORAGE_INTERFACE_VERSION013 / RemoteStorage
Game 391220 created interface STEAMSCREENSHOTS_INTERFACE_VERSION002 / Screenshots
Game 391220 created interface STEAMUGC_INTERFACE_VERSION008 / UGC
Game 391220 created interface STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001 / UnifiedMessages
Game 391220 created interface STEAMUSERSTATS_INTERFACE_VERSION011 / UserStats
Game 391220 created interface STEAMVIDEO_INTERFACE_V001 / Video
Game 391220 created interface SteamController003 / Controller
Game 391220 created interface SteamFriends015 / Friends
Game 391220 created interface SteamMatchMaking009 / Matchmaking
Game 391220 created interface SteamMatchMakingServers002 / MatchmakingServers
Game 391220 created interface SteamNetworking005 / Networking
Game 391220 created interface SteamUser019 / User
Game 391220 created interface SteamUtils008 / Utils
Game 391220 method call count for IClientUser::GetUserDataFolder : 1
Game 391220 method call count for IClientUser::GetSteamID : 1
Game 391220 method call count for IClientUtils::SetAPIDebuggingActive : 1
Game 391220 method call count for IClientUtils::GetAppID : 23
Game 391220 method call count for IClientUtils::RecordSteamInterfaceCreation : 22
Game 391220 method call count for IClientAppManager::GetCurrentLanguage : 1
Uploaded AppInterfaceStats to Steam
Exiting app 391220
No cached sticky mapping in ActivateActionSet.

How can I debug the .dmp file and deliver a readable result of what is inside?

felixdoerre commented 3 years ago

Ok, so this looks like, we don't even reach primus_vk from the game. I don't know how one would open .dmp files. That's a fileformat called minidump, which you would first need to convert into a regular coredump and then maybe inspect with gdb.

Luckily enough, Rise of the Tomb Raider is pretty easy to start manually, and the startscript has an option for inserting gdb right before the game launches:

.../steamapps/common/Rise of the Tomb Raider$ STEAM_RUNTIME=1 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh

When the segfault hits, gdb will prevent the program from crashing and allow you to get a backtrace with the bt command. Additionally you can inspect the state during which the game crashed further, but I don't have any specific instructions on what to look for without seeing the backtrace.

felixdoerre commented 3 years ago

I believe I got an idea what could be wrong in your case. I have found the sources for manjaro's bumblebee here: https://gitlab.manjaro.org/packages/community/bumblebee, but I can't find the sources for the (OpenGL)-primus package. Can you show me where the source code for the manjaro package for (OpenGL)-primus is, so I can validate my theory?

zimudec commented 3 years ago

Ok, so this looks like, we don't even reach primus_vk from the game. I don't know how one would open .dmp files. That's a fileformat called minidump, which you would first need to convert into a regular coredump and then maybe inspect with gdb.

Luckily enough, Rise of the Tomb Raider is pretty easy to start manually, and the startscript has an option for inserting gdb right before the game launches:

.../steamapps/common/Rise of the Tomb Raider$ STEAM_RUNTIME=1 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh

When the segfault hits, gdb will prevent the program from crashing and allow you to get a backtrace with the bt command. Additionally you can inspect the state during which the game crashed further, but I don't have any specific instructions on what to look for without seeing the backtrace.

i ran the command and then typed bt, but nothing happens. Is that correct?

`[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=1 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete PrimusVK: Searching for display GPU: PrimusVK: 0xba0e50: PrimusVK: Got integrated gpu! PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2) PrimusVK: Type: 1 PrimusVK: Searching for render GPU: PrimusVK: 0xba0e50. PrimusVK: 0x9ee5d0. PrimusVK: Got discrete gpu! PrimusVK: Device: GeForce GT 740M PrimusVK: Type: 2 GNU gdb (GDB) 9.2 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./signalwrapper... (No debugging symbols found in ./signalwrapper) (gdb) bt No stack. (gdb) `

zimudec commented 3 years ago

I believe I got an idea what could be wrong in your case. I have found the sources for manjaro's bumblebee here: https://gitlab.manjaro.org/packages/community/bumblebee, but I can't find the sources for the (OpenGL)-primus package. Can you show me where the source code for the manjaro package for (OpenGL)-primus is, so I can validate my theory?

I do not understand, in what path can I find the source code? Is it any of these?

[zimudec@zimudec Rise of the Tomb Raider]$ locate primus /usr/bin/primus_vk_diag /usr/bin/primusrun /usr/lib/libprimus_vk.so.1 /usr/lib/primus /usr/lib/primus/libGL.so.1 /usr/lib32/libprimus_vk.so /usr/lib32/libprimus_vk.so.1 /usr/lib32/primus /usr/lib32/primus/libGL.so.1 /usr/share/bash-completion/completions/primusrun /usr/share/licenses/lib32-primus /usr/share/licenses/lib32-primus_vk /usr/share/licenses/primus /usr/share/licenses/primus_vk /usr/share/licenses/lib32-primus/LICENSE /usr/share/licenses/lib32-primus_vk/LICENSE /usr/share/licenses/primus/LICENSE /usr/share/licenses/primus_vk/LICENSE /usr/share/man/man1/primusrun.1.gz /usr/share/vulkan/implicit_layer.d/primus_vk.json

felixdoerre commented 3 years ago

When using gdb you first need to type run to launch the application, then wait for the segfault, and when it happens, the application will not crash but hang. Now switch back to gdb, which should show a prompt now, and type bt.

Regarding the sources of the primus package: No, these are files installed on your system by the primus package. What I wanted to know is where I can find information on how the primus package is built for your distribution (so, what source code variant goes in it? Are there special tweaks by the packager, ...). Does manjaro have all packages contained in archlinux or it it a totally separate package repository? E.g. for archlinux I can find the sources for the primus package here: https://github.com/archlinux/svntogit-community/tree/packages/primus/trunk these show me, that for archlinux there is a "register_cleanup"-hook inserted and additionally, a __GLVND_DISALLOW_PATCHING=1 is inserted into primusrun. I would like to know those "maintainer patches" for the manjaro package.

zimudec commented 3 years ago

When using gdb you first need to type run to launch the application, then wait for the segfault, and when it happens, the application will not crash but hang. Now switch back to gdb, which should show a prompt now, and type bt.

I ran run using that command, but on the screen I got the error "Failed to load steamui.so". Apparently that error is triggered when using STEAM_RUNTIME = 1. However, if I wait a while, the game runs anyway, and shows the segfault error. So I press the button to make the error disappear, I go to the terminal, and it is not stopped. I type bt and it returns No Stack.

I tried the same procedure with STEAM_RUNTIME = 0, the game starts faster and does not give steamui.so error, but bt returns No Stack as well.

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=1 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1c74530: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1c74530.
PrimusVK: 0x1ac1e10.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./signalwrapper...
(No debugging symbols found in ./signalwrapper)
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/signalwrapper /home/zimudec/.local/share/Steam/steamapps/common/Rise\ of\ the\ Tomb\ Raider/bin/RiseOfTheTombRaider
[Detaching after fork from child process 6180]
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[Inferior 1 (process 6176) exited with code 013]
(gdb) RiseOfTheTombRaider: dumped to "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes/4372db18-83c7-6b87-471737d3-5971ed5f.dmp"
RiseOfTheTombRaider: crash reporter "/home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/feral_linux_crash_reporter" launching
Game crashed with signal 11
Game crashed with signal SIGSEGV(11): Segmentation fault.

You may be able to relaunch the game to send the crash log automatically.
You can also contact support@feralinteractive.com directly with details of the crash, Steam System Info, and the dump file:
/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes/4372db18-83c7-6b87-471737d3-5971ed5f.dmp
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
bt
No stack.
(gdb) bt
No stack.
(gdb) 
zimudec commented 3 years ago

Regarding the sources of the primus package: No, these are files installed on your system by the primus package. What I wanted to know is where I can find information on how the primus package is built for your distribution (so, what source code variant goes in it? Are there special tweaks by the packager, ...). Does manjaro have all packages contained in archlinux or it it a totally separate package repository? E.g. for archlinux I can find the sources for the primus package here: https://github.com/archlinux/svntogit-community/tree/packages/primus/trunk these show me, that for archlinux there is a "register_cleanup"-hook inserted and additionally, a __GLVND_DISALLOW_PATCHING=1 is inserted into primusrun. I would like to know those "maintainer patches" for the manjaro package.

Maybe you mean this?

https://www.archlinux.org/packages/community/x86_64/primus/ https://github.com/amonakov/primus

felixdoerre commented 3 years ago

Thanks for the gdb output, ok I think we need to remove the signalwrapper and start gdb directly on the game. The relevant section of the launch script:

# Use the signalwrapper if it exists
if [ -e "signalwrapper" ]; then
        GAME_SIGNAL_WRAPPER="./signalwrapper"
fi

# Launch the game with all the arguments
${GAME_LAUNCH_PREFIX} ${GAME_SIGNAL_WRAPPER} "${GAMEROOT}/bin/${FERAL_GAME_NAME}" "$@"
RESULT=$?

So just moving the signalwrapper out of the way (e.g. by renaming it to signalwrapper.disabled), should remove it from the execution. So could you try moving the signal wrapper away, and then again the gdb command?

Regarding the 2 source links: The lower link is the "original" source repository. I already know that. I wanted to know, if there are manjaro-specific adjustments. The upper link shows me the archlinux package. That's where I got this svntogit-link from. Are you sure that this is also the source for manjaro? Does manjaro just take all packages from archlinux without modification, when there is not specific manjaro source?

zimudec commented 3 years ago

I managed to run the procedure and got the trace. I don't know what the cause is:

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1c78240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1c78240.
PrimusVK: 0x1c5e340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 3217)]
[New Thread 0x7fff27b9c640 (LWP 3218)]
[New Thread 0x7fff2f54e640 (LWP 3219)]
[New Thread 0x7fff2ed4d640 (LWP 3220)]
[New Thread 0x7fff2e54c640 (LWP 3221)]
[New Thread 0x7fff2c893640 (LWP 3238)]
[New Thread 0x7fff2739b640 (LWP 3239)]
[New Thread 0x7fff26b9a640 (LWP 3240)]
[New Thread 0x7fff26399640 (LWP 3241)]
[New Thread 0x7fff25714640 (LWP 3242)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 3243]
[New Thread 0x7fff25058640 (LWP 3244)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 3245]
[Thread 0x7fff25058640 (LWP 3244) exited]
[New Thread 0x7fff25058640 (LWP 3443)]
[New Thread 0x7fff24857640 (LWP 3444)]
[Thread 0x7fff24857640 (LWP 3444) exited]
[New Thread 0x7fff24857640 (LWP 3445)]
[New Thread 0x7ffef6304640 (LWP 3446)]
[New Thread 0x7ffef5b03640 (LWP 3447)]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffedfa0a640 (LWP 3448)]
[New Thread 0x7ffedf209640 (LWP 3449)]
[New Thread 0x7ffedea08640 (LWP 3450)]
[New Thread 0x7ffede207640 (LWP 3451)]
--Type <RET> for more, q to quit, c to continue without paging--RET

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff256ce19b in  () at /usr/lib/libVkLayer_MESA_device_select.so
#2  0x00007fff256cf5cf in  () at /usr/lib/libVkLayer_MESA_device_select.so
#3  0x00007ffef50d62e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007ffef50cce55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007ffef59d3c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007ffef59d7ace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
--Type <RET> for more, q to quit, c to continue without paging--RET
#21 0x00007fffffffe108 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe3e1 in  ()
#25 0x0000000000000000 in  ()
(gdb)
zimudec commented 3 years ago

Regarding the 2 source links: The lower link is the "original" source repository. I already know that. I wanted to know, if there are manjaro-specific adjustments. The upper link shows me the archlinux package. That's where I got this svntogit-link from. Are you sure that this is also the source for manjaro? Does manjaro just take all packages from archlinux without modification, when there is not specific manjaro source?

I get it. The packages from the pacman repositories are, I understand, compiled only. I only know about the aur repository from non-compiled sources.

I also do not know if before being compiled and uploaded to the pacman repository, they are given special treatment.

felixdoerre commented 3 years ago

In the stack trace the source line numbers are missing, even for primus_vk. Could you compile primus-vk with debug symbols (and tell me the commit you are using), so we can see the line numbers of the two primus frames? Activating debug symbols is done with the -g or -g3 option, which is currently set by default in the Makefile. Some distributions strip the debug symbols when installing, so you would need to copy libprimus_vk.so.1 manually. (For further debugging, debug symbols for the mesa layer would be nice, too but I have no idea on how you would obtain them on manjaro or arch)

Even without line numbers, we can already see that the crash itself happens in the in the VkLayer_MESA_device_select-layer. I've never seen a crash there. You can try to disable the layer by setting the environment variable NODEVICE_SELECT=1. Could you try this and provide a new backtrace where the device_select layer is disabled.

zimudec commented 3 years ago

In the stack trace the source line numbers are missing, even for primus_vk. Could you compile primus-vk with debug symbols (and tell me the commit you are using), so we can see the line numbers of the two primus frames? Activating debug symbols is done with the -g or -g3 option, which is currently set by default in the Makefile. Some distributions strip the debug symbols when installing, so you would need to copy libprimus_vk.so.1 manually. (For further debugging, debug symbols for the mesa layer would be nice, too but I have no idea on how you would obtain them on manjaro or arch)

Even without line numbers, we can already see that the crash itself happens in the in the VkLayer_MESA_device_select-layer. I've never seen a crash there. You can try to disable the layer by setting the environment variable NODEVICE_SELECT=1. Could you try this and provide a new backtrace where the device_select layer is disabled.

Regarding the first paragraph, I am very lost.

Regarding the second paragraph, I ran the same command above, prepending NODEVICE_SELECT=1, and the launcher started!

I added NODEVICE_SELECT=1 %command% to the launch parameters of rise of tomb raider, effectively the launcher starts, the game starts, I was able to resume my game without problems and it works correctly.

Questions:

felixdoerre commented 3 years ago

How did you know that this variable exists and that it could be the solution?

I've seen in the backtrace that there is a vulkan layer named VkLayer_MESA_device_select, which causes the crash. Layers are typically optional, so why not try to disable it. Such layers are registered under /usr/share/vulkan/implicit_layer.d. I have a similar-recent mesa driver installed, so I looked on my system in the config registering such layer, because for those layers, there always needs to be an environment variable registered to disable them. In /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json I found:

    "disable_environment": {
      "NODEVICE_SELECT": "1"
    }

This is a feasible temporary solution?

Yes, I believe it is. As far as I know, this layer is intended to allow a user to sort a specific graphic device to the front to suggest to an application application to use it. With primus_vk you don't need this, as primus_vk only exposes on graphics device, the "hybrid"-graphics device, to the application. Primus_vk itself needs to see both the internal and the dedicated device, so having VkLayer_MESA_device_select below primus-vk (where is currently shows in the backtrace) isn't really useful at all. Even if you had multiple dedicated graphics cards and wanted to choose one from those, primus_vk let's you pass (via an environment variable) which one to use, and you don't need the mesa layer in any case.

Do you have to correct something at the root?

Yes, we should understand why the mesa layer crashes what the assumptions there are, why they are wrong and report a bug to mesa, if we are sill certain that this is a mesa bug. But for that we need the debug symbols. Without line numbers this back trace doesn't help us much further. I'll try to help you as much as I can being unfamiliar with arch. I found this wiki article which seems to fit what we want to do: https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces (Currently: getting debug symbols for the package where libVkLayer_MESA_device_select.so is contained in, so probably mesa). I can't seem to find mesa sources for manjaro, so I guess this is our best shot: https://github.com/archlinux/svntogit-packages/blob/packages/mesa/trunk/PKGBUILD So I guess, you should download the PKGBUILD-file, and add somewhere at the top options=(debug !strip) and then run makepkg and install the package. I hope that helps (and is correct :-) )

Judging from the backtrace alone, we could be somewhere in this function: https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/vulkan/device-select-layer/device_select_layer.c#L357 when something is null that is not expected, but without debug symbols, I am lost what that could be.

Should we report this problem to feral?

Right now, I don't think that this is a problem caused by the game and the game only has legitimate usage of the Vulkan API. If understanding why VkLayer_MESA_device_select leads to the result, that the game mis-uses the Vulkan API that would be a cause for a bug to feral. But right now I don't have an indication.

zimudec commented 3 years ago

Yes, we should understand why the mesa layer crashes what the assumptions there are, why they are wrong and report a bug to mesa, if we are sill certain that this is a mesa bug. But for that we need the debug symbols. Without line numbers this back trace doesn't help us much further. I'll try to help you as much as I can being unfamiliar with arch. I found this wiki article which seems to fit what we want to do: https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces (Currently: getting debug symbols for the package where libVkLayer_MESA_device_select.so is contained in, so probably mesa). I can't seem to find mesa sources for manjaro, so I guess this is our best shot: https://github.com/archlinux/svntogit-packages/blob/packages/mesa/trunk/PKGBUILD So I guess, you should download the PKGBUILD-file, and add somewhere at the top options=(debug !strip) and then run makepkg and install the package. I hope that helps (and is correct :-) )

Judging from the backtrace alone, we could be somewhere in this function: https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/vulkan/device-select-layer/device_select_layer.c#L357 when something is null that is not expected, but without debug symbols, I am lost what that could be.

Sorry, I hadn't had time to review.

The truth is I am familiar with Linux, but not so advanced. I missed a lot at this point, especially on a conceptual level.

I'm going to test the package creation first, with the instructions given. Once the creation works, I will have to install it with pacman, right? as if it were a downloaded package ready to install?

If I install and something fails to boot, I assume that from terminal with F2 I could restore the package by installing the one I had previously, right?

I have not yet updated to the latest version of manjaro, therefore, not the latest version of table either. Will it cause problems if this version is more current than the one installed? as a test?

felixdoerre commented 3 years ago

Once the creation works, I will have to install it with pacman, right? as if it were a downloaded package ready to install?

Yes, you install the package exactly the same way you would install a manually downloaded one. Essentially, the packages that you download have most likely been created the same way using makepkg.

If I install and something fails to boot, I assume that from terminal with F2 I could restore the package by installing the one I had previously, right?

Yes, I doubt that changing something in mesa can prevent the system from booting completely (and thereby preventing access to the ttys). If the GUI fails, the ttys are the easiest way to restore your system. You can use pacman to downgrade the package again. If you currently don't use the latest mesa package this might require obtaining the older version of the package, which you might use currently, manually. Archlinux makes snapshots of the whole package database, which you can use to find, download and install the exact version of mesa which you currently have, again: https://wiki.archlinux.org/index.php/Arch_Linux_Archive#How_to_downgrade_one_package

I'd suggest you download the mesa package that is currently installed from here: https://archive.archlinux.org/packages/m/mesa/ (or copy it out of the cache under /var/cache/pacman/pkg/) in advance, to make sure you can easily install the original package when needed.

I have not yet updated to the latest version of manjaro, therefore, not the latest version of table either. Will it cause problems if this version is more current than the one installed? as a test?

Probably not, upgrading mesa usually works very smoothly. However we want to reproduce the error that occurred with that version of mesa that is currently installed on your system, so it would be best if you would build exactly the version that is currently installed. I'd recommend that you go through the history (https://github.com/archlinux/svntogit-packages/commits/packages/mesa/trunk/PKGBUILD) and look for the exact mesa version that you are currently using and try to build debug symbols for that version.

zimudec commented 3 years ago

I tried compiling the version that I currently have installed:

https://github.com/archlinux/svntogit-packages/blob/ab00fbfa9effe2853a4aea750911bdb5fded9ec5/trunk/PKGBUILD

I installed all packages and added the LICENSE file that the makefile required me to compile the package, but it threw the following error:

==> Checking dependencies while running ...
==> Checking dependencies while compiling ...
==> Receiving the sources ...
   -> mesa-20.1.7.tar.xz has been found
   -> mesa-20.1.7.tar.xz.sig has been found
   -> LICENSE has been found
==> Validating source files with sha512sums ...
     mesa-20.1.7.tar.xz ... Approved
     mesa-20.1.7.tar.xz.sig ... Skipped
     LICENSE ... Approved
==> Verifying font signatures with gpg ...
     mesa-20.1.7.tar.xz ... FAILED (unknown public key 8D8E31AFC32428A6)
felixdoerre commented 3 years ago

I've never built packages for archlinux myself, but I'd guess you would need to download the corresponding gpg key to be able to verify the signatures on the source archive, using e.g. gpg --recv-keys 57551DE15B968F6341C248F68D8E31AFC32428A6. Could you try that?

zimudec commented 3 years ago

I've never built packages for archlinux myself, but I'd guess you would need to download the corresponding gpg key to be able to verify the signatures on the source archive, using e.g. gpg --recv-keys 57551DE15B968F6341C248F68D8E31AFC32428A6. Could you try that?

I had to specify a key server to be able to import it. It already started compiling, but delay.

Once it's done, I remove it with gpg -d C32428A6?

Once the modified package is installed with debug on, how should I proceed?

felixdoerre commented 3 years ago

Once it's done, I remove it with gpg -d C32428A6?

In my gpg, -d is used for decrypting. To remove the key, you can use gpg --delete-key C32428A6, however I wouldn't bother.

Once the modified package is installed with debug on, how should I proceed?

Do the same, as you did in https://github.com/felixdoerre/primus_vk/issues/77#issuecomment-705284145 This should allow us to see more details in the backtrace-lines for libVkLayer_MESA_device_select. (lines 1 and 2) Concretely we should get line numbers, and then look up in the source code of mesa to understand which function pointer exactly is null.

If you want, you can also try to interactively explore the state when the crash happens. From the backtrace we see, that the mesa layer wants to call a function which is null. We need to understand what function this is, where it comes from, why it is null, if it should be null. Otherwise, I will provide more concrete instructions when you have the line number where the crash happens.

zimudec commented 3 years ago

In my gpg, -d is used for decrypting. To remove the key, you can use gpg --delete-key C32428A6, however I wouldn't bother.

I get it. I removed it like this and it worked, thanks. I prefer to remove it so that in the future it is not a possible problem.

Do the same, as you did in #77 (comment) This should allow us to see more details in the backtrace-lines for libVkLayer_MESA_device_select. (lines 1 and 2) Concretely we should get line numbers, and then look up in the source code of mesa to understand which function pointer exactly is null.

If you want, you can also try to interactively explore the state when the crash happens. From the backtrace we see, that the mesa layer wants to call a function which is null. We need to understand what function this is, where it comes from, why it is null, if it should be null. Otherwise, I will provide more concrete instructions when you have the line number where the crash happens.

The compilation generated 7 packages for me. Which one or which should I install for this case?

mesa-20.1.7-1-x86_64.pkg.tar.xz
mesa-vdpau-20.1.7-1-x86_64.pkg.tar.xz
libva-mesa-driver-20.1.7-1-x86_64.pkg.tar.xz
vulkan-radeon-20.1.7-1-x86_64.pkg.tar.xz
vulkan-intel-20.1.7-1-x86_64.pkg.tar.xz
opencl-mesa-20.1.7-1-x86_64.pkg.tar.xz
vulkan-mesa-layers-20.1.7-1-x86_64.pkg.tar.xz
felixdoerre commented 3 years ago

You can find out the package containing /usr/lib/libVkLayer_MESA_device_select.so with pacman -Qo /usr/lib/libVkLayer_MESA_device_select.so. Then just install the packages reported by pacman. From the package names I'd guess vulkan-mesa-layers, but who knows....

zimudec commented 3 years ago

Well, I installed the package (it asked me to reinstall and I answered yes), I restarted the computer just in case, I ran the command with the same procedure and it gave me this result. The result is different from the previous one:

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1b13240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1b13240.
PrimusVK: 0x1af9340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 1487)]
[New Thread 0x7fff27fff640 (LWP 1488)]
[New Thread 0x7fff2f54e640 (LWP 1489)]
[New Thread 0x7fff2ed4d640 (LWP 1490)]
[New Thread 0x7fff2e54c640 (LWP 1491)]
[New Thread 0x7fff2c893640 (LWP 1508)]
[New Thread 0x7fff277fe640 (LWP 1509)]
[New Thread 0x7fff26ffd640 (LWP 1510)]
[New Thread 0x7fff267fc640 (LWP 1511)]
[New Thread 0x7fff2573a640 (LWP 1512)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 1513]
[New Thread 0x7fff2506f640 (LWP 1514)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 1515]
[Thread 0x7fff2506f640 (LWP 1514) exited]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff2486e640 (LWP 1709)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7fff2506f640 (LWP 1745)]
[New Thread 0x7ffee7fff640 (LWP 1746)]
[Thread 0x7ffee7fff640 (LWP 1746) exited]
[New Thread 0x7ffee7fff640 (LWP 1747)]
[New Thread 0x7ffee77fe640 (LWP 1748)]
[New Thread 0x7fff24477640 (LWP 1749)]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee579f640 (LWP 1757)]
[New Thread 0x7ffee4f9e640 (LWP 1762)]
[New Thread 0x7ffecbfff640 (LWP 1763)]
[New Thread 0x7ffecb7fe640 (LWP 1764)]
--Type <RET> for more, q to quit, c to continue without paging--RET

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff244ce19b in fill_drm_device_info
    (info=info@entry=0x752c8b0, drm_device=drm_device@entry=0x729f270, device=<optimized out>)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#2  0x00007fff244cf5cf in get_default_device
    (pPhysicalDevices=0x705a010, physical_device_count=2, selection=0x0, info=0x752c8b0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#3  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#4  0x00007fff244c12e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff244b7e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#6  0x00007fff24347c69 in  () at /usr/lib/libvulkan.so.1
#7  0x00007fff2434bace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#8  0x0000000001a1da9b in  ()
#9  0x0000000001a1f985 in  ()
#10 0x00000000019b30c7 in  ()
#11 0x00000000019b3868 in  ()
--Type <RET> for more, q to quit, c to continue without paging--RET
#12 0x00000000018f9844 in  ()
#13 0x00000000018f9c48 in  ()
#14 0x000000000047ef62 in  ()
#15 0x00000000004935f1 in  ()
#16 0x00000000004939ad in  ()
#17 0x00000000004aad61 in  ()
#18 0x00000000004aa281 in  ()
#19 0x000000000041d939 in  ()
#20 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#21 0x000000000046c3a1 in  ()
#22 0x00007fffffffe108 in  ()
#23 0x000000000000001c in  ()
#24 0x0000000000000001 in  ()
#25 0x00007fffffffe3e1 in  ()
#26 0x0000000000000000 in  ()
(gdb)
felixdoerre commented 3 years ago

Yay, line numbers! However the affected locations look really strange. According to the stack trace, this is the function that calls a null-function: https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c#L249 So this looks like info->GetPhysicalDeviceProperties2KHR is null, which should not be possible, as the surrounding if checks exactly that. Could you set a breakpoint at device_select_layer.c:L249 and check the contents of info. So after running gdb:

b device_select_layer.c:L249
y ( as confirmation to set a breakpoint on a library loaded in the future)
run
bt ( just to check that we got the same segfault)
p info
zimudec commented 3 years ago

Yay, line numbers! However the affected locations look really strange. According to the stack trace, this is the function that calls a null-function: https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c#L249 So this looks like info->GetPhysicalDeviceProperties2KHR is null, which should not be possible, as the surrounding if checks exactly that. Could you set a breakpoint at device_select_layer.c:L249 and check the contents of info. So after running gdb:

b device_select_layer.c:L249
y ( as confirmation to set a breakpoint on a library loaded in the future)
run
bt ( just to check that we got the same segfault)
p info
[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x8a2240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x8a2240.
PrimusVK: 0x888340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:L249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:L249) pending.
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 3730)]
[New Thread 0x7fff27b9c640 (LWP 3731)]
[New Thread 0x7fff2f54e640 (LWP 3732)]
[New Thread 0x7fff2ed4d640 (LWP 3733)]
[New Thread 0x7fff2e54c640 (LWP 3734)]
[New Thread 0x7fff2c893640 (LWP 3751)]
[New Thread 0x7fff2739b640 (LWP 3752)]
[New Thread 0x7fff26b9a640 (LWP 3753)]
[New Thread 0x7fff26399640 (LWP 3754)]
[New Thread 0x7fff25714640 (LWP 3755)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 3756]
[New Thread 0x7fff25058640 (LWP 3757)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 3758]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 3964)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7ffee7fff640 (LWP 3965)]
[New Thread 0x7ffee77fe640 (LWP 3967)]
[Thread 0x7ffee77fe640 (LWP 3967) exited]
[New Thread 0x7ffee77fe640 (LWP 3968)]
[New Thread 0x7ffee6ffd640 (LWP 3977)]
[New Thread 0x7fff24469640 (LWP 3978)]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee4f9e640 (LWP 4045)]
[New Thread 0x7ffed3fff640 (LWP 4046)]
[New Thread 0x7ffed37fe640 (LWP 4047)]
[New Thread 0x7ffed2ffd640 (LWP 4048)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff256ce19b in fill_drm_device_info
    (info=info@entry=0x724f6f0, drm_device=drm_device@entry=0x73ef010, device=<optimized out>)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#2  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x710a190, physical_device_count=2, selection=0x0, info=0x724f6f0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#3  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#4  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#6  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#7  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#8  0x0000000001a1da9b in  ()
#9  0x0000000001a1f985 in  ()
#10 0x00000000019b30c7 in  ()
#11 0x00000000019b3868 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9844 in  ()
#13 0x00000000018f9c48 in  ()
#14 0x000000000047ef62 in  ()
#15 0x00000000004935f1 in  ()
#16 0x00000000004939ad in  ()
#17 0x00000000004aad61 in  ()
#18 0x00000000004aa281 in  ()
#19 0x000000000041d939 in  ()
#20 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#21 0x000000000046c3a1 in  ()
#22 0x00007fffffffe108 in  ()
#23 0x000000000000001c in  ()
#24 0x0000000000000001 in  ()
#25 0x00007fffffffe3e1 in  ()
#26 0x0000000000000000 in  ()
(gdb) p info
No symbol "info" in current context.
(gdb)
felixdoerre commented 3 years ago

... I had a typo in the instructions, there wrongly was a L before the line number, please try this:

b device_select_layer.c:249
y ( as confirmation to set a breakpoint on a library loaded in the future)
run
bt ( just to check that we got the same segfault)
p info
zimudec commented 3 years ago

... I had a typo in the instructions, there wrongly was a L before the line number, please try this:

b device_select_layer.c:249
y ( as confirmation to set a breakpoint on a library loaded in the future)
run
bt ( just to check that we got the same segfault)
p info

Can't find a file!

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1902240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1902240.
PrimusVK: 0x18e8340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:249) pending.
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 5316)]
[New Thread 0x7fff27b9c640 (LWP 5317)]
[New Thread 0x7fff2f54e640 (LWP 5318)]
[New Thread 0x7fff2ed4d640 (LWP 5319)]
[New Thread 0x7fff2e54c640 (LWP 5320)]
[New Thread 0x7fff2c893640 (LWP 5337)]
[New Thread 0x7fff2739b640 (LWP 5338)]
[New Thread 0x7fff26b9a640 (LWP 5339)]
[New Thread 0x7fff26399640 (LWP 5340)]
[New Thread 0x7fff25714640 (LWP 5341)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 5342]
[New Thread 0x7fff25058640 (LWP 5343)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 5344]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 5535)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7ffee7fff640 (LWP 5536)]
[New Thread 0x7ffee77fe640 (LWP 5537)]
[New Thread 0x7ffee6ffd640 (LWP 5539)]
[New Thread 0x7ffee67fc640 (LWP 5544)]
[New Thread 0x7fff24469640 (LWP 5545)]
[New Thread 0x7ffee5ffb640 (LWP 5546)]
[Thread 0x7ffee77fe640 (LWP 5537) exited]
[Thread 0x7ffee5ffb640 (LWP 5546) exited]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee5ffb640 (LWP 5582)]
[New Thread 0x7ffee77fe640 (LWP 5583)]
[New Thread 0x7ffee4f86640 (LWP 5584)]
[New Thread 0x7ffecb015640 (LWP 5585)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" hit Breakpoint 1, fill_drm_device_info (
    info=info@entry=0x74dea90, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x7336b30, device=0x7325fc0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
249 ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: The file or directory does not exist.
(gdb) bt
#0  fill_drm_device_info
    (info=info@entry=0x74dea90, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x7336b30, device=0x7325fc0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#1  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x6e650b0, physical_device_count=2, selection=0x0, info=0x74dea90)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#2  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#3  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
#21 0x00007fffffffe108 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe3e1 in  ()
#25 0x0000000000000000 in  ()
(gdb) p info
$1 = (const struct instance_info *) 0x74dea90
(gdb)
felixdoerre commented 3 years ago

... I would have needed p *info... Remote gdb is hard...

The ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: The file or directory does not exist. is not that bad. You could configure gdb to find your mesa sources, so it would show you inline which line you are currently stepping through, however we do not require that. I will have to look up the corresponding lines in the source code anyways.

zimudec commented 3 years ago

... I would have needed p *info... Remote gdb is hard...

The ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: The file or directory does not exist. is not that bad. You could configure gdb to find your mesa sources, so it would show you inline which line you are currently stepping through, however we do not require that. I will have to look up the corresponding lines in the source code anyways.

Do you have the source code for that file?

So is it correct?:

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0xe60240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0xe60240.
PrimusVK: 0xe46340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:249) pending.
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 9208)]
[New Thread 0x7fff27b9c640 (LWP 9209)]
[New Thread 0x7fff2f54e640 (LWP 9210)]
[New Thread 0x7fff2ed4d640 (LWP 9211)]
[New Thread 0x7fff2e54c640 (LWP 9212)]
[New Thread 0x7fff2c893640 (LWP 9229)]
[New Thread 0x7fff2739b640 (LWP 9230)]
[New Thread 0x7fff26b9a640 (LWP 9231)]
[New Thread 0x7fff26399640 (LWP 9232)]
[New Thread 0x7fff25714640 (LWP 9233)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 9234]
[New Thread 0x7fff25058640 (LWP 9235)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 9236]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 9431)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7ffee7fff640 (LWP 9432)]
[New Thread 0x7ffee77fe640 (LWP 9433)]
[New Thread 0x7ffee6ffd640 (LWP 9434)]
[New Thread 0x7fff24469640 (LWP 9435)]
[New Thread 0x7ffee67fc640 (LWP 9436)]
[New Thread 0x7ffee5ffb640 (LWP 9437)]
[Thread 0x7ffee77fe640 (LWP 9433) exited]
[Thread 0x7ffee67fc640 (LWP 9436) exited]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee67fc640 (LWP 9458)]
[New Thread 0x7ffee77fe640 (LWP 9459)]
[New Thread 0x7ffee4f86640 (LWP 9460)]
[New Thread 0x7ffecb015640 (LWP 9461)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" hit Breakpoint 1, fill_drm_device_info (
    info=info@entry=0x755ab40, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x73d6870, device=0x754ace0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
249 ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: No existe el fichero o el directorio.
(gdb) bt
#0  fill_drm_device_info
    (info=info@entry=0x755ab40, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x73d6870, device=0x754ace0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#1  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x75460c0, physical_device_count=2, selection=0x0, info=0x755ab40)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#2  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#3  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
#21 0x00007fffffffe108 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe3e1 in  ()
#25 0x0000000000000000 in  ()
(gdb) p *info
$1 = {DestroyInstance = 0x7fff244c4ea0 <vkDestroyInstance>, 
  EnumeratePhysicalDevices = 0x7fff2433bb50, 
  EnumeratePhysicalDeviceGroups = 0x7fff2433c960, 
  GetInstanceProcAddr = 0x7fff244c6530 <vkGetInstanceProcAddr>, 
  GetPhysicalDeviceProcAddr = 0x7fff24339390, 
  EnumerateDeviceExtensionProperties = 0x7fff24334360, 
  GetPhysicalDeviceProperties = 0x7fff243200f0, 
  GetPhysicalDeviceProperties2KHR = 0x7fff24321c30, has_props2 = true, 
  has_pci_bus = true, has_wayland = false, has_xcb = true}
(gdb)
felixdoerre commented 3 years ago

Ok... so info->GetPhysicalDeviceProperties2KHR is not null, the first time the breakpoint hits. Could you, after these steps, execute the gdb command continue to see if we hit the segfault directly afterwards? If the program continues, just repeat the bt, p *info, continue until it hits the segfault. We need to see, how the situation looks directly before the segfault.

zimudec commented 3 years ago

Ok... so info->GetPhysicalDeviceProperties2KHR is not null, the first time the breakpoint hits. Could you, after these steps, execute the gdb command continue to see if we hit the segfault directly afterwards? If the program continues, just repeat the bt, p *info, continue until it hits the segfault. We need to see, how the situation looks directly before the segfault.

I did the above, but after continue and bt, executing p * info returns No symbol "info" in current context.:

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1cbb240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1cbb240.
PrimusVK: 0x1ca05a0.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:249) pending.
(gdb) run
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 4534)]
[New Thread 0x7fff27b9c640 (LWP 4535)]
[New Thread 0x7fff2f54e640 (LWP 4536)]
[New Thread 0x7fff2ed4d640 (LWP 4537)]
[New Thread 0x7fff2e54c640 (LWP 4538)]
[New Thread 0x7fff2c893640 (LWP 4555)]
[New Thread 0x7fff2739b640 (LWP 4556)]
[New Thread 0x7fff26b9a640 (LWP 4557)]
[New Thread 0x7fff26399640 (LWP 4558)]
[New Thread 0x7fff25714640 (LWP 4559)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 4560]
[New Thread 0x7fff25058640 (LWP 4561)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 4562]
[Thread 0x7fff25058640 (LWP 4561) exited]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 4756)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7fff25058640 (LWP 4757)]
[New Thread 0x7ffee7fff640 (LWP 4758)]
[Thread 0x7ffee7fff640 (LWP 4758) exited]
[New Thread 0x7ffee7fff640 (LWP 4759)]
[New Thread 0x7ffee77fe640 (LWP 4760)]
[New Thread 0x7fff24469640 (LWP 4761)]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee579f640 (LWP 4788)]
[New Thread 0x7ffee4f9e640 (LWP 4789)]
[New Thread 0x7ffecbfff640 (LWP 4790)]
[New Thread 0x7ffecb7fe640 (LWP 4791)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" hit Breakpoint 1, fill_drm_device_info (
    info=info@entry=0x7309b40, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x72e1070, device=0x73855b0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
249 ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: No existe el fichero o el directorio.
(gdb) bt
#0  fill_drm_device_info
    (info=info@entry=0x7309b40, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x72e1070, device=0x73855b0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#1  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x7091140, physical_device_count=2, selection=0x0, info=0x7309b40)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#2  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#3  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
#21 0x00007fffffffe108 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe3e1 in  ()
#25 0x0000000000000000 in  ()
(gdb) p *info
$1 = {DestroyInstance = 0x7fff244c4ea0 <vkDestroyInstance>, 
  EnumeratePhysicalDevices = 0x7fff2433bb50, 
  EnumeratePhysicalDeviceGroups = 0x7fff2433c960, 
  GetInstanceProcAddr = 0x7fff244c6530 <vkGetInstanceProcAddr>, 
  GetPhysicalDeviceProcAddr = 0x7fff24339390, 
  EnumerateDeviceExtensionProperties = 0x7fff24334360, 
  GetPhysicalDeviceProperties = 0x7fff243200f0, 
  GetPhysicalDeviceProperties2KHR = 0x7fff24321c30, has_props2 = true, 
  has_pci_bus = true, has_wayland = false, has_xcb = true}
(gdb) continue
Continuing.

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff256ce19b in fill_drm_device_info
    (info=info@entry=0x7309b40, drm_device=drm_device@entry=0x72e1070, device=<optimized out>)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#2  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x7091140, physical_device_count=2, selection=0x0, info=0x7309b40)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#3  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#4  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#6  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#7  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#8  0x0000000001a1da9b in  ()
#9  0x0000000001a1f985 in  ()
#10 0x00000000019b30c7 in  ()
#11 0x00000000019b3868 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9844 in  ()
#13 0x00000000018f9c48 in  ()
#14 0x000000000047ef62 in  ()
#15 0x00000000004935f1 in  ()
#16 0x00000000004939ad in  ()
#17 0x00000000004aad61 in  ()
#18 0x00000000004aa281 in  ()
#19 0x000000000041d939 in  ()
#20 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#21 0x000000000046c3a1 in  ()
#22 0x00007fffffffe108 in  ()
#23 0x000000000000001c in  ()
#24 0x0000000000000001 in  ()
#25 0x00007fffffffe3e1 in  ()
#26 0x0000000000000000 in  ()
(gdb) p *info
No symbol "info" in current context.
(gdb) continue
Continuing.

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff256ce19b in fill_drm_device_info
    (info=info@entry=0x7309b40, drm_device=drm_device@entry=0x72e1070, device=<optimized out>)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#2  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x7091140, physical_device_count=2, selection=0x0, info=0x7309b40)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#3  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#4  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#6  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#7  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#8  0x0000000001a1da9b in  ()
#9  0x0000000001a1f985 in  ()
#10 0x00000000019b30c7 in  ()
#11 0x00000000019b3868 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9844 in  ()
#13 0x00000000018f9c48 in  ()
#14 0x000000000047ef62 in  ()
#15 0x00000000004935f1 in  ()
#16 0x00000000004939ad in  ()
#17 0x00000000004aad61 in  ()
#18 0x00000000004aa281 in  ()
#19 0x000000000041d939 in  ()
#20 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#21 0x000000000046c3a1 in  ()
#22 0x00007fffffffe108 in  ()
#23 0x000000000000001c in  ()
#24 0x0000000000000001 in  ()
#25 0x00007fffffffe3e1 in  ()
#26 0x0000000000000000 in  ()
(gdb) p *info
No symbol "info" in current context.
(gdb) continue
Continuing.
[Thread 0x7ffee77fe640 (LWP 4760) exited]
RiseOfTheTombRaider: crash reporter failed

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) p *info
No symbol "info" in current context.
(gdb)
felixdoerre commented 3 years ago

Ok, we hit the segfault directly after we hit our breakpoint, but the function is not null. I still don't understand why we segfault probably, we need to look at the disassembly:

b device_select_layer.c:249
y
r
bt
disassemble
c

.... sorry that it take so many roundtrips, but debugging is sadly kind-of interactive...

zimudec commented 3 years ago

Ok, we hit the segfault directly after we hit our breakpoint, but the function is not null. I still don't understand why we segfault probably, we need to look at the disassembly:

b device_select_layer.c:249
y
r
bt
disassemble
c

.... sorry that it take so many roundtrips, but debugging is sadly kind-of interactive...

Don't worry, I understand perfectly. I still want to know the real cause of the problem instead of just looking for an alternative path.

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0xf54e10: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0xf54e10.
PrimusVK: 0xf55a40.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:249) pending.
(gdb) r
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 12992)]
[New Thread 0x7fff27b9c640 (LWP 12993)]
[New Thread 0x7fff2f54e640 (LWP 12994)]
[New Thread 0x7fff2ed4d640 (LWP 12995)]
[New Thread 0x7fff2e54c640 (LWP 12996)]
[New Thread 0x7fff2c893640 (LWP 13013)]
[New Thread 0x7fff2739b640 (LWP 13014)]
[New Thread 0x7fff26b9a640 (LWP 13015)]
[New Thread 0x7fff26399640 (LWP 13016)]
[New Thread 0x7fff25714640 (LWP 13017)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 13018]
[New Thread 0x7fff25058640 (LWP 13019)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 13020]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 13211)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7ffee7fff640 (LWP 13212)]
[New Thread 0x7ffee77fe640 (LWP 13213)]
[New Thread 0x7ffee6ffd640 (LWP 13214)]
[New Thread 0x7fff24469640 (LWP 13215)]
[New Thread 0x7ffee67fc640 (LWP 13216)]
[New Thread 0x7ffee5ffb640 (LWP 13217)]
[Thread 0x7ffee77fe640 (LWP 13213) exited]
[Thread 0x7ffee67fc640 (LWP 13216) exited]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee67fc640 (LWP 13265)]
[New Thread 0x7ffee77fe640 (LWP 13266)]
[New Thread 0x7ffee4f86640 (LWP 13267)]
[New Thread 0x7ffecb015640 (LWP 13268)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" hit Breakpoint 1, fill_drm_device_info (
    info=info@entry=0x73c0fe0, drm_device=0x7fffffffbb40, 
    drm_device@entry=0x72ff4d0, device=0x71e0330)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
249 ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: No existe el fichero o el directorio.
(gdb) bt
#0  fill_drm_device_info
    (info=info@entry=0x73c0fe0, drm_device=0x7fffffffbb40, 
    drm_device@entry=0x72ff4d0, device=0x71e0330)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#1  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x74ce720, physical_device_count=2, selection=0x0, info=0x73c0fe0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#2  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffbfcc, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#3  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
#21 0x00007fffffffdd68 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe0da in  ()
#25 0x0000000000000000 in  ()
(gdb) disassemble
Dump of assembler code for function fill_drm_device_info:
   0x00007fff256ce130 <+0>: push   %rbp
   0x00007fff256ce131 <+1>: mov    %rdi,%rbp
   0x00007fff256ce134 <+4>: pxor   %xmm0,%xmm0
   0x00007fff256ce138 <+8>: mov    $0x69,%ecx
   0x00007fff256ce13d <+13>:    push   %rbx
   0x00007fff256ce13e <+14>:    mov    %rsi,%rbx
   0x00007fff256ce141 <+17>:    mov    %rdx,%r8
   0x00007fff256ce144 <+20>:    sub    $0x378,%rsp
   0x00007fff256ce14b <+27>:    mov    %fs:0x28,%rax
   0x00007fff256ce154 <+36>:    mov    %rax,0x368(%rsp)
   0x00007fff256ce15c <+44>:    xor    %eax,%eax
   0x00007fff256ce15e <+46>:    lea    0x20(%rsp),%rsi
   0x00007fff256ce163 <+51>:    cmpb   $0x0,0x40(%rbp)
   0x00007fff256ce167 <+55>:    movups %xmm0,(%rsp)
   0x00007fff256ce16b <+59>:    mov    %rsi,%rdi
   0x00007fff256ce16e <+62>:    movl   $0x3b9e0620,(%rsp)
   0x00007fff256ce175 <+69>:    movups %xmm0,0x10(%rsp)
   0x00007fff256ce17a <+74>:    rep stos %rax,%es:(%rdi)
   0x00007fff256ce17d <+77>:    movl   $0x3b9bb079,0x20(%rsp)
   0x00007fff256ce185 <+85>:    je     0x7fff256ce18d <fill_drm_device_info+93>
   0x00007fff256ce187 <+87>:    cmpb   $0x0,0x41(%rbp)
   0x00007fff256ce18b <+91>:    jne    0x7fff256ce1f0 <fill_drm_device_info+192>--Type <RET> for more, q to quit, c to continue without paging--

   0x00007fff256ce18d <+93>:    mov    0x38(%rbp),%rax
   0x00007fff256ce191 <+97>:    test   %rax,%rax
   0x00007fff256ce194 <+100>:   je     0x7fff256ce201 <fill_drm_device_info+209>
=> 0x00007fff256ce196 <+102>:   mov    %r8,%rdi
   0x00007fff256ce199 <+105>:   callq  *%rax
   0x00007fff256ce19b <+107>:   mov    0x38(%rsp),%eax
   0x00007fff256ce19f <+111>:   cmpb   $0x0,0x41(%rbp)
   0x00007fff256ce1a3 <+115>:   mov    %ax,(%rbx)
   0x00007fff256ce1a6 <+118>:   mov    0x3c(%rsp),%eax
   0x00007fff256ce1aa <+122>:   mov    %ax,0x2(%rbx)
   0x00007fff256ce1ae <+126>:   je     0x7fff256ce1d1 <fill_drm_device_info+161>
   0x00007fff256ce1b0 <+128>:   mov    0x10(%rsp),%eax
   0x00007fff256ce1b4 <+132>:   movb   $0x1,0x10(%rbx)
   0x00007fff256ce1b8 <+136>:   mov    %ax,0xa(%rbx)
   0x00007fff256ce1bc <+140>:   mov    0x14(%rsp),%eax
   0x00007fff256ce1c0 <+144>:   mov    %al,0xc(%rbx)
   0x00007fff256ce1c3 <+147>:   mov    0x18(%rsp),%eax
   0x00007fff256ce1c7 <+151>:   mov    %al,0xd(%rbx)
   0x00007fff256ce1ca <+154>:   mov    0x1c(%rsp),%eax
   0x00007fff256ce1ce <+158>:   mov    %al,0xe(%rbx)
--Type <RET> for more, q to quit, c to continue without paging--
   0x00007fff256ce1d1 <+161>:   mov    0x368(%rsp),%rax
   0x00007fff256ce1d9 <+169>:   sub    %fs:0x28,%rax
   0x00007fff256ce1e2 <+178>:   jne    0x7fff256ce20e <fill_drm_device_info+222>
   0x00007fff256ce1e4 <+180>:   add    $0x378,%rsp
   0x00007fff256ce1eb <+187>:   pop    %rbx
   0x00007fff256ce1ec <+188>:   pop    %rbp
   0x00007fff256ce1ed <+189>:   retq   
   0x00007fff256ce1ee <+190>:   xchg   %ax,%ax
   0x00007fff256ce1f0 <+192>:   mov    %rsp,%rax
   0x00007fff256ce1f3 <+195>:   mov    %rax,0x28(%rsp)
   0x00007fff256ce1f8 <+200>:   mov    0x38(%rbp),%rax
   0x00007fff256ce1fc <+204>:   test   %rax,%rax
   0x00007fff256ce1ff <+207>:   jne    0x7fff256ce196 <fill_drm_device_info+102>
   0x00007fff256ce201 <+209>:   lea    0x30(%rsp),%rsi
   0x00007fff256ce206 <+214>:   mov    %r8,%rdi
   0x00007fff256ce209 <+217>:   callq  *0x30(%rbp)
   0x00007fff256ce20c <+220>:   jmp    0x7fff256ce19b <fill_drm_device_info+107>
   0x00007fff256ce20e <+222>:   callq  *0x4cd4(%rip)        # 0x7fff256d2ee8
End of assembler dump.
(gdb) c
Continuing.
[Thread 0x7fff25058640 (LWP 13019) exited]

Thread 1 "RiseOfTheTombRa" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb)
felixdoerre commented 3 years ago

... Thanks for the next round:

   0x00007fff256ce194 <+100>:   je     0x7fff256ce201 <fill_drm_device_info+209>
=> 0x00007fff256ce196 <+102>:   mov    %r8,%rdi
   0x00007fff256ce199 <+105>:   callq  *%rax
   0x00007fff256ce19b <+107>:   mov    0x38(%rsp),%eax

in this disassembly section I can see, that there doesn't happen anything suspicious. Judging from the address in the segfault-backtrace, which ends with 19b I'd say that the segfault happens directly in the function specified by %rax. I'd guess we need to look into that function next:

b device_select_layer.c:249
y
r
bt
x/50i info->GetPhysicalDeviceProperties2KHR

I believe that the function that is pointed to here is terminator_GetPhysicalDeviceProperties2: https://github.com/KhronosGroup/Vulkan-Loader/blob/921ca6d992fca347396ee153bf1820a9f3b8d478/loader/loader.c#L7959 so the debugsymbols for libvulkan1 would be nice ( https://github.com/archlinux/svntogit-packages/blob/packages/vulkan-icd-loader/trunk/PKGBUILD ), but I continue the instructions that can be completed without re-compiling libvulkan with debugsymbols: When I disassemble the corresponding this is what the start of the disassembly looks like:

> 0x00007ffff748aef0 <+0>:  push   %r12
   0x00007ffff748aef2 <+2>: push   %rbp
   0x00007ffff748aef3 <+3>: mov    %rsi,%rbp
   0x00007ffff748aef6 <+6>: push   %rbx
   0x00007ffff748aef7 <+7>: mov    0x8(%rdi),%r12
   0x00007ffff748aefb <+11>:    mov    %rdi,%rbx
   0x00007ffff748aefe <+14>:    mov    0x8(%r12),%rdi
   0x00007ffff748af03 <+19>:    test   %rdi,%rdi
   0x00007ffff748af06 <+22>:    je     0x7ffff748af30 <terminator_GetPhysicalDeviceProperties2+64>
   0x00007ffff748af08 <+24>:    testb  $0x1,0x3f78(%rdi)
   0x00007ffff748af0f <+31>:    je     0x7ffff748af30 <terminator_GetPhysicalDeviceProperties2+64>
   0x00007ffff748af11 <+33>:    mov    0x1b0(%r12),%rax
   0x00007ffff748af19 <+41>:    test   %rax,%rax
   0x00007ffff748af1c <+44>:    je     0x7ffff748af50 <terminator_GetPhysicalDeviceProperties2+96>
   0x00007ffff748af1e <+46>:    mov    0x18(%rbx),%rdi
   0x00007ffff748af22 <+50>:    mov    %rbp,%rsi
   0x00007ffff748af25 <+53>:    pop    %rbx
   0x00007ffff748af26 <+54>:    pop    %rbp
   0x00007ffff748af27 <+55>:    pop    %r12
   0x00007ffff748af29 <+57>:    jmpq   *%rax
   0x00007ffff748af2b <+59>:    nopl   0x0(%rax,%rax,1)

I believe the jump that we will take (which leads to the segfault) is the one at address 0x00007ffff748af29: So I would ask you to take the address that is shown in your disassembly (before the jmpq *%rax command ) and continue the gdb session with these commands (0x00007ffff748af29 replaced with the address shown in your disassembly):

b *0x00007ffff748af29
c
p/x $rax
x/50i $rax
i sh

This should allow us to determine, if the function is missing (in that case the nvidia driver might have misbehaved) or if there is a function where the segfault happens inside.

zimudec commented 3 years ago

Let's see if what I understood is correct:

[zimudec@zimudec Rise of the Tomb Raider]$ STEAM_RUNTIME=0 GAME_LAUNCH_PREFIX="gdb --args" pvkrun ./RiseOfTheTombRaider.sh
WARNING: Rise of the Tomb Raider launched with STEAM_RUNTIME=0
         We recommend using the steam runtime if possible
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0x1235240: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) HD Graphics 4000 (IVB GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x1235240.
PrimusVK: 0x121b340.
PrimusVK: Got discrete gpu!
PrimusVK: Device: GeForce GT 740M
PrimusVK:   Type: 2
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider...
(No debugging symbols found in /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider)
(gdb) b device_select_layer.c:249
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (device_select_layer.c:249) pending.
(gdb) r
Starting program: /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/RiseOfTheTombRaider 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
RiseOfTheTombRaider: crash reporter initialised with path "/home/zimudec/.local/share/feral-interactive/Rise of the Tomb Raider/crashes"
[New Thread 0x7fff3039d640 (LWP 1861)]
[New Thread 0x7fff27b9c640 (LWP 1862)]
[New Thread 0x7fff2f54e640 (LWP 1863)]
[New Thread 0x7fff2ed4d640 (LWP 1864)]
[New Thread 0x7fff2e54c640 (LWP 1865)]
[New Thread 0x7fff2c893640 (LWP 1882)]
[New Thread 0x7fff2739b640 (LWP 1883)]
[New Thread 0x7fff26b9a640 (LWP 1884)]
[New Thread 0x7fff26399640 (LWP 1885)]
[New Thread 0x7fff25714640 (LWP 1887)]
SDL2 initialised [built against 2.0.7, running with 2.0.7]
[Detaching after fork from child process 1888]
[New Thread 0x7fff25058640 (LWP 1889)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Detaching after fork from child process 1890]
[Thread 0x7fff25058640 (LWP 1889) exited]
Setting breakpad minidump AppID = 391220
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198008468660 [API loaded no]
[New Thread 0x7fff24857640 (LWP 2211)]
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[S_API WARN] The loaded overlay DLL doesn't support ValveHookScreenshots
[New Thread 0x7fff25058640 (LWP 2217)]
[New Thread 0x7ffee7fff640 (LWP 2218)]
[Thread 0x7ffee7fff640 (LWP 2218) exited]
[New Thread 0x7ffee7fff640 (LWP 2220)]
[New Thread 0x7ffee77fe640 (LWP 2221)]
[New Thread 0x7fff24469640 (LWP 2222)]
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7ffee579f640 (LWP 2231)]
[New Thread 0x7ffee4f9e640 (LWP 2232)]
[New Thread 0x7ffecbfff640 (LWP 2233)]
[New Thread 0x7ffecb7fe640 (LWP 2234)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "RiseOfTheTombRa" hit Breakpoint 1, fill_drm_device_info (
    info=info@entry=0x74aa0c0, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x7479fd0, device=0x72e31d0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
249 ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c: No existe el fichero o el directorio.
(gdb) bt
#0  fill_drm_device_info
    (info=info@entry=0x74aa0c0, drm_device=0x7fffffffbee0, 
    drm_device@entry=0x7479fd0, device=0x72e31d0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:249
#1  0x00007fff256cf5cf in get_default_device
    (pPhysicalDevices=0x746e7e0, physical_device_count=2, selection=0x0, info=0x74aa0c0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:347
#2  device_select_EnumeratePhysicalDevices
    (instance=<optimized out>, pPhysicalDeviceCount=0x7fffffffc36c, pPhysicalDevices=0x0)
    at ../mesa-20.1.7/src/vulkan/device-select-layer/device_select_layer.c:419
#3  0x00007fff244b22e1 in InstanceInfo::searchDevices(VkLayerInstanceDispatchTable_&) () at /usr/lib/libprimus_vk.so.1
#4  0x00007fff244a8e55 in PrimusVK_CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) () at /usr/lib/libprimus_vk.so.1
#5  0x00007fff24339c69 in  () at /usr/lib/libvulkan.so.1
#6  0x00007fff2433dace in vkCreateInstance () at /usr/lib/libvulkan.so.1
#7  0x0000000001a1da9b in  ()
#8  0x0000000001a1f985 in  ()
#9  0x00000000019b30c7 in  ()
#10 0x00000000019b3868 in  ()
#11 0x00000000018f9844 in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000018f9c48 in  ()
#13 0x000000000047ef62 in  ()
#14 0x00000000004935f1 in  ()
#15 0x00000000004939ad in  ()
#16 0x00000000004aad61 in  ()
#17 0x00000000004aa281 in  ()
#18 0x000000000041d939 in  ()
#19 0x00007ffff209f152 in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000046c3a1 in  ()
#21 0x00007fffffffe108 in  ()
#22 0x000000000000001c in  ()
#23 0x0000000000000001 in  ()
#24 0x00007fffffffe3e1 in  ()
#25 0x0000000000000000 in  ()
(gdb) x/50i info->GetPhysicalDeviceProperties2KHR
   0x7fff24321c30:  push   %r12
   0x7fff24321c32:  push   %rbp
   0x7fff24321c33:  mov    %rsi,%rbp
   0x7fff24321c36:  push   %rbx
   0x7fff24321c37:  mov    0x8(%rdi),%r12
   0x7fff24321c3b:  mov    %rdi,%rbx
   0x7fff24321c3e:  mov    0x8(%r12),%rdi
   0x7fff24321c43:  test   %rdi,%rdi
   0x7fff24321c46:  je     0x7fff24321c70
   0x7fff24321c48:  testb  $0x1,0x3f78(%rdi)
   0x7fff24321c4f:  je     0x7fff24321c70
   0x7fff24321c51:  mov    0x1b0(%r12),%rax
   0x7fff24321c59:  test   %rax,%rax
   0x7fff24321c5c:  je     0x7fff24321c90
   0x7fff24321c5e:  mov    0x18(%rbx),%rdi
   0x7fff24321c62:  mov    %rbp,%rsi
   0x7fff24321c65:  pop    %rbx
   0x7fff24321c66:  pop    %rbp
   0x7fff24321c67:  pop    %r12
   0x7fff24321c69:  jmpq   *%rax
   0x7fff24321c6b:  nopl   0x0(%rax,%rax,1)
   0x7fff24321c70:  mov    0xb0(%r12),%rax
   0x7fff24321c78:  test   %rax,%rax
--Type <RET> for more, q to quit, c to continue without paging--
   0x7fff24321c7b:  jne    0x7fff24321c5e
   0x7fff24321c7d:  testb  $0x1,0x3f78(%rdi)
   0x7fff24321c84:  je     0x7fff24321c5e
   0x7fff24321c86:  nopw   %cs:0x0(%rax,%rax,1)
   0x7fff24321c90:  mov    (%r12),%rax
   0x7fff24321c94:  lea    0x31e15(%rip),%rcx        # 0x7fff24353ab0
   0x7fff24321c9b:  xor    %edx,%edx
   0x7fff24321c9d:  mov    $0x1,%esi
   0x7fff24321ca2:  mov    (%rax),%r8
   0x7fff24321ca5:  xor    %eax,%eax
   0x7fff24321ca7:  callq  0x7fff24321900
   0x7fff24321cac:  mov    0x18(%rbx),%rdi
   0x7fff24321cb0:  lea    0x10(%rbp),%rsi
   0x7fff24321cb4:  callq  *0x50(%r12)
   0x7fff24321cb9:  mov    0x8(%rbp),%rbx
   0x7fff24321cbd:  lea    0x31edc(%rip),%rbp        # 0x7fff24353ba0
   0x7fff24321cc4:  jmp    0x7fff24321cdd
   0x7fff24321cc6:  nopw   %cs:0x0(%rax,%rax,1)
   0x7fff24321cd0:  testb  $0x4,0x3f78(%rdi)
   0x7fff24321cd7:  jne    0x7fff24321d08
   0x7fff24321cd9:  mov    0x8(%rbx),%rbx
   0x7fff24321cdd:  test   %rbx,%rbx
   0x7fff24321ce0:  je     0x7fff24321d38
--Type <RET> for more, q to quit, c to continue without paging--
   0x7fff24321ce2:  cmpl   $0x3b9bdf5c,(%rbx)
   0x7fff24321ce8:  mov    0x8(%r12),%rdi
   0x7fff24321ced:  je     0x7fff24321cd0
   0x7fff24321cef:  mov    %rbp,%rcx
(gdb) b *0x7fff24321c69
Breakpoint 2 at 0x7fff24321c69
(gdb) c
Continuing.

Thread 1 "RiseOfTheTombRa" hit Breakpoint 2, 0x00007fff24321c69 in ?? ()
   from /usr/lib/libvulkan.so.1
(gdb) p/x $rax
$1 = 0x0
(gdb) x/50i $rax
   0x0: Cannot access memory at address 0x0
(gdb) i sh
From                To                  Syms Read   Shared Object Library
0x00007ffff7fd2090  0x00007ffff7ff2746  Yes (*)     /lib64/ld-linux-x86-64.so.2
0x00007ffff7f7a210  0x00007ffff7f7b179  Yes (*)     /usr/lib/libdl.so.2
0x00007ffff7f62020  0x00007ffff7f6f270  Yes (*)     /usr/lib/libz.so.1
0x00007ffff7d0a320  0x00007ffff7d4a0dc  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libcurl.so.4
0x00007ffff7abfe80  0x00007ffff7aed638  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libssl.so.44
0x00007ffff771dc40  0x00007ffff781aa00  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libcrypto.so.42
0x00007ffff769ba70  0x00007ffff76aa025  Yes (*)     /usr/lib/libpthread.so.0
0x00007ffff768a750  0x00007ffff768d8d0  Yes (*)     /usr/lib/librt.so.1
0x00007ffff734d920  0x00007ffff743a9e8  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libSDL2-2.0.7.so
0x00007ffff7114320  0x00007ffff7122934  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libSDL2_image-2.0.1.so
0x00007ffff3754e70  0x00007ffff63d95ba  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libcef.so
0x00007ffff26458f0  0x00007ffff2dc2399  Yes (*)     /home/zimudec/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/bin/../lib/libpdf.so
0x00007ffff2541020  0x00007ffff255651b  Yes (*)     /usr/lib/libvorbis.so.0
0x00007ffff2475020  0x00007ffff24f926f  Yes (*)     /usr/lib/libfreetype.so.6
0x00007ffff2424020  0x00007ffff244a13e  Yes (*)     /usr/lib/libfontconfig.so.1
--Type <RET> for more, q to quit, c to continue without paging--
0x00007ffff23d5020  0x00007ffff2403203  Yes (*)     /usr/lib/libdbus-1.so.3
0x00007ffff22903b0  0x00007ffff232b658  Yes (*)     /usr/lib/libm.so.6
0x00007ffff2249420  0x00007ffff2272752  Yes         /usr/lib/libgomp.so.1
0x00007ffff209d650  0x00007ffff21e86bd  Yes (*)     /usr/lib/libc.so.6
0x00007ffff202b020  0x00007ffff2058bbc  Yes (*)     /usr/lib/libgobject-2.0.so.0
0x00007ffff1f10040  0x00007ffff1f94b92  Yes (*)     /usr/lib/libglib-2.0.so.0
0x00007ffff1ee8020  0x00007ffff1eee2a3  Yes (*)     /usr/lib/libpangocairo-1.0.so.0
0x00007ffff1dc9020  0x00007ffff1e9e2ff  Yes (*)     /usr/lib/libcairo.so.2
0x00007ffff1d74020  0x00007ffff1d9a365  Yes (*)     /usr/lib/libpango-1.0.so.0
0x00007ffff1c40020  0x00007ffff1cc97af  Yes (*)     /usr/lib/libX11.so.6
0x00007ffff1c12020  0x00007ffff1c1c989  Yes (*)     /usr/lib/libXi.so.6
0x00007ffff1af0020  0x00007ffff1bca19b  Yes (*)     /usr/lib/libnss3.so
0x00007ffff1ab1020  0x00007ffff1ac173d  Yes (*)     /usr/lib/libnssutil3.so
0x00007ffff1a83020  0x00007ffff1a98b97  Yes (*)     /usr/lib/libsmime3.so
0x00007ffff1a75020  0x00007ffff1a76773  Yes (*)     /usr/lib/libplc4.so
0x00007ffff1a3d050  0x00007ffff1a5f743  Yes (*)     /usr/lib/libnspr4.so
0x00007ffff1a2a020  0x00007ffff1a2aa55  Yes (*)     /usr/lib/libXcomposite.so.1
0x00007ffff1a18020  0x00007ffff1a2233e  Yes (*)     /usr/lib/libXext.so.6
0x00007ffff1963020  0x00007ffff19deab6  Yes (*)     /usr/lib/libasound.so.2
0x00007ffff1932020  0x00007ffff19329ab  Yes (*)     /usr/lib/libXdamage.so.1
0x00007ffff192a020  0x00007ffff192c446  Yes (*)     /usr/lib/libXfixes.so.3
--Type <RET> for more, q to quit, c to continue without paging--
0x00007ffff1922020  0x00007ffff1924a1c  Yes (*)     /usr/lib/libXtst.so.6
0x00007ffff18f5020  0x00007ffff190def6  Yes (*)     /usr/lib/libgconf-2.so.4
0x00007ffff18e2020  0x00007ffff18e6c3e  Yes (*)     /usr/lib/libXcursor.so.1
0x00007ffff18d4020  0x00007ffff18da3a3  Yes (*)     /usr/lib/libXrender.so.1
0x00007ffff18c7020  0x00007ffff18cd696  Yes (*)     /usr/lib/libXrandr.so.2
0x00007ffff1899020  0x00007ffff18b6f1a  Yes (*)     /usr/lib/libexpat.so.1
0x00007ffff1817020  0x00007ffff186b7f0  Yes (*)     /usr/lib/libcups.so.2
0x00007ffff17ef020  0x00007ffff17f20e6  Yes (*)     /usr/lib/libcap.so.2
0x00007ffff16a6040  0x00007ffff1791b52  Yes         /usr/lib/libstdc++.so.6
0x00007ffff15f9020  0x00007ffff1609ca5  Yes         /usr/lib/libgcc_s.so.1
0x00007ffff15ed020  0x00007ffff15ef3de  Yes (*)     /usr/lib/libogg.so.0
0x00007ffff15da020  0x00007ffff15e6b72  Yes (*)     /usr/lib/libbz2.so.1.0
0x00007ffff15a5020  0x00007ffff15c88da  Yes (*)     /usr/lib/libpng16.so.16
0x00007ffff14da040  0x00007ffff156a612  Yes (*)     /usr/lib/libharfbuzz.so.0
0x00007ffff142f040  0x00007ffff14a4750  Yes (*)     /usr/lib/libsystemd.so.0
0x00007ffff1413040  0x00007ffff141839e  Yes (*)     /usr/lib/libffi.so.7
0x00007ffff13a1020  0x00007ffff13f0b6d  Yes (*)     /usr/lib/libpcre.so.1
0x00007ffff138c020  0x00007ffff139593a  Yes (*)     /usr/lib/libpangoft2-1.0.so.0
0x00007ffff12e8020  0x00007ffff1369934  Yes (*)     /usr/lib/libpixman-1.so.0
0x00007ffff12d9020  0x00007ffff12d9b44  Yes (*)     /usr/lib/libxcb-shm.so.0
0x00007ffff12ba020  0x00007ffff12ccb86  Yes (*)     /usr/lib/libxcb.so.1
0x00007ffff12a4020  0x00007ffff12a8b7f  Yes (*)     /usr/lib/libxcb-render.so.0
--Type <RET> for more, q to quit, c to continue without paging--
0x00007ffff111c020  0x00007ffff1215a94  Yes (*)     /usr/lib/libgio-2.0.so.0
0x00007ffff10c9020  0x00007ffff10cd108  Yes (*)     /usr/lib/libfribidi.so.0
0x00007ffff10bc020  0x00007ffff10bfa24  Yes (*)     /usr/lib/libthai.so.0
0x00007ffff10b6020  0x00007ffff10b6d48  Yes (*)     /usr/lib/libplds4.so
0x00007ffff10b1020  0x00007ffff10b1fac  Yes (*)     /usr/lib/libgmodule-2.0.so.0
0x00007ffff1091020  0x00007ffff10a3d28  Yes (*)     /usr/lib/libdbus-glib-1.so.2
0x00007ffff103f020  0x00007ffff10765a9  Yes (*)     /usr/lib/libgssapi_krb5.so.2
0x00007ffff0f6e020  0x00007ffff0fd68b6  Yes (*)     /usr/lib/libkrb5.so.3
0x00007ffff0f1f020  0x00007ffff0f3a957  Yes (*)     /usr/lib/libk5crypto.so.3
0x00007ffff0f16020  0x00007ffff0f16c49  Yes (*)     /usr/lib/libcom_err.so.2
0x00007ffff0f09020  0x00007ffff0f0e34b  Yes (*)     /usr/lib/libavahi-common.so.3
0x00007ffff0ef6020  0x00007ffff0efe847  Yes (*)     /usr/lib/libavahi-client.so.3
0x00007ffff0d5c040  0x00007ffff0e77f54  Yes (*)     /usr/lib/libgnutls.so.30
0x00007ffff0cf2020  0x00007ffff0d03689  Yes (*)     /usr/lib/libcrypt.so.2
0x00007ffff0cce020  0x00007ffff0ce7462  Yes (*)     /usr/lib/libgraphite2.so.3
0x00007ffff0ca6020  0x00007ffff0cbce73  Yes (*)     /usr/lib/liblzma.so.5
0x00007ffff0bd6020  0x00007ffff0c8e786  Yes (*)     /usr/lib/libzstd.so.1
0x00007ffff0bb2020  0x00007ffff0bcb6a7  Yes (*)     /usr/lib/liblz4.so.1
--Type <RET> for more, q to quit, c to continue without paging--
0x00007ffff0a98040  0x00007ffff0b68eb8  Yes (*)     /usr/lib/libgcrypt.so.20
0x00007ffff0a88040  0x00007ffff0a88d52  Yes (*)     /usr/lib/libXau.so.6
0x00007ffff0a81020  0x00007ffff0a82882  Yes (*)     /usr/lib/libXdmcp.so.6
0x00007ffff0a2d040  0x00007ffff0a68c42  Yes (*)     /usr/lib/libmount.so.1
0x00007ffff0a0b710  0x00007ffff0a186fc  Yes (*)     /usr/lib/libresolv.so.2
0x00007ffff09fd020  0x00007ffff0a005a1  Yes (*)     /usr/lib/libdatrie.so.1
0x00007ffff09ef020  0x00007ffff09f5f64  Yes (*)     /usr/lib/libkrb5support.so.0
0x00007ffff09e7020  0x00007ffff09e8123  Yes (*)     /usr/lib/libkeyutils.so.1
0x00007ffff08d9040  0x00007ffff0976330  Yes (*)     /usr/lib/libp11-kit.so.0
0x00007ffff0891020  0x00007ffff0894cd5  Yes (*)     /usr/lib/libidn2.so.0
0x00007ffff071c020  0x00007ffff0750609  Yes (*)     /usr/lib/libunistring.so.2
0x00007ffff06f8020  0x00007ffff070354f  Yes (*)     /usr/lib/libtasn1.so.6
0x00007ffff06c2020  0x00007ffff06dfeef  Yes (*)     /usr/lib/libnettle.so.8
0x00007ffff0678020  0x00007ffff0689c59  Yes (*)     /usr/lib/libhogweed.so.6
0x00007ffff05df080  0x00007ffff0653271  Yes (*)     /usr/lib/libgmp.so.10
0x00007ffff05ac040  0x00007ffff05c08d2  Yes (*)     /usr/lib/libgpg-error.so.0
0x00007ffff055c040  0x00007ffff058e942  Yes (*)     /usr/lib/libblkid.so.1
0x00007fff2f560f50  0x00007fff2f67cf38  Yes (*)     /usr/lib/libnvidia-ml.so
0x00007fff3051c020  0x00007fff3051c9a3  Yes (*)     /usr/lib/libXinerama.so.1
0x00007fff30517020  0x00007fff30517cfd  Yes (*)     /usr/lib/libXss.so.1
0x00007fff30510020  0x00007fff3051282b  Yes (*)     /usr/lib/libXxf86vm.so.1
0x00007ffff7f9b040  0x00007ffff7fb2d22  Yes (*)     /usr/lib/primus/libGL.so.1
--Type <RET> for more, q to quit, c to continue without paging--
0x00007fff30498020  0x00007fff304a52f1  Yes (*)     /usr/lib/libglapi.so.0
0x00007fff2da21020  0x00007fff2da23a1d  Yes (*)     /usr/lib/libGL.so.1
0x00007fff2d968020  0x00007fff2d969f87  Yes (*)     /usr/lib/libGLdispatch.so.0
0x00007fff2d8f8020  0x00007fff2d911bb1  Yes (*)     /usr/lib/libGLX.so.0
0x00007fff2d890040  0x00007fff2d8d6a72  Yes (*)     /usr/lib/libGLX_mesa.so.0
0x00007fff3047c020  0x00007fff30485616  Yes (*)     /usr/lib/libdrm.so.2
0x00007fff2d865020  0x00007fff2d86d6a6  Yes (*)     /usr/lib/libxcb-glx.so.0
0x00007ffff7f84020  0x00007ffff7f8410b  Yes (*)     /usr/lib/libX11-xcb.so.1
0x00007fff30472020  0x00007fff304731a6  Yes (*)     /usr/lib/libxcb-dri2.so.0
0x00007fff3046c020  0x00007fff3046ce34  Yes (*)     /usr/lib/libxcb-dri3.so.0
0x00007fff30466020  0x00007fff304668a6  Yes (*)     /usr/lib/libxcb-present.so.0
0x00007fff2d852020  0x00007fff2d8541b2  Yes (*)     /usr/lib/libxcb-sync.so.1
0x00007fff30461020  0x00007fff304612ec  Yes (*)     /usr/lib/libxshmfence.so.1
0x00007fff2cb12040  0x00007fff2d3b42d2  Yes (*)     /usr/lib/dri/i965_dri.so
0x00007fff2ca11020  0x00007fff2ca27a45  Yes (*)     /usr/lib/libdrm_intel.so.1
0x00007fff2ca01020  0x00007fff2ca07975  Yes (*)     /usr/lib/libdrm_radeon.so.1
0x00007fff2c9f7020  0x00007fff2c9fac37  Yes (*)     /usr/lib/libdrm_nouveau.so.2
0x00007fff2c9ec020  0x00007fff2c9f0593  Yes (*)     /usr/lib/libpciaccess.so.0
0x00007fff2c9d8550  0x00007fff2c9de17c  Yes (*)     /usr/lib/libnss_files.so.2
0x00007fff27d34ab0  0x00007fff27d95c4f  Yes (*)     /usr/lib/libGLX_nvidia.so.0
0x00007fff259959a0  0x00007fff25997673  Yes (*)     /usr/lib/libnvidia-tls.so.43--Type <RET> for more, q to quit, c to continue without paging--
0.64
0x00007fff065a4110  0x00007fff07594877  Yes (*)     /usr/lib/libnvidia-glcore.so.430.64
0x00007fff27bbe020  0x00007fff27bbf287  Yes (*)     /usr/lib/libpulse-simple.so.0
0x00007fff25683020  0x00007fff256b11b0  Yes (*)     /usr/lib/libpulse.so.0
0x00007fff25606040  0x00007fff2564b402  Yes (*)     /usr/lib/pulseaudio/libpulsecommon-13.0.so
0x00007fff2557d020  0x00007fff255ce358  Yes (*)     /usr/lib/libsndfile.so.1
0x00007fff27bb6020  0x00007fff27bb867a  Yes (*)     /usr/lib/libasyncns.so.0
0x00007fff25540020  0x00007fff2556879b  Yes (*)     /usr/lib/libFLAC.so.8
0x00007fff254a0020  0x00007fff254a2677  Yes (*)     /usr/lib/libvorbisenc.so.2
0x00007ffef4739900  0x00007ffef591ee7f  Yes (*)     /home/zimudec/.local/share/Steam/linux64/steamclient.so
0x00007fff244e6030  0x00007fff24525bdf  Yes (*)     /home/zimudec/.local/share/Steam/linux64/crashhandler.so
0x00007fff27baf020  0x00007fff27bb048e  Yes (*)     /usr/lib/libnss_mdns_minimal.so.2
0x00007fff27ba7310  0x00007fff27baa312  Yes (*)     /usr/lib/libnss_dns.so.2
0x00007fff2446e040  0x00007fff24484fe0  Yes (*)     /usr/lib/libudev.so.1
0x00007fff2431f020  0x00007fff243508c9  Yes (*)     /usr/lib/libvulkan.so.1
0x00007fff27ba1020  0x00007fff27ba16b8  Yes (*)     /usr/lib/libnv_vulkan_wrapper.so.1
--Type <RET> for more, q to quit, c to continue without paging--
0x00007ffee6841040  0x00007ffee6ccec12  Yes (*)     /usr/lib/libvulkan_intel.so
0x00007fff242ff020  0x00007fff24303e10  Yes (*)     /usr/lib/libwayland-client.so.0
0x00007fff242ee020  0x00007fff242f2c41  Yes (*)     /usr/lib/libxcb-randr.so.0
0x00007fff242c0020  0x00007fff242db253  Yes (*)     /usr/lib/libpng12.so.0
0x00007fff244be700  0x00007fff244cfd6a  Yes (*)     /home/zimudec/.local/share/Steam/ubuntu12_64/steamoverlayvulkanlayer.so
0x00007fff256ce020  0x00007fff256cfe7c  Yes         /usr/lib/libVkLayer_MESA_device_select.so
0x00007fff244a6020  0x00007fff244b512f  Yes (*)     /usr/lib/libprimus_vk.so.1
0x00007ffee58113e0  0x00007ffee618eff4  Yes (*)     /usr/lib/libnvidia-glvkspirv.so.430.64
0x00007fff24012a20  0x00007fff24048bd8  Yes (*)     /usr/lib/libnvidia-cbl.so.430.64
0x00007ffef420fbe0  0x00007ffef423f748  Yes (*)     /usr/lib/libnvidia-fatbinaryloader.so.430.64
(*): Shared library is missing debugging information.
(gdb)
felixdoerre commented 3 years ago

Thanks for the gdb output. I believe this confirms the theory that at least one ICD is not returning GetPhysicalDeviceProperties2, so that it is null, when the loader tries to invoke it. I've checked and my mesa does return null for this function. So fpGetPhysicalDeviceProperties2 is null here: https://github.com/KhronosGroup/Vulkan-Loader/blob/921ca6d992fca347396ee153bf1820a9f3b8d478/loader/loader.c#L7975

I believe this is mesa's fault, as in this case mesa is not compatible with vulkan 1.1. Vulkan ICDs compatible with Vulkan 1.1 need to implement vkGetPhysicalDeviceProperties2 and not "just" vkGetPhysicalDeviceProperties2KHR. This fix should not be required for what we are observing here, however I will probably "solve" the issue and it would be good in general to fix this behavior in mesa.

However there is still something that I don't understand: the mesa device select layer has to see that the extension VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME is enabled (otherwise it wouldn't try to call vkGetPhysicalDeviceProperties2KHR) and the loader has to see this extension disabled (otherwise it would not try to call the null-function). By the way: what is your vulkan-loader version?

So next gdb, let's validate the theory that the vulkan-loader thinks the extension is disabled. The memory-addresses I see from your output seem stable, so assuming that you didn't recompile anything, I can just specify literal addresses which seems easier to me. If the addresses changed, you would need to update the address in the commands accordingly.

b fill_drm_device_info
y
r
b *0x7fff24321c5e
c
p/x $rdi
x/b 0x3f78 + $rdi

EDIT: ... maybe I was confused, with when which functions should work, but looking at it again seems mesa behaves correctly. It depends on the requested extension/vulkan versions which functions mesa exposes. If the application requests vulkan 1.0 without the extension, both are not available, if the application requests vulkan 1.1, the non-KHR-variant is (only) available. If the application additionally requests the extension, in both cases the KHR-variant becomes available.

So it would be nice, if you run also this, so we can check which functions mesa returns on your system, with the extensions/api version requested by the game:

b anv_GetInstanceProcAddr if _instance != 0
y
r
p instance->physical_device_dispatch.entrypoints[anv_get_physical_device_entrypoint_index("vkGetPhysicalDeviceProperties2KHR")]
p instance->physical_device_dispatch.entrypoints[anv_get_physical_device_entrypoint_index("vkGetPhysicalDeviceProperties2")]