Skip to content

Commit 34e90a8

Browse files
proton: Populate NVIDIA_WINE_DLL_DIR when available
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR` for a path where DLLs provided by the NVIDIA Linux driver can be found. This needs to be set by `proton` script, as it is ran inside of the pressure-vessel environment, so the paths returned will be valid within the environment. Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the environment and tries to load a known DLL from it. As expected manually setting the environment variable to the on-disk location did not work, as the path is not accurate within the pressure-vessel environment.
1 parent f205ee9 commit 34e90a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

proton

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,12 @@ class Session:
14611461
if "PROTON_CRASH_REPORT_DIR" in self.env:
14621462
self.env["WINE_CRASH_REPORT_DIR"] = self.env["PROTON_CRASH_REPORT_DIR"]
14631463

1464+
# NVIDIA software may check NVIDIA_WINE_DLL_DIR as a search-path for
1465+
# driver-provided DLLs for use by Proton/Wine.
1466+
nvidia_wine_dll_dir = find_nvidia_wine_dll_dir()
1467+
if nvidia_wine_dll_dir:
1468+
self.env["NVIDIA_WINE_DLL_DIR"] = nvidia_wine_dll_dir
1469+
14641470
if "PROTON_LOG" in self.env and nonzero(self.env["PROTON_LOG"]):
14651471
if self.setup_logging(append_forever=False):
14661472
self.log_file.write("======================\n")

0 commit comments

Comments
 (0)