Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXVK git - native libraries + Men of War 2 fails to launch #4438

Closed
IAmDunningKrugerIncarnate opened this issue Nov 10, 2024 · 12 comments
Closed

Comments

@IAmDunningKrugerIncarnate

Reproduce: compile latest with ./package-native.sh master /my/built/path --no-package --64-only
Navigate to ~/.local/share/Steam/steamapps/common/Men of War II/
Delete or move the libraries shipped with MoW2, dump the new ones in. Rename to match the old libs.
Start Steam from a terminal and try to run the game.
The game runs with DXVK 2.4.1+ with the above method. Commits from the last couple of days broke

Terminal output:

/usr/include/c++/14/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = VkQueueFamilyProperties; _Alloc = std::allocator<VkQueueFamilyProperties>; const_reference = const VkQueueFamilyProperties&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted

launching with DXVK_LOG_PATH=/some/path DXVK_LOG_LEVEL=debug produces empty logs

System: Tumbleweed, 6.11.5-lqx1-1-liquorix, AMD zen2 3500x, GTX1650 565 drivers, Labwc

@Blisto91
Copy link
Contributor

Can you try with the latest CI build? They are built using the Steam Runtime and i am able to start the game fine with them https://github.com/doitsujin/dxvk/actions/runs/11745801237

@IAmDunningKrugerIncarnate
Copy link
Author

CI build also fails

...
info:  VK_KHR_win32_keyed_mutex
info:    extension supported                    : 0
Segmentation fault
Game Recording - game stopped [gameid=1128860]
...

@IAmDunningKrugerIncarnate
Copy link
Author

I reset to commit 62970d24c30cede50c1f8103506892403489fece -- game runs again
I'll continue recompiling each successive commit until it fails

@IAmDunningKrugerIncarnate
Copy link
Author

This commit is the culprit
9b272fb

@doitsujin
Copy link
Owner

Can you post a full log?

I don't understand why this would break, clearly Vulkan device creation fails and the original error suggests that you run a debug build and that your driver does not expose a graphics queue for some strange reason...

@IAmDunningKrugerIncarnate
Copy link
Author

info:  Game: mow2
info:  DXVK: v2.4.0
info:  Found config file: dxvk.conf
info:  Effective configuration:
info:    d3d11.disableMsaa = True
info:    d3d9.samplerAnisotropy = 0
info:    d3d11.samplerAnisotropy = 0
info:    dxgi.hideNvidiaGpu = True
info:    d3d11.maxTessFactor = 8
info:    dxgi.hideNvkGpu = True
info:    d3d9.presentInterval = 0
info:    dxgi.syncInterval = 0
info:    dxgi.enableHDR = False
info:  Vulkan: Found vkGetInstanceProcAddr in libvulkan.so.1 @ 0x7fd4542a7fc0
info:  Built-in extension providers:
info:    Platform WSI
info:  Enabled instance extensions:
info:    VK_EXT_surface_maintenance1
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_xlib_surface
info:  NVIDIA GeForce GTX 1650:
info:    Driver : NVIDIA 565.57.1
info:    Memory Heap[0]: 
info:      Size: 4096 MiB
info:      Flags: 0x1
info:      Memory Type[1]: Property Flags = 0x1
info:      Memory Type[2]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 11937 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x6
info:      Memory Type[4]: Property Flags = 0xe
info:    Memory Heap[2]: 
info:      Size: 246 MiB
info:      Flags: 0x1
info:      Memory Type[5]: Property Flags = 0x7
warn:  DXGI: Found monitors not associated with any adapter, using fallback
warn:  D3D11DeviceFeatures: Some formats not supported for resource sharing
info:  D3D11InternalCreateDevice: Maximum supported feature level: D3D_FEATURE_LEVEL_12_1
info:  D3D11InternalCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info:  Device properties:
info:    Device : NVIDIA GeForce GTX 1650
info:    Driver : NVIDIA 565.57.1
info:  Enabled device extensions:
info:    VK_EXT_attachment_feedback_loop_layout
info:    VK_EXT_conservative_rasterization
info:    VK_EXT_custom_border_color
info:    VK_EXT_depth_bias_control
info:    VK_EXT_depth_clip_enable
info:    VK_EXT_extended_dynamic_state3
info:    VK_EXT_fragment_shader_interlock
info:    VK_EXT_graphics_pipeline_library
info:    VK_EXT_line_rasterization
info:    VK_EXT_memory_priority
info:    VK_EXT_non_seamless_cube_map
info:    VK_EXT_pageable_device_local_memory
info:    VK_EXT_robustness2
info:    VK_EXT_shader_module_identifier
info:    VK_EXT_swapchain_maintenance1
info:    VK_EXT_transform_feedback
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_maintenance5
info:    VK_KHR_pipeline_library
info:    VK_KHR_present_id
info:    VK_KHR_present_wait
info:    VK_KHR_swapchain
info:    VK_NVX_binary_import
info:    VK_NVX_image_view_handle
info:    VK_NV_descriptor_pool_overallocation
info:    VK_NV_raw_access_chains
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:    wideLines                              : 1
info:    multiViewport                          : 1
info:    samplerAnisotropy                      : 1
info:    textureCompressionBC                   : 1
info:    occlusionQueryPrecise                  : 1
info:    pipelineStatisticsQuery                : 1
info:    vertexPipelineStoresAndAtomics         : 1
info:    fragmentStoresAndAtomics               : 1
info:    shaderImageGatherExtended              : 1
info:    shaderClipDistance                     : 1
info:    shaderCullDistance                     : 1
info:    shaderFloat64                          : 1
info:    shaderInt64                            : 1
info:    variableMultisampleRate                : 1
info:    shaderResourceResidency                : 1
info:    shaderResourceMinLod                   : 1
info:    sparseBinding                          : 1
info:    sparseResidencyBuffer                  : 1
info:    sparseResidencyImage2D                 : 1
info:    sparseResidencyImage3D                 : 1
info:    sparseResidency2Samples                : 1
info:    sparseResidency4Samples                : 1
info:    sparseResidency8Samples                : 1
info:    sparseResidency16Samples               : 1
info:    sparseResidencyAliased                 : 1
info:  Vulkan 1.1
info:    shaderDrawParameters                   : 1
info:  Vulkan 1.2
info:    samplerMirrorClampToEdge               : 1
info:    drawIndirectCount                      : 1
info:    samplerFilterMinmax                    : 1
info:    hostQueryReset                         : 1
info:    timelineSemaphore                      : 1
info:    bufferDeviceAddress                    : 1
info:    shaderOutputViewportIndex              : 1
info:    shaderOutputLayer                      : 1
info:    vulkanMemoryModel                      : 1
info:  Vulkan 1.3
info:    robustImageAccess                      : 0
info:    pipelineCreationCacheControl           : 1
info:    shaderDemoteToHelperInvocation         : 1
info:    shaderZeroInitializeWorkgroupMemory    : 0
info:    synchronization2                       : 1
info:    dynamicRendering                       : 1
info:  VK_AMD_shader_fragment_mask
info:    extension supported                    : 0
info:  VK_EXT_attachment_feedback_loop_layout
info:    attachmentFeedbackLoopLayout           : 0
info:  VK_EXT_conservative_rasterization
info:    extension supported                    : 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_depth_bias_control
info:    depthBiasControl                       : 1
info:    leastRepresentableValueForceUnormRepresentation : 1
info:    floatRepresentation                    : 0
info:    depthBiasExact                         : 1
info:  VK_EXT_extended_dynamic_state3
info:    extDynamicState3AlphaToCoverageEnable  : 1
info:    extDynamicState3DepthClipEnable        : 1
info:    extDynamicState3RasterizationSamples   : 1
info:    extDynamicState3SampleMask             : 1
info:    extDynamicState3LineRasterizationMode  : 1
info:  VK_EXT_fragment_shader_interlock
info:    fragmentShaderSampleInterlock          : 1
info:    fragmentShaderPixelInterlock           : 1
info:  VK_EXT_full_screen_exclusive
info:    extension supported                    : 0
info:  VK_EXT_graphics_pipeline_library
info:    graphicsPipelineLibrary                : 1
info:  VK_EXT_line_rasterization
info:    rectangularLines                       : 1
info:    smoothLines                            : 1
info:  VK_EXT_memory_budget
info:    extension supported                    : 1
info:  VK_EXT_memory_priority
info:    memoryPriority                         : 1
info:  VK_EXT_non_seamless_cube_map
info:    nonSeamlessCubeMap                     : 0
info:  VK_EXT_pageable_device_local_memory
info:    pageableDeviceLocalMemory              : 1
info:  VK_EXT_robustness2
info:    robustBufferAccess2                    : 1
info:    robustImageAccess2                     : 1
info:    nullDescriptor                         : 1
info:  VK_EXT_shader_module_identifier
info:    shaderModuleIdentifier                 : 1
info:  VK_EXT_shader_stencil_export
info:    extension supported                    : 0
info:  VK_EXT_swapchain_colorspace
info:    extension supported                    : 0
info:  VK_EXT_swapchain_maintenance1
info:    swapchainMaintenance1                  : 1
info:  VK_EXT_hdr_metadata
info:    extension supported                    : 0
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_external_memory_win32
info:    extension supported                    : 0
info:  VK_KHR_external_semaphore_win32
info:    extension supported                    : 0
info:  VK_KHR_maintenance5
info:    maintenance5                           : 1
info:  VK_KHR_present_id
info:    presentId                              : 1
info:  VK_KHR_present_wait
info:    presentWait                            : 1
info:  VK_NV_descriptor_pool_overallocation
info:    descriptorPoolOverallocation           : 1
info:  VK_NV_raw_access_chains
info:    shaderRawAccessChains                  : 1
info:  VK_NVX_binary_import
info:    extension supported                    : 1
info:  VK_NVX_image_view_handle
info:    extension supported                    : 1
info:  VK_KHR_win32_keyed_mutex
info:    extension supported                    : 0
/usr/include/c++/14/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = VkQueueFamilyProperties; _Alloc = std::allocator<VkQueueFamilyProperties>; const_reference = const VkQueueFamilyProperties&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted

@doitsujin
Copy link
Owner

info: Game: mow2
info: DXVK: v2.4.0

Uuuuh, are you using an outdated DXGI together with a custom D3D11 (or vice versa)? That would certainly explain this particular problem since they need to be kept in sync.

@IAmDunningKrugerIncarnate
Copy link
Author

The game ships with libdxvk_d3d11.so and libdxvk_dxgi.so. I replace those 2 everytime I run a test

@Blisto91
Copy link
Contributor

Think the issue here is that the game wants to use the libdxvk_dxgi.so.0 file that the game also ships with and bugs out if it is missing. If you rename the main dxgi file to that i assume it will work for you.
The reason why i didn't reproduce above is because i usually just delete all the d3d11 and dxgi files the game ship with and then extract all of the d3d11 and dxgi from the CI or release archive (6 in total). Since both *.so and *.so.0 then symlink to *.so.0.20401 it doesn't matter if the game prefers .so or .so.0

@IAmDunningKrugerIncarnate
Copy link
Author

Think the issue here is that the game wants to use the libdxvk_dxgi.so.0 file that the game also ships with and bugs out if it is missing. If you rename the main dxgi file to that i assume it will work for you. The reason why i didn't reproduce above is because i usually just delete all the d3d11 and dxgi files the game ship with and then extract all of the d3d11 and dxgi from the CI or release archive (6 in total). Since both *.so and *.so.0 then symlink to *.so.0.20401 it doesn't matter if the game prefers .so or .so.0

you are correct. renaming the library to libdxvk_dxgi.so.0 fixes the issue
Whelp. I am my name. I am deeply sorry for the goose chase.

@Blisto91
Copy link
Contributor

Blisto91 commented Nov 10, 2024

No problem. We were confused a bit ourselves for a moment here.
Doing a it of poking by running the game with LD_DEBUG=libs %command% i can see in terminal that the Steam runtime will try to fall back on a provided file in case the one the game wants to use isn't there in its folder.
Relevant output:

    104882:     find library=libdxvk_dxgi.so.0 [0]; searching
    104882:      search path=/home/blisto/.local/share/Steam/steamapps/common/Men of War II:/usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/aliases:/usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu/aliases              (LD_LIBRARY_PATH)
    104882:       trying file=/home/blisto/.local/share/Steam/steamapps/common/Men of War II/libdxvk_dxgi.so.0
    104882:       trying file=/usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/aliases/libdxvk_dxgi.so.0
    104882:       trying file=/usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu/aliases/libdxvk_dxgi.so.0
    104882:      search cache=/etc/ld.so.cache
    104882:       trying file=/lib/x86_64-linux-gnu/libdxvk_dxgi.so.0
...
    104882:     calling init: /lib/x86_64-linux-gnu/libdxvk_dxgi.so.0
...
    104882:     calling init: /home/blisto/.local/share/Steam/steamapps/common/Men of War II/libdxvk_d3d11.so

Note that /lib/x86_64-linux-gnu/ where it finds it is the path relative to the runtime container, so not from your regular system root. The runtime containers reside in /proc/$game_pid/root/ which right now for me would be the full system path of /proc/105664/root/lib/x86_64-linux-gnu/ as my current running game instance have a pid of 105664

@IAmDunningKrugerIncarnate
Copy link
Author

Thank you for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants