protonscr

Game crashed with `vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache`

vkd3dopen
HansKristian-Work/vkd3d-proton#2403 · opened 2025-03-17 by Eroge-Newton · updated 2025-03-17 · 5 comments · github
EEroge-Newton 2025-03-17 github

Game crashed with vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache

the args i tried:

export VKD3D_CONFIG=vk_debug # dxr, nodxr, vk_debug
export DXVK_FILTER_DEVICE_NAME="NVIDIA GeForce" 
export VKD3D_FEATURE_LEVEL=12_2 
export VKD3D_SHADER_MODEL=6_6 
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json 
export VKD3D_CONFIG=pipeline_library_app_cache 
export VKD3D_SHADER_CACHE_PATH=0 

Software information

Game: Skyrim SE 1.6.1170 with ENB Frame Generation

System information

  • GPU: Nvidia RTX 3060
  • Driver: 570.124.4
  • Wine version: 10.3-stagging
  • VKD3D-Proton version: 2.14.1

Log files

wine log with vkd3d-proton:


 info:vkd3d-proton:vkd3d_instance_apply_application_workarounds: Program name: "SkyrimSE.exe" (hash: xxxxxxxxxx)
 info:vkd3d-proton:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
 info:vkd3d-proton:vkd3d_config_flags_init_once: VKD3D_CONFIG=''.
 info:vkd3d-proton:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.14.1.
 info:vkd3d-proton:vkd3d_instance_init: vkd3d-proton - build: xxxxxxxxxxxxx.
 info:vkd3d-proton:vkd3d_memory_info_decide_hvv_usage: Topology: No more than 1 device local heap, HVV access is viable.
 info:vkd3d-proton:vkd3d_memory_info_upload_hvv_memory_properties: Topology: largest device local heap is too small (8585740288 bytes) for effective ReBAR.
 info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Enabling fast paths for advanced ExecuteIndirect() graphics and compute (EXT_dgc).
 info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
 info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
 info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
 info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
 info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
 info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.7.
 info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.8.
 fixme:vkd3d-proton:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2304, may be inaccurate.
 info:vkd3d-proton:d3d12_device_determine_ray_tracing_tier: DXR support enabled.
 info:vkd3d-proton:d3d12_device_determine_ray_tracing_tier: DXR 1.1 support enabled.
 info:vkd3d-proton:d3d12_device_caps_init_feature_level: DX Ultimate supported!
 info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
 info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
 info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
 err:vkd3d-proton:vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache.write.
 info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
 info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 1.042 ms.
 fixme:vkd3d-proton:d3d12_command_queue_init: Ignoring priority 0x64.
 err:vkd3d-proton:vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache.
 info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Failed to map read-only cache: vkd3d-proton.cache.
 info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
 info:vkd3d-proton:dxgi_vk_swap_chain_init: Creating swapchain (2560 x 1600), BufferCount = 3.
 nfo:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
 info:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
 info:vkd3d-proton:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
 info:vkd3d-proton:dxgi_vk_swap_chain_init_sleep_state: Timer interval is 1.0 ms.
 fixme:vkd3d-proton:d3d12_command_queue_init: Ignoring priority 0x64.
warn:  CreateDXGIFactory2: Ignoring flags
----- long long long `info` about Nvidia GPU------
 info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
 fixme:vkd3d-proton:d3d12_device_CreateFence: Shared fences not supported by Vulkan host, returning regular fence.
 fixme:vkd3d-proton:d3d12_fence_init: Ignoring flags 0x1.
EEroge-Newton 2025-03-17 github

I will get that if no args or env about vkd3d

info:  Memory type mask for sparse resources: 0x2
info:  Memory type mask for buffer resources: 0x1f, usage: 0x219ff
info:  DXVK: Read 5 valid state cache entries
info:  DXVK: Graphics pipeline libraries supported
info:  DXGI: Hiding actual GPU, reporting vendor ID 0x1002, device ID 73df
6875.371:0304:0308:info:vkd3d-proton:vkd3d_instance_apply_application_workarounds: Program name: "SkyrimSE.exe" (hash: xxxxxxxxx)
6875.371:0304:0308:info:vkd3d-proton:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
6875.371:0304:0308:info:vkd3d-proton:vkd3d_config_flags_init_once: VKD3D_CONFIG=''.
6875.373:0304:0308:info:vkd3d-proton:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.14.1.
6875.373:0304:0308:info:vkd3d-proton:vkd3d_instance_init: vkd3d-proton - build: 0d66699b1b1e250.
6876.073:0304:0308:info:vkd3d-proton:vkd3d_memory_info_decide_hvv_usage: Topology: No more than 1 device local heap, HVV access is viable.
6876.073:0304:0308:info:vkd3d-proton:vkd3d_memory_info_upload_hvv_memory_properties: Topology: largest device local heap is too small (8585740288 bytes) for effective ReBAR.
6876.074:0304:0308:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Enabling fast paths for advanced ExecuteIndirect() graphics and compute (EXT_dgc).
6876.074:0304:0308:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
6876.074:0304:0308:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
6876.074:0304:0308:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
6876.074:0304:0308:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.7.
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.8.
6876.282:0304:0308:fixme:vkd3d-proton:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2304, may be inaccurate.
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_determine_ray_tracing_tier: DXR support enabled.
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_determine_ray_tracing_tier: DXR 1.1 support enabled.
6876.282:0304:0308:info:vkd3d-proton:d3d12_device_caps_init_feature_level: DX Ultimate supported!
6876.283:0304:0308:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
6876.283:0304:0308:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
6876.285:0304:0308:fixme:vkd3d-proton:d3d12_command_queue_init: Ignoring priority 0x64.
6876.285:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
6876.286:0304:0308:info:vkd3d-proton:dxgi_vk_swap_chain_init: Creating swapchain (2560 x 1600), BufferCount = 3.
6876.286:0304:0364:err:vkd3d-proton:vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache.write.
6876.286:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
6876.286:0304:0308:info:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
6876.286:0304:0308:info:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
6876.287:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 1.431 ms.
6876.287:0304:0364:err:vkd3d-proton:vkd3d_file_map_read_only: Failed to MapViewOfFile for vkd3d-proton.cache.
6876.287:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Failed to map read-only cache: vkd3d-proton.cache.
6876.287:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
6876.290:0304:0308:info:vkd3d-proton:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
6876.290:0304:0308:info:vkd3d-proton:dxgi_vk_swap_chain_init_sleep_state: Timer interval is 1.0 ms.
6876.293:0304:0308:fixme:vkd3d-proton:d3d12_command_queue_init: Ignoring priority 0x64.
6876.375:0304:0364:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
6877.114:0304:0308:fixme:vkd3d-proton:d3d12_device_CreateFence: Shared fences not supported by Vulkan host, returning regular fence.
6877.114:0304:0308:fixme:vkd3d-proton:d3d12_fence_init: Ignoring flags 0x1.
BBlisto91 2025-03-17 github

Doesn't this require shared resources since the game is d3d11 but ENB Frame Generation uses d3d12? If yes then it won't work with regular Wine.
Does it work with Proton?

EEroge-Newton 2025-03-17 github

Doesn't this require shared resources since the game is d3d11 but ENB Frame Generation uses d3d12? If yes then it won't work with regular Wine. Does it work with Proton?

Shared resources? I don't know much about DirectX, so I'm not sure. Are there any parameters or methods to test this?

The only thing I got was the game can run by wine-cachyos without any change. (I don't use Proton)

BBlisto91 2025-03-17 github

Can you attach a log with the output from wine-cachyos?

Edit: You mean that it works correctly with wine-cachyos right?

HHansKristian-Work maintainer 2025-03-17 github

6877.114:0304:0308:fixme:vkd3d-proton:d3d12_device_CreateFence: Shared fences not supported by Vulkan host, returning regular fence.

You'll have to use Proton. Normal Wine does not support the shared resource stuff, so a crash is expected and the title message is a red herring.