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

Crash with DLSS Enabled in Star Citizen #174

Open
etgbrown opened this issue May 25, 2024 · 37 comments
Open

Crash with DLSS Enabled in Star Citizen #174

etgbrown opened this issue May 25, 2024 · 37 comments

Comments

@etgbrown
Copy link

I've been experiencing crashes in Star Citizen whenever I enable DLSS since it was added in the 3.23 patch.

This stood out a bit from the log:

Unknown Function IDs:

NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID

Application Profile Not Found:

There are repeated messages about the application profile for Star Citizen not being found? It appears to hit the log 5 times when the application crashes.

NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found

Also getting this missing settings line a few times

NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found

Any help or pointers on how to fix this would be much appreciated!

Thanks!

Here is my system info:

NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5

       _,met$$$$$gg.          
    ,g$$$$$$$$$$$$$$$P.      
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) x86_64 
 ,$$P'              `$$$.     Kernel: 6.1.0-21-amd64 
',$$P       ,ggs.     `$$b:   Uptime: 55 mins 
`d$$'     ,$P"'   .    $$$    Packages: 2571 (dpkg), 9 (flatpak) 
 $$P      d$'     ,    $$P    Shell: bash 5.2.15 
 $$:      $$.   -    ,d$$'    Resolution: 3840x2160 
 $$;      Y$b._   _,d$P'      DE: Plasma 5.27.5 
 Y$$.    `.`"Y$$$$P"'         WM: KWin 
 `$$b      "-.__              Theme: [Plasma], Breeze [GTK2/3] 
  `Y$$                        Icons: [Plasma], Vivid-Dark-Icons [GTK2/3] 
   `Y$$.                      Terminal: konsole 
     `$$b.                    CPU: AMD Ryzen 7 3700X (16) @ 4.050GHz 
       `Y$$b.                 GPU: NVIDIA GeForce RTX 3080 Ti 
          `"Y$b._             Memory: 6056MiB / 31999MiB 
              `"""
@etgbrown
Copy link
Author

Game.log

@etgbrown
Copy link
Author

Running under Proton, that version included 0.64, although I have switched to wine-ge-8-26-x86_64 which allows 0.70 to be utilized. The same issue is reproduced

dxvk-nvapi.log

@SveSop
Copy link
Contributor

SveSop commented May 25, 2024

The two "unknown function id's" are afaik for debugging purposes and not really used.

As to the "DRS" settings, it would probably not mean anything other than a "profile is not found". I do not know if this game NEEDS a particular profile tho, but meh.

Unsure if the game uses DX11, 12 or Vulkan tho? Can you "select renderer" or something like that?

@jp7677
Copy link
Owner

jp7677 commented May 26, 2024

Thanks for the report. Could you try the build from this PR? #178

The log says:

NvAPI_QueryInterface NvAPI_GetLogicalGPUFromDisplay: Not implemented method
NvAPI_GetPhysicalGPUsFromLogicalGPU: Expected logical GPU handle

This might actually be interesting. That said, this is quite early in the logs, so also likely completely unrelated to DLSS.

@etgbrown
Copy link
Author

Thanks for the report. Could you try the build from this PR? #178

The log says:

NvAPI_QueryInterface NvAPI_GetLogicalGPUFromDisplay: Not implemented method
NvAPI_GetPhysicalGPUsFromLogicalGPU: Expected logical GPU handle

This might actually be interesting. That said, this is quite early in the logs, so also likely completely unrelated to DLSS.

The build from #178 appears to have the same issue, but those two items you referenced have changed, I have the log below.

Details

---------- 2024-05-26 12:39:31 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-26 12:39:32 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: No implementation
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found

@etgbrown
Copy link
Author

The two "unknown function id's" are afaik for debugging purposes and not really used.

As to the "DRS" settings, it would probably not mean anything other than a "profile is not found". I do not know if this game NEEDS a particular profile tho, but meh.

Unsure if the game uses DX11, 12 or Vulkan tho? Can you "select renderer" or something like that?

The game uses DX11 and Vulkan, currently when you switch to Vulkan, you must set WINE_HIDE_NVIDIA_GPU=1 otherwise the game crashes when you attempt to launch it. When that is set, DLSS is not available to enable.

@jp7677
Copy link
Owner

jp7677 commented May 26, 2024

The build from #178 appears to have the same issue, but those two items you referenced have changed, I have the log below.

Thanks for the fast response. Looks like it goes further and starts querying GPU info. What happens if you add https://github.com/Saancreed/wine-nvml in your prefix together with the nvapi version from above PR? You should see a statement in the DXVK-NVAPI logs when NVML has been found and loaded.

@etgbrown
Copy link
Author

The build from #178 appears to have the same issue, but those two items you referenced have changed, I have the log below.

Thanks for the fast response. Looks like it goes further and starts querying GPU info. What happens if you add https://github.com/Saancreed/wine-nvml in your prefix together with the nvapi version from above PR? You should see a statement in the DXVK-NVAPI logs when NVML has been found and loaded.

I was able to add it into the prefix, and it appears to initialize correctly however the rest of the log appears to be the same.

Details

---------- 2024-05-26 14:07:01 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-26 14:07:02 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found

@etgbrown
Copy link
Author

What is also odd to me, is that before I attempt to enable DLSS, the log looks like the following:

Details

---------- 2024-05-26 14:21:18 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-26 14:21:19 ----------
DXVK-NVAPI v0.7.0-15-g4de06ab (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found

However, as soon as I enable DLSS, these items seem to trigger as soon as DLSS is selected:

Details

NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found

Could it be possible that Star Citizen is expecting an application profile and attempts to query it several times and crashes when a profile is unable to be identified/provided?

@jp7677
Copy link
Owner

jp7677 commented May 26, 2024

Could it be possible that Star Citizen is expecting an application profile and attempts to query it several times and crashes when a profile is unable to be identified/provided?

Let's find out. I've added a second commit that let's that method succeed.

@etgbrown
Copy link
Author

Could it be possible that Star Citizen is expecting an application profile and attempts to query it several times and crashes when a profile is unable to be identified/provided?

Let's find out. I've added a second commit that let's that method succeed.

I've tested that- it appears that now it can find the game, it's looping on not being able to find settings just before/during the crash.

Log goes from this before enabling DLSS:

Details

---------- 2024-05-26 15:35:25 ----------
DXVK-NVAPI v0.7.0-16-g14142ed (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-26 15:35:26 ----------
DXVK-NVAPI v0.7.0-16-g14142ed (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): OK
NvAPI_QueryInterface NvAPI_DRS_GetProfileInfo: Not implemented method
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found

To this:

Details

---------- 2024-05-26 15:35:25 ----------
DXVK-NVAPI v0.7.0-16-g14142ed (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-26 15:35:26 ----------
DXVK-NVAPI v0.7.0-16-g14142ed (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): OK
NvAPI_QueryInterface NvAPI_DRS_GetProfileInfo: Not implemented method
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): OK
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10afb76a/Unknown): Setting not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10afb76c/Unknown): Setting not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10e41df4/Unknown): Setting not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10e41df5/Unknown): Setting not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): OK
NvAPI_DRS_GetSetting (0x10e41df3/Unknown): Setting not found

@jp7677
Copy link
Owner

jp7677 commented May 26, 2024

Thanks. It is not looping, but trying to read different settings (the setting-id is always a new one). Considering that it doesn't stop after the first settings, I think the game handles not existing settings (or not existing profiles) just fine.

I don't know what comes after this and tbh no idea what causes the crash based on the game log. Is there a way to increase the log level for the game log itself?
The nvapi logs look good now, my guess would be that the issue is somewhere else in the stack. Sorry.

@SveSop
Copy link
Contributor

SveSop commented May 28, 2024

I see there is a "play for free until 29/5" thingy on the SC site, so i will try to download the game and see if i can get it running.

@SveSop
Copy link
Contributor

SveSop commented May 28, 2024

Well.. After the couple of hours of fun downloading and actually getting this to run at all, atleast i can confirm the same issue.. So the report is atleast "valid" 😏

Anyho.. The probably unrelated stuff first:
The driver version seems to be all wonky for some strange reason.. It did start of throwing some warning about me having too old driver, but that seemed to randomly go away. (Suspect garbage data is the cause...)
D3D Adapter: Driver version (UMD): 32767.65535.65535.65535
The next few lines is probably not overly important as this does not show up without nvml:

GPU: Architecture =
GPU: Compute Core Count = 2304
GPU: Core Clock MHz = 0
Memory Clock MHz = 0

I would claim that the DRS stuff is not important... And that kind of leave us with this:

NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK

Yeah.. i removed the "alreadylogged" thingy to see how many calls it was.. But for all i know it could be fairly reasonable to call this thing 3 times.

This atleast is used by DLSS me thinks.. and from various other reports it can also be used with some sort of cuda function, but i see no attempt to load nvcuda.dll in the log, so not sure whats up with that. The "FatbinPTX" is as far as i would think for cuda tho, so it could possibly try to set up some cuda PTX kernel maybe? Will continue to hack around a bit more with this, but it is a horrible thunderstorm outside atm, so not overly eager to spend time in front of the PC 🫨

@jp7677
Copy link
Owner

jp7677 commented May 28, 2024

@etgbrown @SveSop Could you please try this PR? #179 While looking into some trivial pre-checks, we found something potentially interesting.

@SveSop Good luck with the weather conditions!

@Saancreed
Copy link
Collaborator

Saancreed commented May 28, 2024

Also, if you guys happen to have an opportunity to do so, can you get me a log with standard Proton logging channels enabled? So PROTON_LOG=1 with Proton or WINEDEBUG=+timestamp,+pid,+tid,+seh,+unwind,+threadname,+debugstr,+loaddll and DXVK_NVAPI_LOG_LEVEL=info otherwise.

And while you're at it, I would also be interested in the a log made with Vulkan renderer and without WINE_HIDE_NVIDIA_GPU=1 because I'm curious why exposing NV vendor to Vulkan renderer is a problem. For this one use either PROTON_LOG=+vulkan or WINEDEBUG=+timestamp,+pid,+tid,+seh,+unwind,+threadname,+debugstr,+loaddll,+vulkan and DXVK_NVAPI_LOG_LEVEL=info.

This atleast is used by DLSS me thinks.. and from various other reports it can also be used with some sort of cuda function, but i see no attempt to load nvcuda.dll in the log, so not sure whats up with that. The "FatbinPTX" is as far as i would think for cuda tho, so it could possibly try to set up some cuda PTX kernel maybe? Will continue to hack around a bit more with this, but it is a horrible thunderstorm outside atm, so not overly eager to spend time in front of the PC 🫨

@SveSop It's like this because DLSS is pretty much CUDA in disguise in the middle of D3D or Vulkan pipeline, only the driver APIs accessed here are not those exposed by nvcuda.dll / libcuda.so but standard Vulkan (vendor) extensions, namely VK_NVX_binary_import that's used by DXVK and vkd3d-proton under the hood and VK_NV_cuda_kernel_launch which is a newer and better documented alternative:

This extension targets deployment of existing CUDA kernels via Vulkan, with a way to directly upload PTX kernels and dispatch the kernels from Vulkan’s command buffer without the need to use interoperability between the Vulkan and CUDA contexts.

@etgbrown
Copy link
Author

@etgbrown @SveSop Could you please try this PR? #179 While looking into some trivial pre-checks, we found something potentially interesting.

@SveSop Good luck with the weather conditions!

Here is the log from running that PR:

Details

---------- 2024-05-28 19:14:39 ----------
DXVK-NVAPI v0.7.0-17-gb644165 (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
---------- 2024-05-28 19:14:40 ----------
DXVK-NVAPI v0.7.0-17-gb644165 (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x4a7c4000
Successfully loaded nvml.dll
NVML loaded and initialized successfully
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_GetLogicalGPUFromDisplay: OK
NvAPI_GetPhysicalGPUsFromLogicalGPU: OK
NvAPI_GPU_GetGpuCoreCount: OK
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found

@etgbrown
Copy link
Author

etgbrown commented May 29, 2024

@Saancreed I have the log from Proton with Vulkan attached
steam-default.log

Here is the Proton log with DirectX 11:

Details

======================
Proton: 1714418284 proton-9.0-1
SteamGameId: default
Command: ['/home/etgbrown/Games/star-citizen/drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe']
Options: {'forcelgadd'}
depot: 0.20240125.75305
pressure-vessel: 0.20240125.0 scout
scripts: 0.20240125.0
sniper: 0.20240125.75305 sniper 0.20240125.75305
Kernel: Linux 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64
Language: LC_ALL None, LC_MESSAGES None, LC_CTYPE None
System WINEDLLOVERRIDES: libglesv2=b;d3d10core,d3d11,d3d12,d3d12core,d3d9,d3dcompiler_33,d3dcompiler_34,d3dcompiler_35,d3dcompiler_36,d3dcompiler_37,d3dcompiler_38,d3dcompiler_39,d3dcompiler_40,d3dcompiler_41,d3dcompiler_42,d3dcompiler_43,d3dcompiler_46,d3dcompiler_47,d3dx10,d3dx10_33,d3dx10_34,d3dx10_35,d3dx10_36,d3dx10_37,d3dx10_38,d3dx10_39,d3dx10_40,d3dx10_41,d3dx10_42,d3dx10_43,d3dx11_42,d3dx11_43,d3dx9_24,d3dx9_25,d3dx9_26,d3dx9_27,d3dx9_28,d3dx9_29,d3dx9_30,d3dx9_31,d3dx9_32,d3dx9_33,d3dx9_34,d3dx9_35,d3dx9_36,d3dx9_37,d3dx9_38,d3dx9_39,d3dx9_40,d3dx9_41,d3dx9_42,d3dx9_43,dxgi,nvapi=n;winemenubuilder=
Effective WINEDLLOVERRIDES: libglesv2=b;d3d10core,d3d11,d3d12,d3d12core,d3d9,d3dcompiler_33,d3dcompiler_34,d3dcompiler_35,d3dcompiler_36,d3dcompiler_37,d3dcompiler_38,d3dcompiler_39,d3dcompiler_40,d3dcompiler_41,d3dcompiler_42,d3dcompiler_43,d3dcompiler_46,d3dcompiler_47,d3dx10,d3dx10_33,d3dx10_34,d3dx10_35,d3dx10_36,d3dx10_37,d3dx10_38,d3dx10_39,d3dx10_40,d3dx10_41,d3dx10_42,d3dx10_43,d3dx11_42,d3dx11_43,d3dx9_24,d3dx9_25,d3dx9_26,d3dx9_27,d3dx9_28,d3dx9_29,d3dx9_30,d3dx9_31,d3dx9_32,d3dx9_33,d3dx9_34,d3dx9_35,d3dx9_36,d3dx9_37,d3dx9_38,d3dx9_39,d3dx9_40,d3dx9_41,d3dx9_42,d3dx9_43,dxgi,nvapi=n;winemenubuilder=
System WINEDEBUG: -all
Effective WINEDEBUG: -all
======================
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
fsync: up and running.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API FAIL] SteamAPI_Init() failed
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
DXVK_NVAPI_LOG_PATH is set to '/home/etgbrown/Desktop/', appending log statements to /home/etgbrown/Desktop/dxvk-nvapi.log
DXVK-NVAPI proton-9.0-1 (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x6ffffc60cec0
Loading nvml.dll failed with error code: 1114
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_Unload: OK
DXVK_NVAPI_LOG_PATH is set to '/home/etgbrown/Desktop/', appending log statements to /home/etgbrown/Desktop/dxvk-nvapi.log
DXVK-NVAPI proton-9.0-1 (StarCitizen.exe)
Successfully acquired Vulkan vkGetInstanceProcAddr @ 0x6ffffc60cec0
Loading nvml.dll failed with error code: 1114
NvAPI Device: NVIDIA GeForce RTX 3080 Ti (555.42.2)
NvAPI Output: \\.\DISPLAY1
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_GetDisplayDriverVersion: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_EnumNvidiaDisplayHandle (0): OK
NvAPI_EnumNvidiaDisplayHandle (1): End enumeration
NvAPI_D3D_GetCurrentSLIState: OK
NvAPI_QueryInterface NvAPI_GetLogicalGPUFromDisplay: Not implemented method
NvAPI_GetPhysicalGPUsFromLogicalGPU: Expected logical GPU handle
NvAPI_QueryInterface (0xad298d3f): Unknown function ID
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_QueryInterface (0xf2400ab): Unknown function ID
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_GetSetting (0x10afb764/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_QueryInterface (0xa782ea46): Unknown function ID
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_Initialize: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_DRS_GetSetting (0x10e41df2/Unknown): Setting not found
NvAPI_GPU_GetArchInfo: OK
NvAPI_SYS_GetDriverAndBranchVersion: OK
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_FindApplicationByName (C:\Program Files\Roberts Space Industries\StarCitizen\LIVE\Bin64\StarCitizen.exe): Executable not found
NvAPI_DRS_DestroySession: OK
NvAPI_DRS_GetSetting (0x10afb76b/Unknown): Setting not found
NvAPI_DRS_CreateSession: OK
NvAPI_DRS_LoadSettings: OK
NvAPI_DRS_GetBaseProfile: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_D3D11_CreateSamplerState: OK
NvAPI_D3D11_IsFatbinPTXSupported: OK
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
NvAPI_DRS_FindApplicationByName (StarCitizen.exe): Executable not found
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[00000868:] EXCEPTION handling: System.ArgumentException: The requested FontFamily could not be found [GDI+ status: FontFamilyNotFound]

@Saancreed
Copy link
Collaborator

@etgbrown Okay, although your log is not as detailed as I was hoping it to be because you have WINEDEBUG=-all set somewhere globally, I can tell from your log why DLSS (or Vulkan renderer) is not working: attempts to create Vulkan devices with VK_NVX_binary_import and VK_NVX_image_view_handle extensions which are required for DLSS to work fail. Notice this:

0558:trace:vulkan:thunk64_vkCreateDevice 0x29d7a8, 0x3840176e9a0, (nil), 0x3840176e7f0
0558:trace:vulkan:wine_vkCreateDevice Device name: "NVIDIA GeForce RTX 3080 Ti".
0558:trace:vulkan:wine_vkCreateDevice Vendor ID: 0x10de, Device ID: 0x2208.
0558:trace:vulkan:wine_vkCreateDevice Driver version: 0x8aca8080.
0558:trace:vulkan:wine_vk_device_convert_create_info Enabled 25 extensions.
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 0: "VK_EXT_attachment_feedback_loop_layout".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 1: "VK_EXT_conservative_rasterization".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 2: "VK_EXT_custom_border_color".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 3: "VK_EXT_depth_bias_control".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 4: "VK_EXT_depth_clip_enable".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 5: "VK_EXT_extended_dynamic_state3".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 6: "VK_EXT_fragment_shader_interlock".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 7: "VK_EXT_graphics_pipeline_library".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 8: "VK_EXT_memory_priority".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 9: "VK_EXT_non_seamless_cube_map".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 10: "VK_EXT_robustness2".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 11: "VK_EXT_shader_module_identifier".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 12: "VK_EXT_swapchain_maintenance1".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 13: "VK_EXT_transform_feedback".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 14: "VK_EXT_vertex_attribute_divisor".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 15: "VK_KHR_external_memory_win32".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 16: "VK_KHR_external_semaphore_win32".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 17: "VK_KHR_maintenance5".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 18: "VK_KHR_pipeline_library".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 19: "VK_KHR_present_id".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 20: "VK_KHR_present_wait".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 21: "VK_KHR_swapchain".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 22: "VK_KHR_win32_keyed_mutex".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 23: "VK_NVX_binary_import".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 24: "VK_NVX_image_view_handle".
0558:warn:vulkan:wine_vkCreateDevice Failed to create device, res=-3.

This is the first device created by the launcher using DXVK. It fails, for which DXVK is actually prepared: https://github.com/doitsujin/dxvk/blob/7df8017e46692e972c710435261950c941b03acd/src/dxvk/dxvk_adapter.cpp#L483-L499

So immediately after we can see DXVK retry, but this time without NVX extension, so without DLSS support:

0558:trace:vulkan:thunk64_vkCreateDevice 0x29d7a8, 0x3840176e9a0, (nil), 0x3840176e7f0
0558:trace:vulkan:wine_vkCreateDevice Device name: "NVIDIA GeForce RTX 3080 Ti".
0558:trace:vulkan:wine_vkCreateDevice Vendor ID: 0x10de, Device ID: 0x2208.
0558:trace:vulkan:wine_vkCreateDevice Driver version: 0x8aca8080.
0558:trace:vulkan:wine_vk_device_convert_create_info Enabled 23 extensions.
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 0: "VK_EXT_attachment_feedback_loop_layout".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 1: "VK_EXT_conservative_rasterization".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 2: "VK_EXT_custom_border_color".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 3: "VK_EXT_depth_bias_control".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 4: "VK_EXT_depth_clip_enable".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 5: "VK_EXT_extended_dynamic_state3".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 6: "VK_EXT_fragment_shader_interlock".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 7: "VK_EXT_graphics_pipeline_library".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 8: "VK_EXT_memory_priority".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 9: "VK_EXT_non_seamless_cube_map".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 10: "VK_EXT_robustness2".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 11: "VK_EXT_shader_module_identifier".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 12: "VK_EXT_swapchain_maintenance1".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 13: "VK_EXT_transform_feedback".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 14: "VK_EXT_vertex_attribute_divisor".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 15: "VK_KHR_external_memory_win32".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 16: "VK_KHR_external_semaphore_win32".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 17: "VK_KHR_maintenance5".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 18: "VK_KHR_pipeline_library".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 19: "VK_KHR_present_id".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 20: "VK_KHR_present_wait".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 21: "VK_KHR_swapchain".
0558:trace:vulkan:wine_vk_device_convert_create_info Extension 22: "VK_KHR_win32_keyed_mutex".
0558:trace:vulkan:X11DRV_vkGetDeviceProcAddr 0x7f98d80ef870, "vkAcquireNextImage2KHR"
…
0558:trace:vulkan:X11DRV_vkGetDeviceProcAddr 0x7f98d80ef870, "wine_vkReleaseKeyedMutex"
0558:trace:vulkan:wine_vkCreateDevice Not found 'wine_vkReleaseKeyedMutex'.
0558:trace:vulkan:wine_vkCreateDevice Queue family index 1, queue count 1.
0558:trace:vulkan:wine_vk_device_get_queues Got device 0x7f98d80fbdd0 queue 0x7f98d8614b70, host_queue 0x7f98d844fad0.
0558:trace:vulkan:wine_vkCreateDevice Queue family index 0, queue count 1.
0558:trace:vulkan:wine_vk_device_get_queues Got device 0x7f98d80fbdd0 queue 0x7f98d8614bb8, host_queue 0x7f98d8107f30.
0558:trace:vulkan:wine_vkCreateDevice Created device 0x7f98d80fbdd0, host_device 0x7f98d80ef870.

And this time it succeeds. When later the itself game attempts to run, it asks DLSS SDK for extensions it should enable, DLSS replies "please enable VK_KHR_push_descriptor, VK_NVX_binary_import and VK_NVX_image_view_handle" and when the game tries to create a device with those extension, it fails just like DXVK did except it doesn't have a fallback.

052c:trace:vulkan:thunk64_vkCreateDevice 0x29d988, 0x11ace0, 0x147c40cc8, 0x11abf0
052c:fixme:vulkan:wine_vkCreateDevice Support for allocation callbacks not implemented yet
052c:trace:vulkan:wine_vkCreateDevice Device name: "NVIDIA GeForce RTX 3080 Ti".
052c:trace:vulkan:wine_vkCreateDevice Vendor ID: 0x10de, Device ID: 0x2208.
052c:trace:vulkan:wine_vkCreateDevice Driver version: 0x8aca8080.
052c:trace:vulkan:wine_vk_device_convert_create_info Enabled 14 extensions.
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 0: "VK_KHR_swapchain".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 1: "VK_KHR_swapchain_mutable_format".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 2: "VK_EXT_depth_clip_enable".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 3: "VK_EXT_extended_dynamic_state3".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 4: "VK_AMD_buffer_marker".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 5: "VK_KHR_swapchain".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 6: "VK_KHR_swapchain_mutable_format".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 7: "VK_EXT_depth_clip_enable".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 8: "VK_EXT_extended_dynamic_state3".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 9: "VK_EXT_memory_priority".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 10: "VK_EXT_memory_budget".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 11: "VK_NVX_image_view_handle".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 12: "VK_NVX_binary_import".
052c:trace:vulkan:wine_vk_device_convert_create_info Extension 13: "VK_KHR_push_descriptor".
052c:trace:vulkan:debug_utils_callback_conversion 16, 1, 0x1000fe0d0, 0x555556788c50
052c:trace:vulkan:debug_utils_callback_conversion 16, 1, 0x1000fdc10, 0x555556788c50
052c:trace:vulkan:debug_utils_callback_conversion 4096, 1, 0x1000fdc10, 0x555556788e50
052c:trace:vulkan:debug_utils_callback_conversion 4096, 1, 0x1000fe290, 0x555556788e50
052c:warn:vulkan:wine_vkCreateDevice Failed to create device, res=-3.

Last I've seen this it was caused by Nvidia driver not being able to fully initialize its stuff. Can you try running nvidia-modprobe -u -c=0 and checking if it changed anything? Do other games and/or graphical samples and/or demos work for you correctly with DLSS? Please try something like NVIDIA's donut-based demo from here, get Windows binaries, extract the archive somewhere and try to run the application using different renderers: wine ngx_dlss_demo.exe -d3d11, wine ngx_dlss_demo.exe -d3d12 and wine ngx_dlss_demo.exe -vulkan.

@SveSop
Copy link
Contributor

SveSop commented May 29, 2024

The modprobe did not help for this game-error.. i get the same issue:

0374:trace:vulkan:wine_vk_device_convert_create_info Extension 19: "VK_KHR_swapchain".
0374:trace:vulkan:wine_vk_device_convert_create_info Extension 20: "VK_NVX_binary_import".
0374:trace:vulkan:wine_vk_device_convert_create_info Extension 21: "VK_NVX_image_view_handle".
0374:trace:vulkan:wine_vk_device_convert_create_info Extension 22: "VK_NV_descriptor_pool_overallocation".
0374:trace:vulkan:wine_vk_device_convert_create_info Extension 23: "VK_NV_raw_access_chains".
0374:warn:vulkan:wine_vkCreateDevice Failed to create device, res=-3.
err:   DxvkAdapter: Failed to create device, retrying without CUDA interop extensions

However the DLSS demo ran just fine with -d3d11, -d3d12 and -vulkan.

NvAPI_D3D11_IsFatbinPTXSupported: OK
0124:trace:vulkan:thunk64_vkGetPhysicalDeviceMemoryProperties 0x72b5d8, 0x11e3b0
NvAPI_EnumPhysicalGPUs: OK
NvAPI_GetLogicalGPUFromPhysicalGPU: OK
NvAPI_GPU_GetLogicalGpuInfo: OK
NvAPI_GPU_GetArchInfo: OK
NvAPI_D3D1x_GetGraphicsCapabilities: OK
NvAPI_DRS_FindApplicationByName (ngx_dlss_demo.exe): Executable not found
NvAPI_DRS_FindApplicationByName (ngx_dlss_demo.exe): Executable not found
NvAPI_DRS_FindApplicationByName (ngx_dlss_demo.exe): Executable not found
NvAPI_DRS_FindApplicationByName (ngx_dlss_demo.exe): Executable not found
NvAPI_DRS_FindApplicationByName (ngx_dlss_demo.exe): Executable not found
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e900, (nil), 0x11e8f0
0124:trace:vulkan:thunk64_vkCreateCuFunctionNVX 0x72da60, 0x11e920, (nil), 0x11e8f8
NvAPI_D3D11_CreateCubinComputeShaderWithName: OK
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e820, (nil), 0x11e810
0124:trace:vulkan:thunk64_vkCreateCuFunctionNVX 0x72da60, 0x11e840, (nil), 0x11e818
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e800, (nil), 0x11e7f0
0124:trace:vulkan:thunk64_vkCreateCuFunctionNVX 0x72da60, 0x11e820, (nil), 0x11e7f8
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e800, (nil), 0x11e7f0
0124:trace:vulkan:thunk64_vkCreateCuFunctionNVX 0x72da60, 0x11e820, (nil), 0x11e7f8
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e800, (nil), 0x11e7f0
0124:trace:vulkan:thunk64_vkCreateCuFunctionNVX 0x72da60, 0x11e820, (nil), 0x11e7f8
0124:trace:vulkan:thunk64_vkCreateCuModuleNVX 0x72da60, 0x11e800, (nil), 0x11e7f0

And so on for the -d3d11 version.

The NVIDIA RTX Demo "Attic" also run fine with D3D12 and DLSS. So, i kind of believe the extension itself is working, and winevulkan probably do things correct... unless there is some strange data in this sc game that is not being used correctly or somecrap?

@SveSop
Copy link
Contributor

SveSop commented May 29, 2024

Kind of hard to compare the log from SC and this demo, as i need to start SC before switching ON DLSS, where as the demo has it default on i guess...

This little tidbid from the SC log seems weird, although possibly harmless? Dunno:

err:   D3D11SwapChain: Failed to recreate surface: VK_ERROR_OUT_OF_HOST_MEMORY
err:   DXGI: CreateSwapChainForHwnd: Failed to create swap chain, hr -2147467259

EDIT:
You can enable DLSS + "High" (or whatitscalled) so you do not have to start the game and go into the setting to watch the crash by editing this file:
$WINEPREFIX/drive_c/Program Files/Roberts Space Industries/StarCitizen/LIVE/user/client/0/Profiles/default/attributes.xml

And have these two lines there:

<Attr name="Upscaling" value="2"/>
<Attr name="UpscalingTechnique" value="2"/>

Atleast shortens the vulkan bits of the logs some...

@Saancreed
Copy link
Collaborator

@SveSop There could be some other parameter passed by the game's Vulkan renderer to vkCreateDevice which causes it to fail but DXVK failing with err: DxvkAdapter: Failed to create device, retrying without CUDA interop extensions only for this game is concerning, especially when it doesn't fail for (presumably) the same device creation parameters for ngx_dlss_demo.exe -d3d11. At least this somewhat excludes broken driver install because then it wouldn't work in the demo either.

Some more requests from me:

  1. Can you try again with Vulkan Validation Layers to see if they report anything suspicious at device creation time?
  2. Can you get me a gfxreconstruct capture (from VK renderer)? This way we could examine the calls made by the game more closely and maybe figure out if this is some game bug or yet another driver bug.

@SveSop
Copy link
Contributor

SveSop commented May 29, 2024

Since i am a complete n00b, and dont know how to do this abruptly and in a timely manner + just about to go out for a few hours, i am not entirely sure i can make that in time for the trial period thingy to end... 😢

Will see if i can get some time to look at it when i got home, but it looks somewhat grim...

@SveSop
Copy link
Contributor

SveSop commented May 29, 2024

Hopefully of some use with the Validation Layers.. (if i did it correct).
err: Validation Error: [ VUID-VkDeviceCreateInfo-pNext-pNext ] Object 0: handle = 0x5555573560c0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x901f59ec | vkCreateDevice(): pCreateInfo->pNext<VkPhysicalDeviceLineRasterizationFeaturesKHR> includes a pointer to a VkPhysicalDeviceLineRasterizationFeaturesKHR, but when creating VkDevice, the parent extension (VK_KHR_line_rasterization or VK_EXT_line_rasterization) was not included in ppEnabledExtensionNames. The Vulkan spec states: Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid struct for extending VkDeviceCreateInfo (https://vulkan.lunarg.com/doc/view/1.3.283.0/linux/1.3-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pNext-pNext)

This might be fishy? Dunno.. Zipped some logs, and i will look into this uhm.. gfxreconstruct capture thing..
EDIT: Nm.. same "error" when running the working DLSS demo, so probably something not overly important i guess..

logs.zip

@SveSop
Copy link
Contributor

SveSop commented May 29, 2024

I tried to capture this using:

export VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_gfxreconstruct
export GFXRECON_CAPTURE_FILE=/home/TheUser/Temp/StarCitizen.gfxr

And it output a few files, and the main one around 5GB or so i suspect would be the "replay" file, but it failed to play.. Showed a black window and crashed on Replay has encountered a fatal error and cannot continue: std::bad_alloc .I also tried the .py script, but using that with wine seems to crash immediately on some python error.

Using the above two setting and running vkcube output a gfxr file that played just fine, so i dunno if it is some wine'ish thing that make this bork? (Or.. the most likely culprit - me doing something wrong...) Using the .py script with vkcube also worked just fine.

Will see if i can log on tomorrow with the free account, or if it is closed.

@Saancreed
Copy link
Collaborator

Saancreed commented May 29, 2024

VkPhysicalDeviceLineRasterizationFeaturesKHR

Weird, this doesn't happen to me and looking at DXVK code I don't see why would this be reported. But you're probably right that it's likely to be unrelated to the issue at hand. Unfortunately, VVL output doesn't appear to be useful.

About gfxrecon I just found out that VK_NVX_binary_import is explicitly unsupported so much that it's excluded twice and therefore the capture won't we useful either. Let's not waste any more time on this.

I guess this is about as much as we can figure out with the tools at our disposal. I can only think of NSight captures at this point and I have absolutely no experience with them so I suppose this is the time where we report an issue to NV (I just sent an email about this).

@SveSop
Copy link
Contributor

SveSop commented May 30, 2024

Well... It seems i cant log in anymore as the trial thing is over. Atleast i do not get a "Lauch Game" button, and it was supposed to last until 29 may.

I suppose this issue could be somewhat related to the issue with War Thunder and DLSS? It seems the game without DLC is F2P, so i might just download that and try to see if the errors seems similar... (Removing the disable-wt-patch thingy)

@Saancreed
Copy link
Collaborator

Not a problem, I think we already know everything we can know without NV's assistance. Let's just wait and see if my report catches anyone's attention.

I suppose this issue could be somewhat related to the issue with War Thunder and DLSS? It seems the game without DLC is F2P, so i might just download that and try to see if the errors seems similar... (Removing the disable-wt-patch thingy)

Unlikely, according to the logs War Thunder attempts to create a texture with bind/usage flags that make no sense, DXVK rightfully refuses and the game blows up. Probably a game bug over there but maybe you'll see something more.

@SveSop

This comment was marked as off-topic.

@Saancreed

This comment was marked as off-topic.

@Vingian
Copy link

Vingian commented Jul 14, 2024

This seems to be a problem with memory allocation... unrelated to DXVK-NVAPI.

When creating a Vulkan device with VK_NVX_binary_import and/or VK_NVX_image_view_handle extensions... libcuda tries to allocate memory in a specific area already used by the game, so... failing.
DXVK and VKD3D get around this by recreating the device without these extensions... but without these extensions DLSS does not work.

I made a patch... that increases the area allowed for memory allocation.
If you want to test:
Just copy libcuda.so to some folder and run the command echo -ne $(od -An -tx1 -v libcuda.so | tr -d '\n' | sed -e 's/00 00 00 f8 ff 00 00 00/00 00 00 f8 ff ff 00 00/g' -e 's/ /\\x/g') > libcuda.patched.so... a libcuda.patched.so will be created, then... use LD_PRELOAD env to load libcuda.patched.so( like... LD_PRELOAD=/path/to/the/libcuda.patched.so ).

@ahuillet
Copy link

What have you found that libcuda was trying to allocate exactly? Is it a mmap call?
(I don't work on the Cuda driver, but hope to steer this to the right person if I can build a decent-looking question for them)

@Vingian
Copy link

Vingian commented Jul 23, 2024

libcuda tries to find space in a specific area to allocate(from 0x0200000000 to 0xFFF8000000, x64, traversing /proc/self/maps).
The patch I made changes the maximum value of the area(0xFFF8000000 -> 0xFFFFF8000000).
I wrote a simple code to demonstrate the problem: https://github.com/Vingian/libcudatest
If you pass --alloc as an argument to this demo it will allocate the area before creating the device... then it will end up failing to create the device because the area is already being used.

@ahuillet
Copy link

Your example code allocates the whole range in which Cuda appears to do its allocations (I am waiting on feedback from Cuda driver engineers for specifics). In that case it makes sense that Cuda will fail to initialize.
Does the game allocate the whole range also? If so, where and why, do you know?

Eating up some of the VA space in this range is fine, but it's in that range that Cuda allocations will go, if I understand correctly. So there needs to be enough free VA space there.

@Vingian
Copy link

Vingian commented Jul 23, 2024

This game, right at the beginning, makes two beautiful VirtualAllocs with size 0x8000000000... that alone exceeds 0xFFF8000000.
I believe there must be other games with this same problem... since DXVK and VKD3D even have a fail check related to VK_NVX_binary_import and VK_NVX_image_view_handle.
Need to be in a specific area?
Couldn't, at least, increase this area? Just like I did in the patch? I haven't noticed any problems so far...

@Saancreed
Copy link
Collaborator

Saancreed commented Jul 23, 2024

I believe there must be other games with this same problem... since DXVK and VKD3D even have a fail check related to VK_NVX_binary_import and VK_NVX_image_view_handle.

Not exactly, I believe these workarounds were introduced to avoid breaking setups that have NVIDIA drivers that support VK_NVX_binary_import but where it's not functional due to some setup/configuration issue, e.g. nvidia_uvm module missing, not loaded, its device files not created, some CUDA library missing or not findable, etc.

@Vingian
Copy link

Vingian commented Jul 23, 2024

🤔
Anyway...
If there are no other games with this problem "now"... at some point there will definitely be, since memory usage tends to increase practically every new game.

ProjectSynchro added a commit to ProjectSynchro/umu-protonfixes that referenced this issue Sep 20, 2024
This patches libcuda.so with the approach seen here: jp7677/dxvk-nvapi#174 (comment)

This may also be useful for other games that over-allocate memory when enabling DLSS.
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

6 participants