Steam for Linux

Steam for Linux

Steam Linux + Proton + optirun
Hello everyone.

Using steam on Linux (Ubuntu 19.10), I'm trying to launch Windows-only games using Proton.
My machine has a specific Nvidia dual GPU (low consumption GPU + gamer GPU) configuration, so I have to switch to the gamer CPU by overriding the game launch option (optirun %command%).

It works like a charm with Linux compatible games, but Windows-only games always crash. I suspect Proton doesn’t work well with optirun.

So I’m looking for a way to make them work together. Did anyone encounter the same problem?
< >
1-15 / 15 のコメントを表示
The best way to achieve this is to use Prime rather than Bumblebee (optirun), which with the latest nvidia driver is as simple as just install the driver and make sure you enable the discrete GPU when you run a program, like so:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%

For games that will use the older D3D to OpenGL translation layer. Or (if you will be using Vulkan for DXVK/D9VK) you will need to ensure that the applicaion uses the nvidia vulkan layer, like:

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command%

Yes it is tedious to have to do that for every game you want to run on the discrete graphics adapter, but works much better than Bubmblebee and with far better performance, for the recod I have driver 440.64 on my Fedora 31 laptop.

Hope this helps. For further reference, check the documentaton provided by the nvidia-driver readme, chapter 34.
最近の変更はthetargosが行いました; 2020年4月7日 12時18分
N0P3 2020年4月7日 17時42分 
Don't use Optirun myself, but have read many posts discussing the topic with almost all of them addressing issues with Bumblebee and it does not get along well with Proton currently. @thetargos is absolutely nailing it -thumbs way the hell up regarding his response.
Test what @thetargos said and, if it works well, there is a way to set these environment overrides for all Proton games:

Just find and rename "user_settings.sample.py" to "user_settings.py" and modify it appropriately.

This file is located in the Proton installation directory in your Steam library (often ~/.steam/steam/steamapps/common/Proton #.#).
Marlock の投稿を引用:
Test what @thetargos said and, if it works well, there is a way to set these environment overrides for all Proton games:

Just find and rename "user_settings.sample.py" to "user_settings.py" and modify it appropriately.

This file is located in the Proton installation directory in your Steam library (often ~/.steam/steam/steamapps/common/Proton #.#).
While this would activate the dGPU for all games run under proton, I find that I do have a few that would make little sense to have them use the dGPU, especially on my laptop, hence I enable these on a per game basis. Of course, OP could have have a totally different mix of games, and hence may prefer to run all his Proton games this way.
最近の変更はthetargosが行いました; 2020年4月7日 22時38分
If you can use Prime, use Prime. It is so much more effective.

Any driver new enough to use GLVND can use Prime.
最近の変更はAoi Blueが行いました; 2020年4月9日 1時17分
Bu the way, Bumblebee does not work with most Proton games, because it cannot use Vulkan, only OpenGL. That is why native games mostly work (I bet some Vulkan-only games will not work as well).
I tried @thetargos tricks, none of them worked, the gamer CPU didn't switch on (the light indicator doesn't turn on) and the game are slow.
And since all Windows game I have use a DirectX backend, it's screwed.

@Aoi Blue is Prime an alternative to bumblebee? I struggled configuring bumblebee so if I have to spend days for it I think I'll pass.
Daïmanu の投稿を引用:
I tried @thetargos tricks, none of them worked, the gamer CPU didn't switch on (the light indicator doesn't turn on) and the game are slow.
And since all Windows game I have use a DirectX backend, it's screwed.

@Aoi Blue is Prime an alternative to bumblebee? I struggled configuring bumblebee so if I have to spend days for it I think I'll pass.
You need to make sure all of Bumblebee is uninstalled, the daemon not running, etc, and THEN install the nvidia driver. Every release since the 4xx series (and some of the 3xx) support kms and Prime. What is your dGPU and what version of the driver have you installed?
I'm using Ubuntu packages bumblebee-nvidia v 3.2.1-20 with nvidia-driver-390.
That is the problem. You should not be using such an old driver and certainly not with Bumblebee. I'm sorry, I am unfamiliar with the process of installing a more up to date version of the nvidia driver on Ubuntu (LTS or otherwise), since I know it involves using a PPA, but that's as robust as my knowledge of it is. You can see if the provided Readme for the nvidida driver of the series you can install from the standard repositories indeed has support for Prime by opening the file in any text editor and simply searching for the string PRIME in all capital letters. As of 440.64 and .82 drivers it corresponds to the chapter 34.
So I guess I have no choice to reconfigure the stuff one more time then. I hope it will be fine this time. Thank you.
Daïmanu の投稿を引用:
So I guess I have no choice to reconfigure the stuff one more time then. I hope it will be fine this time. Thank you.
The main issue is that Bumblebee is limited to OpenGL acceleration passthrough to the dGPU. It has no support for Vulkan, which means you will be forced to use WINED3D-to-OpenGL layer for Proton games instead of the more advanced and faster rendering of Vulkan. Also native titles that lack OpenGL backend will not run on the dGPU and you will be forced to run them on the iGPU due to Bumblebee not supporting Vulkan.

Edit
That is the exact situation that lead me to investigate Prime on my laptop, and thankfully nVidida had been hard at work on bringing better support for Optimus and thus supporting Prime.
最近の変更はthetargosが行いました; 2020年4月16日 10時51分
just be careful to ensure newer drivers than nvidia-390 do support your dGPU... some old nvidia models are stuck between old versions of the proprietary driver and noveau
Marlock の投稿を引用:
just be careful to ensure newer drivers than nvidia-390 do support your dGPU... some old nvidia models are stuck between old versions of the proprietary driver and noveau
Good point. Fermi-class hardware (GTX4xx-5xx) is out of support. However 390 and current drivers do offer support for up to Kepler-class (6xx-7xx, except 750) hardware (IIRC). Nouveau should provide good support for these, but the downside is that it lacks Vulkan support still.

Since he uses 390 drivers in his setup, I'd assume at least a Kepler class dGPU or newer.

Edit
Did a quick check, the 390.132 driver supports back to Fermi class GPUs, but does not support Prime, at most, supports randr, which can be flaky.
最近の変更はthetargosが行いました; 2020年4月16日 18時43分
Sunny_O 2021年12月23日 10時25分 
In case anyone wants primusrun / pvkrun / any wrapper that uses LD_PRELOAD and/or LD_LIBRARY_PATH to work with Proton when ran from Steam, you can try my hack!

pressure-vent.sh https://gist.github.com/evg-zhabotinsky/cd54c8d8bf3803599d3b33cc56e6fbc0

Long story short: Proton forces use of the Soldier runtime that is packed in a "Pressure Vessel" container, and the latter seems to just wipe LD_PRELOAD and LD_LIBRARY_PATH. The script cuts the container out of command line, leaving only Proton and the game.

You will have to install all dependencies manually, though. If some are missing Proton just won't start.
< >
1-15 / 15 のコメントを表示
ページ毎: 1530 50