protonscr

Unable to offload games to eGPU on laptops with integrated + dedicated graphics

steamopen NVIDIA drivers
ValveSoftware/steam-for-linux#9029 · opened 2022-12-22 by mikoff · updated 2023-06-12 · 4 comments · github
Mmikoff 2022-12-22 github

Your system information

  • Steam client version (build number or date): 15.12.2022
  • Distribution (e.g. Ubuntu): Ubuntu 22.04 LTS
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I have a laptop with:

  • integrated (Intel) & dedicated GPUs (Nvidia MX150);
  • eGPU (Nvidia RX2070) connected to the laptop through Thunderbolt.

I can successfully offload all the apps to eGPU (e.g. glxgears) and see that the process is really processed on this (using nvidia-smi, I see that the eGPU is actually loaded).

However, it is not the case for Dota2 or other steam-games.
They, nevertheless, are calculated on internal GPU of the laptop (MX150).

Steps for reproducing this issue:

  1. Prepend the following parameters to the Dota2 or steam client:
    __NV_PRIME_RENDER_OFFLOAD=1 __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%
    By doing so we say that we want our application to be uploaded to eGPU (NVIDIA-G1 in my case).

  2. Start Dota2.

  3. Run nvidia-smi, you will notice that the game is actually processed in "C+G" mode and offloaded to internal dedicated GPU (NVIDIA-G0, or MX150 in my case), and not to eGPU.

Note: to enable eGPU after driver install add the following line to /usr/share/X11/xorg.conf.d/10-nvidia.conf:

    Option "AllowExternalGpus" "true"
Kkisak-valve maintainer 2022-12-22 github

Hello @mikoff, this issue should be reported to your video driver vendor.

Mmikoff 2022-12-22 github

Hello @mikoff, this issue should be reported to your video driver vendor.

Hello @kisak-valve, I do not think that it is NVIDIA problem, because all the other apps are uploaded and processed by eGPU just fine. This problem exists only with steam.

And I have arguments supporting my point: if I switch Dota2 to OpenGL mode then Dota2 and steam are successfully uploaded to eGPU and processed here.

Mmikoff 2022-12-22 github

Please see the nvidia-smi output using Vulkan:
Screenshot from 2022-12-22 16-21-45
and compare with nvidia-smi output in OpenGL mode:
Screenshot from 2022-12-22 16-20-34
In OpenGL everything works as expected (offload to eGPU).

Mmikoff 2023-06-12 github

Since now OpenGL is not supported by Dota2, it is impossible to run Dota2 on external GPU if you have internal one.
Dota2 can not be offloaded to eGPU, while steam itself or any other application can