protonscr

Proton 4.11-8: Can't select dedicated GPU

protonopen RegressionNVIDIA drivers
ValveSoftware/Proton#3215 · opened 2019-11-12 by GiantBlargg · updated 2022-05-20 · 16 comments · github
GGiantBlargg 2019-11-12 github

CPU: Intel i7-6700HQ
GPU: Intel HD Graphics 530, Nvidia GeForce GTX 960M

Tested with:

  • Planet Coaster
  • Hitman 2

In Proton 4.11-8, for DirectX 11 games, I can no longer select the dedicated GPU in my computer. In Proton 4.11-7, from the graphics settings the games I tried, I could select either the Intel or Nvidia GPU, but in 4.11-8 only the Intel GPU is selectable. I am running with PRIME Render Offload as described here: http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html

GGiantBlargg 2019-11-12 github

I have found that using the variables __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only from the linked nvidia page forces the game to run on the Nvidia GPU while still only displaying the Intel GPU in the settings. However this is only a workaround and not a fix.

Kkisak-valve maintainer 2019-11-12 github

Hello @GiantBlargg, can you check if adding WINEDLLOVERRIDES="dxgi=n" %command% to the game's launch options has an effect?

If that helps, then could you grab some extra logging information requested at https://github.com/ValveSoftware/Proton/issues/2629#issuecomment-552547925.

GGiantBlargg 2019-11-12 github

That seems to fix it.
Here are the logs:
steam-863550.log
I also captured a log for Planet Coaster but it's seems too big for gist, I'll see if I can find another way.

GGiantBlargg 2019-11-12 github

I had to compress the Planet Coaster log:
steam-493340.log.gz

Aalasky17 2019-11-14 github

@GiantBlargg Could you also create a log from Hitman 2 working successfully with the WINEDLLOVERRIDES="dxgi=n" command with the same +dxgi,+d3d logging channels? Just switching back and forth between the GPU options while the log is being created should be enough.

Also, out of curiosity - are you using a laptop or a desktop?

GGiantBlargg 2019-11-16 github

I am using a laptop. I suppose I should have been more clear. The M in 960M indicates that it is a mobile chip.

Here is the new log for Hitman 2:
steam-863550.log
I should also mention that both this and the previous one are not of the game proper, but only the launcher. As the error occurs at that point I didn't think it was necessary.

Aalasky17 2019-11-18 github

@GiantBlargg Thank you! I only saw the option in the launcher, but it is always nice to get confirmation :)

Aaeikum 2019-11-19 github

@GiantBlargg Adding multiple GPUs to Wine's DXGI turns out to be difficult, although we are making progress there. Would it be an acceptable solution to you if we instead only report the dedicated GPU, in your case Nvidia? Do you ever have a reason to select the Intel device in your games?

GGiantBlargg 2019-11-19 github

In my specific case, I suppose it doesn't matter if the dedicated is always used. However on other Nvidia GPUs, it can be placed into a low power state when not in use. (My GPU technically supports this too, but the Linux Nvidia driver does not) In these cases a user may want to run a less demanding game on the iGPU to save energy or extend their battery life.

Aalasky17 2019-12-06 github

@GiantBlargg I've uploaded a custom version of Proton 4.11-9 with a hack to use the dedicated GPU for you to test since we don't have a setup like yours currently.

The tarball is uploaded with the lock code "dual" here: https://www.codeweavers.com/xfer/alasky/dxgi-dual-gpu-hack/

The correct solution to be able to select the GPU is currently in progress, but it will take a significant period of time to complete. In the meantime, could you try this build and see if it works as we expect it will (eg. selecting the dedicated NVIDIA GPU instead of the Intel GPU)?

To try the build:

  1. Create a directory called "compatibilitytools.d" inside "~./steam/steam/" (assuming you don't already have this folder).
  2. Put the tarball into ./steam/steam/compatibilitytools.d
  3. Untar the ball
  4. Restart Steam
  5. "dxgi-dual-gpu-hack" should now be selectable from the dropdown menu for proton versions.
Aalasky17 2019-12-20 github

@GiantBlargg I'm trying to close out bugs on my side - could you confirm that this code is working in Proton 4.11-11 and Hitman 2 (and the other games) are using the NVIDIA gpu now? Thank you!

Edit: whoops! I forgot that we didn't include the patch yet since we were waiting for a reply. Please let me know if you have trouble trying the build. It is still uploaded to the original location.

GGiantBlargg 2019-12-20 github

@alasky17 Sorry, I must've missed your previous post.

The dxgi-dual-gpu-hack functions similarly to the __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only workaround I tried; The dedicated is always used but the integrated is the only gpu displayed in the settings. When combined with DXVK's DXGI both gpus appear but the dedicated is always used, regardless of which one is picked.

If this were to be added to proton I would want to be able to disable it (such as with a launch flag), so that if necessary I could opt to run on the intel via dxvk's dxgi.

Is there somewhere I could follow the progress on multi-gpu support for wine's dxgi?

Lluni3359 2020-09-05 github

I had the same issue with PC Building Simulator (621060) issue #1919 on Proton 4.11-13, thankfully it worked with the launch option @kisak-valve mentioned.

Wwhinis 2021-01-03 github

Issue also exists with Proton 5.21 and 5.13. I am running a laptop with nvidia optimus (980M and Intel(R) HD Graphics 4600 (HSW GT2)) and cannot run any dx11 game without the hack above as it attempts to use the intel for DXVK which doesn't support enough features.

LLudo-code 2022-05-20 github

Issue also exist on proton-experimental on bioshock infinite. You can see my igpu at 99% and dgpu at 0%
image

LLudo-code 2022-05-20 github

Issue can be fix by going to nvidia x server settings and select nvidia performance mod in prime profiles in the capture below :)

image

Proton versions

Launch options

Launch lines

Upstream links