Skip to content

Commit

Permalink
Add GE-Proton9-20 Changes to the proton file
Browse files Browse the repository at this point in the history
Hotfix:
Revert DRI_PRIME auto-setting (broke too many non-standard setups)
  • Loading branch information
pythonlover02 authored Nov 10, 2024
1 parent c8ad33f commit 3e08416
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Sarek-Patches/proton
Original file line number Diff line number Diff line change
Expand Up @@ -1787,26 +1787,6 @@ class Session:
if "PROTON_CRASH_REPORT_DIR" in self.env:
self.env["WINE_CRASH_REPORT_DIR"] = self.env["PROTON_CRASH_REPORT_DIR"]

# Always set DRI_PRIME=1 if more than one GPU is detected.
# Fixes Diablo IV grey screen with igpu + dgpu
try:
# Execute the lspci command to list all PCI devices
output = subprocess.check_output(['lspci'], encoding='utf-8')

# Filter the output for VGA compatible controllers
gpu_list = [line for line in output.split('\n') if 'VGA compatible controller' in line]

# Count the number of GPUs
num_gpus = len(gpu_list)

if num_gpus > 1:
self.env["DRI_PRIME"] = "1"

except subprocess.CalledProcessError:
print("Failed to execute lspci. Ensure the command is available on your system.")
except FileNotFoundError:
print("lspci command not found. Ensure it is installed on your system.")

# NVIDIA software may check NVIDIA_WINE_DLL_DIR as a search-path for
# driver-provided DLLs for use by Proton/Wine.
nvidia_wine_dll_dir = find_nvidia_wine_dll_dir()
Expand Down

0 comments on commit 3e08416

Please sign in to comment.