dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

dxvk >= 1.9.3 no longer find a valid GPU on a system that works just fine with 1.9.2

Open darix opened this issue 3 years ago • 12 comments

DxvkAdapter: Failed to create device, retrying without CUDA interop extensions
D3D11CoreCreateDevice: Failed to create D3D11 device

dxvk output during startup

info:  Game: Overwatch.exe
info:  DXVK: v1.9.4
info:  Found config file: c:/dxvk/dxvk.conf
info:  Effective configuration:
info:    dxvk.hud = compiler,version,fps,frametimes
info:    dxgi.nvapiHack = False
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
info:    OpenXR
info:  OpenVR: could not open registry key, status 2
info:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  NVIDIA GeForce RTX 2070 SUPER:
info:    Driver: 510.39.1
info:    Vulkan: 1.2.194
info:    Memory Heap[0]: 
info:      Size: 8192 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 23406 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[8]: Property Flags = 0x6
info:      Memory Type[9]: Property Flags = 0xe
info:    Memory Heap[2]: 
info:      Size: 246 MiB
info:      Flags: 0x1
info:      Memory Type[10]: Property Flags = 0x7
info:  Game: Overwatch.exe
info:  DXVK: v1.9.4
info:  Found config file: c:/dxvk/dxvk.conf
info:  Effective configuration:
info:    dxvk.hud = compiler,version,fps,frametimes
info:    dxgi.nvapiHack = False
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
info:    OpenXR
info:  OpenVR: could not open registry key, status 2
info:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  NVIDIA GeForce RTX 2070 SUPER:
info:    Driver: 510.39.1
info:    Vulkan: 1.2.194
info:    Memory Heap[0]: 
info:      Size: 8192 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 23406 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[8]: Property Flags = 0x6
info:      Memory Type[9]: Property Flags = 0xe
info:    Memory Heap[2]: 
info:      Size: 246 MiB
info:      Flags: 0x1
info:      Memory Type[10]: Property Flags = 0x7
info:  Game: Overwatch.exe
info:  DXVK: v1.9.4
info:  Found config file: c:/dxvk/dxvk.conf
info:  Effective configuration:
info:    dxvk.hud = compiler,version,fps,frametimes
info:    dxgi.nvapiHack = False
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
info:    OpenXR
info:  OpenVR: could not open registry key, status 2
info:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  NVIDIA GeForce RTX 2070 SUPER:
info:    Driver: 510.39.1
info:    Vulkan: 1.2.194
info:    Memory Heap[0]: 
info:      Size: 8192 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 23406 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[8]: Property Flags = 0x6
info:      Memory Type[9]: Property Flags = 0xe
info:    Memory Heap[2]: 
info:      Size: 246 MiB
info:      Flags: 0x1
info:      Memory Type[10]: Property Flags = 0x7
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info:  Device properties:
info:    Device name:     : NVIDIA GeForce RTX 2070 SUPER
info:    Driver version   : 510.39.1
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_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
info:  Device features:
info:    robustBufferAccess                     : 1
info:    fullDrawIndexUint32                    : 1
info:    imageCubeArray                         : 1
info:    independentBlend                       : 1
info:    geometryShader                         : 1
info:    tessellationShader                     : 1
info:    sampleRateShading                      : 1
info:    dualSrcBlend                           : 1
info:    logicOp                                : 1
info:    multiDrawIndirect                      : 1
info:    drawIndirectFirstInstance              : 1
info:    depthClamp                             : 1
info:    depthBiasClamp                         : 1
info:    fillModeNonSolid                       : 1
info:    depthBounds                            : 1
info:    multiViewport                          : 1
info:    samplerAnisotropy                      : 1
info:    textureCompressionBC                   : 1
info:    occlusionQueryPrecise                  : 1
info:    pipelineStatisticsQuery                : 1
info:    vertexPipelineStoresAndAtomics         : 0
info:    fragmentStoresAndAtomics               : 1
info:    shaderImageGatherExtended              : 1
info:    shaderStorageImageExtendedFormats      : 0
info:    shaderStorageImageReadWithoutFormat    : 1
info:    shaderStorageImageWriteWithoutFormat   : 1
info:    shaderClipDistance                     : 1
info:    shaderCullDistance                     : 1
info:    shaderFloat64                          : 1
info:    shaderInt64                            : 1
info:    variableMultisampleRate                : 1
info:  VK_EXT_4444_formats
info:    formatA4R4G4B4                         : 1
info:    formatA4B4G4R4                         : 1
info:  VK_EXT_custom_border_color
info:    customBorderColors                     : 1
info:    customBorderColorWithoutFormat         : 1
info:  VK_EXT_depth_clip_enable
info:    depthClipEnable                        : 1
info:  VK_EXT_extended_dynamic_state
info:    extendedDynamicState                   : 1
info:  VK_EXT_host_query_reset
info:    hostQueryReset                         : 1
info:  VK_EXT_memory_priority
info:    memoryPriority                         : 0
info:  VK_EXT_robustness2
info:    robustBufferAccess2                    : 1
info:    robustImageAccess2                     : 1
info:    nullDescriptor                         : 1
info:  VK_EXT_shader_demote_to_helper_invocation
info:    shaderDemoteToHelperInvocation         : 1
info:  VK_EXT_transform_feedback
info:    transformFeedback                      : 1
info:    geometryStreams                        : 1
info:  VK_EXT_vertex_attribute_divisor
info:    vertexAttributeInstanceRateDivisor     : 1
info:    vertexAttributeInstanceRateZeroDivisor : 1
info:  VK_KHR_buffer_device_address
info:    bufferDeviceAddress                    : 1
info:  Queue families:
info:    Graphics : 0
info:    Transfer : 1
err:   DxvkAdapter: Failed to create device, retrying without CUDA interop extensions
err:   D3D11CoreCreateDevice: Failed to create D3D11 device

darix avatar Jan 24 '22 16:01 darix

Sounds like this issue: https://github.com/doitsujin/dxvk/issues/2316

We already have a workaround that's supposed to disable all the CUDA-specific stuff if device creation fails once, but if that no longer works on current drivers, there's not much we can do and you'll need to manually load the kernel module in question prior to running games outside of Steam.

doitsujin avatar Jan 24 '22 17:01 doitsujin

well until 1.9.2 i could play without installing cuda and just the basic binary driver. Why is it required now?

darix avatar Jan 24 '22 17:01 darix

Cuda interop is required for DLSS support. You don't need Cuda installed for DXVK to work.

The problem is that the Nvidia Vulkan driver just fails to create a device with these extensions enabled if nvidia_uvm.ko isn't loaded. Since this is a well-known issue, DXVK detects that and tries to create a Vulkan device without those extensions, but for some reason it still fails to create a device on your system.

doitsujin avatar Jan 24 '22 17:01 doitsujin

nvidia_uvm is loaded here. any more debug information i can provide?

I have all my dxvk dlls linked to a "latest" directory so i can easily switch between dxvk versions by just updating the latest directory symlink.

darix avatar Jan 24 '22 17:01 darix

That's weird, what distro are you on and are you running this inside a container or something?

doitsujin avatar Jan 24 '22 17:01 doitsujin

openSUSE Tumbleweed. no container. but apparmor. though there are no violations logged. The only thing I do is blocking of the execution of nvidia-modprobe. It feels wrong that every wine app should be able to do that.

I just did a double check "hey lets see if all dlls are actually linked properly"

find -type l -name "d[3x]*.dll"  -ls | sed -e "s|${HOME}/Games/||g" 
547061200      0 lrwxrwxrwx   1 darix    users          46 Jan 13 13:29 ./drive_c/windows/system32/d3d9.dll -> dxvk/latest/x64/d3d9.dll
547060669      0 lrwxrwxrwx   1 darix    users          51 Jan 13 13:29 ./drive_c/windows/system32/d3d10core.dll -> dxvk/latest/x64/d3d10core.dll
546681677      0 lrwxrwxrwx   1 darix    users          47 Jan 13 13:29 ./drive_c/windows/system32/d3d11.dll -> dxvk/latest/x64/d3d11.dll
547427906      0 lrwxrwxrwx   1 darix    users          45 Jan 24 18:51 ./drive_c/windows/system32/dxgi.dll -> dxvk/1.9.4/x64/dxgi.dll
1077226325      0 lrwxrwxrwx   1 darix    users          46 Jan 13 13:29 ./drive_c/windows/syswow64/dxgi.dll -> dxvk/latest/x32/dxgi.dll
1077226339      0 lrwxrwxrwx   1 darix    users          46 Jan 13 13:29 ./drive_c/windows/syswow64/d3d9.dll -> dxvk/latest/x32/d3d9.dll
1077226340      0 lrwxrwxrwx   1 darix    users          51 Jan 13 13:29 ./drive_c/windows/syswow64/d3d10core.dll -> dxvk/latest/x32/d3d10core.dll
1077226341      0 lrwxrwxrwx   1 darix    users          47 Jan 13 13:29 ./drive_c/windows/syswow64/d3d11.dll -> dxvk/latest/x32/d3d11.dll

while in the dxvk directory i see a lot more dlls. a reinstall with setup_dxvk.sh install --symlink did not change the find output.

d3d10_1.dll is not symlinked.

darix avatar Jan 24 '22 17:01 darix

Same with Gentoo , dxvk latest . I can fix it by running first Blender and render a model then closing it . After that game works fine no error .I dont know what blender does caparing env vars no changes. Happens in RDR2 game also Fail to create device wine + native vulkan only .

TURING-V2 avatar May 08 '22 07:05 TURING-V2

Same with Gentoo , dxvk latest . I can fix it by running first Blender and render a model then closing it . After that game works fine no error .I dont know what blender does caparing env vars no changes. Happens in RDR2 game also Fail to create device wine + native vulkan only .

maybe check if any kernel modules got loaded during the blender step

darix avatar May 08 '22 14:05 darix

@TURING-V2

I can fix it by running first Blender and render a model then closing it .

lol If you can't (or don't want to) load nvidia_uvm on system boot or use modprobe (for some reason), you can just "ping" cuda or opencl on linux + nvidia. Driver will load nvidia_uvm by itself.

#include "cuda.h"
int main() {
  return cuInit(0);
}
#include <CL/cl.h>
int main()
{
  cl_platform_id id;
  cl_uint platforms;
  return clGetPlatformIDs(1, &id, &platforms);
}

Compile and use like $ init-dlss && wine game.exe or init-dlss && %command% in steam.

pchome avatar May 08 '22 15:05 pchome

uvm was loaded. but the cuda part apparently wasnt when i last time tested this.

plus couldnt dxvk include this init code above to trigger it?

darix avatar May 08 '22 15:05 darix

nvidia-modprobe -u -c=0, fixes this

TURING-V2 avatar May 08 '22 16:05 TURING-V2

@darix Did you figure out your issue? Or is it still a problem

Blisto91 avatar Jul 11 '22 16:07 Blisto91