protonscr

Nvidia gpu not detected

dxvkclosed nvidia proprietary
doitsujin/dxvk#2316 · opened 2021-09-27 by Baiyah7o · updated 2021-10-01 · 8 comments · github
BBaiyah7o 2021-09-27 github

With the current build, games do not "detect" the dedicated Nvida GPU, only the Intel UHD shows up in the games option (WoW, Eve Online). Disabling the integrated gpu on boot results in an unsupported graphics card error message on game start (WoW) .

Reverting to built b79ce7af fixes this issue.

System information

  • GPU: NVIDIA GeForce RTX 2070 with Max-Q Design
  • Driver: 470.74.0 also tested on 470.63.01-176
  • Wine version: wine-tkg-staging-fsync-git 6.18.r0.gf8851f16-326 also tested on wine-staging 6.16-1
  • DXVK version: v1.9.2-4-gd799b44d

Log files

Ddoitsujin maintainer 2021-09-27 github

err: D3D11CoreCreateDevice: Failed to create D3D11 device

This is clearly a driver bug, we enable some Nvidia-specific extensions that are explicitly reported as supported by the nvidia driver, but it then fails to create the device.

Apparently this happens if the nvidia_uvm kernel module is not loaded.

DDadSchoorse 2021-09-27 github

Running nvidia-modprobe -u -c=0 before attempting to start the game will likely fix the device creation failure.

BBaiyah7o 2021-09-27 github

Running nvidia-modprobe -u -c=0 works fine for me.
Thank you for the quick reply.

SSveSop 2021-09-28 github

@Baiyah7o Could i trouble you to try a 32-bit app with https://github.com/doitsujin/dxvk/commit/86148ec070628f5a89fbb0a91603bae2ce89529a or newer build?

I seem to be having issues running 32-bit apps like Unigine Valley/Heaven and similar. Unigine Superposition is 64-bit so that works (aswell as WoW that is also 64-bit).

I did disable VK_NVX_BINARY_IMPORT_EXTENSION_NAME like this, and had no issues running the 32-bit apps then.

diff --git a/src/dxvk/dxvk_extensions.h b/src/dxvk/dxvk_extensions.h
index 11073619..70c66144 100644
--- a/src/dxvk/dxvk_extensions.h
+++ b/src/dxvk/dxvk_extensions.h
@@ -283,7 +283,7 @@ namespace dxvk {
     DxvkExt khrSamplerMirrorClampToEdge       = { VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,       DxvkExtMode::Optional };
     DxvkExt khrShaderFloatControls            = { VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,              DxvkExtMode::Optional };
     DxvkExt khrSwapchain                      = { VK_KHR_SWAPCHAIN_EXTENSION_NAME,                          DxvkExtMode::Required };
-    DxvkExt nvxBinaryImport                   = { VK_NVX_BINARY_IMPORT_EXTENSION_NAME,                      DxvkExtMode::Optional };
+    DxvkExt nvxBinaryImport                   = { VK_NVX_BINARY_IMPORT_EXTENSION_NAME,                      DxvkExtMode::Disabled };
     DxvkExt nvxImageViewHandle                = { VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME,                  DxvkExtMode::Optional };
     DxvkExt khrBufferDeviceAddress            = { VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,              DxvkExtMode::Disabled };
   };

Just wondering if it is something weird with my setup maybe? Using RTX2070 aswell as 470.74 driver as you describe.

PS. Made sure uvm module is loaded:

lsmod|grep -i nvidia
nvidia_uvm           1142784  0
nvidia_drm             69632  4
nvidia_modeset       1204224  9 nvidia_drm
nvidia              35328000  433 nvidia_uvm,nvidia_modeset
drm_kms_helper        323584  1 nvidia_drm
drm                   606208  8 drm_kms_helper,nvidia,nvidia_drm
BBaiyah7o 2021-09-29 github

I did disable VK_NVX_BINARY_IMPORT_EXTENSION_NAME like this, and had no issues running the 32-bit apps then.

I can confirm this, with Unigine Valley on my system.

SSveSop 2021-09-29 github

I wonder if this extension either is bugged on 32-bit, or supposed to be 64-bit only. If it is only for DLSS, afaik there is no 32-bit games utilizing DLSS is there? And /usr/lib/x86_64-linux-gnu/nvidia/wine/nvngx.dll seems to indicate only a 64-bit dll for use with proton (i think).

Doing this:

diff --git a/src/dxvk/dxvk_extensions.h b/src/dxvk/dxvk_extensions.h
index 11073619..9a185825 100644
--- a/src/dxvk/dxvk_extensions.h
+++ b/src/dxvk/dxvk_extensions.h
@@ -283,7 +283,11 @@ namespace dxvk {
     DxvkExt khrSamplerMirrorClampToEdge       = { VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,       DxvkExtMode::Optional };
     DxvkExt khrShaderFloatControls            = { VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,              DxvkExtMode::Optional };
     DxvkExt khrSwapchain                      = { VK_KHR_SWAPCHAIN_EXTENSION_NAME,                          DxvkExtMode::Required };
+#ifdef __x86_64__
     DxvkExt nvxBinaryImport                   = { VK_NVX_BINARY_IMPORT_EXTENSION_NAME,                      DxvkExtMode::Optional };
+#else
+    DxvkExt nvxBinaryImport                   = { VK_NVX_BINARY_IMPORT_EXTENSION_NAME,                      DxvkExtMode::Disabled };
+#endif
     DxvkExt nvxImageViewHandle                = { VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME,                  DxvkExtMode::Optional };
     DxvkExt khrBufferDeviceAddress            = { VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,              DxvkExtMode::Disabled };
   };

Makes 32-bit Unigine Valley show this:

info:  Enabled device extensions:
info:    VK_EXT_4444_formats
info:    VK_EXT_conservative_rasterization
info:    VK_EXT_custom_border_color
info:    VK_EXT_depth_clip_enable
info:    VK_EXT_extended_dynamic_state
info:    VK_EXT_full_screen_exclusive
info:    VK_EXT_host_query_reset
info:    VK_EXT_robustness2
info:    VK_EXT_shader_demote_to_helper_invocation
info:    VK_EXT_shader_viewport_index_layer
info:    VK_EXT_transform_feedback
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_buffer_device_address
info:    VK_KHR_create_renderpass2
info:    VK_KHR_depth_stencil_resolve
info:    VK_KHR_draw_indirect_count
info:    VK_KHR_driver_properties
info:    VK_KHR_image_format_list
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_shader_float_controls
info:    VK_KHR_swapchain
info:    VK_NVX_image_view_handle

And 64-bit Unigine Superposition show this:

info:  Enabled device extensions:
info:    VK_EXT_4444_formats
info:    VK_EXT_conservative_rasterization
info:    VK_EXT_custom_border_color
info:    VK_EXT_depth_clip_enable
info:    VK_EXT_extended_dynamic_state
info:    VK_EXT_full_screen_exclusive
info:    VK_EXT_host_query_reset
info:    VK_EXT_robustness2
info:    VK_EXT_shader_demote_to_helper_invocation
info:    VK_EXT_shader_viewport_index_layer
info:    VK_EXT_transform_feedback
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_buffer_device_address
info:    VK_KHR_create_renderpass2
info:    VK_KHR_depth_stencil_resolve
info:    VK_KHR_draw_indirect_count
info:    VK_KHR_driver_properties
info:    VK_KHR_image_format_list
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_shader_float_controls
info:    VK_KHR_swapchain
info:    VK_NVX_binary_import
info:    VK_NVX_image_view_handle

Atleast it can still be utilized for 64-bit apps.

@doitsujin Is it a pure driverbug and this extension should work for 32-bit, or is it supposed to be 64-bit only (kinda only useful for 64-bit games atm anyway i think).

Ideas? Or am i just up to my regular stupid thinking again? :)

Lliam-middlebrook 2021-09-29 github

We're tracking the issue with VK_NVX_binary_import and 32-bit applications internally as NVIDIA bug 3391194. You can reference this bug id when mentioning the bug to NVIDIA employees, but the tracker itself is not publicly available.

Ddoitsujin maintainer 2021-10-01 github

I implemented a workaround for both issues:

  • On 32-bit builds, the CUDA interop extensions are disabled at all times. There seem to be issues with address space, and I seriously hope that people aren't mad enough to release new 32-bit games in this day and age.
  • If device creation fails and CUDA interop extensions are enabled, we'll try to create a new device which doesn't have the extensions enabled. Obviously, DLSS will not work in that case, but it's better than crashing. A log message will be printed when that happens.

DLLs