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

Proton 4.11-8: Can't select dedicated GPU #3215

Open
GiantBlargg opened this issue Nov 12, 2019 · 16 comments
Open

Proton 4.11-8: Can't select dedicated GPU #3215

GiantBlargg opened this issue Nov 12, 2019 · 16 comments
Labels
NVIDIA drivers Possibly involves an issue with the NVIDIA proprietary driver Regression Confirmed working on an older version of Proton

Comments

@GiantBlargg
Copy link

GiantBlargg commented Nov 12, 2019

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

@GiantBlargg
Copy link
Author

GiantBlargg commented Nov 12, 2019

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.

@kisak-valve
Copy link
Member

kisak-valve commented Nov 12, 2019

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 #2629 (comment).

@kisak-valve kisak-valve added NVIDIA drivers Possibly involves an issue with the NVIDIA proprietary driver Regression Confirmed working on an older version of Proton labels Nov 12, 2019
@GiantBlargg
Copy link
Author

GiantBlargg commented Nov 12, 2019

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.

@GiantBlargg GiantBlargg changed the title [Regression] Proton 4.11-8: Can't select dedicated GPU Proton 4.11-8: Can't select dedicated GPU Nov 12, 2019
@GiantBlargg
Copy link
Author

GiantBlargg commented Nov 12, 2019

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

@alasky17
Copy link
Collaborator

alasky17 commented Nov 14, 2019

@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?

@GiantBlargg
Copy link
Author

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.

@alasky17
Copy link
Collaborator

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

@aeikum
Copy link
Collaborator

aeikum commented Nov 19, 2019

@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?

@GiantBlargg
Copy link
Author

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.

@alasky17
Copy link
Collaborator

alasky17 commented Dec 6, 2019

@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.

@alasky17
Copy link
Collaborator

alasky17 commented Dec 20, 2019

@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.

@GiantBlargg
Copy link
Author

@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?

@luni3359
Copy link

luni3359 commented Sep 5, 2020

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.

@whinis
Copy link

whinis commented Jan 3, 2021

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.

@Ludo-code
Copy link

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

@Ludo-code
Copy link

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NVIDIA drivers Possibly involves an issue with the NVIDIA proprietary driver Regression Confirmed working on an older version of Proton
Projects
None yet
Development

No branches or pull requests

7 participants