WIP: Make use of v2 manifests to allow stacking with Proton
-
depot: Add scripts that can run multiple commands in one container
We need this for Proton integration: a Proton game runs several setup commands, followed by the game itself.
This prototype has some limitations:
-
An as-yet-unreleased version of Steam is required.
-
A systemd-style XDG_RUNTIME_DIR is required. We'll fall back to /tmp when this can be done without introducing a security flaw.
-
Old session directories in XDG_RUNTIME_DIR are not cleaned up.
-
There are a lot of processes, most of which should be unnecessary.
-
The environment handling is rather ad-hoc.
-
-
depot: Generate a version 2 manifest that runs the prototype scripts
For a native game
Install Steam MAIN build v1597743020 or better.
Install soldier, app ID 1391110 (if it isn't public yet, you'll need a
Steam key). Update pressure-vessel to v0.20200819.0 or later,
and copy in the depot/_v2-entry-point
, depot/_start-container-in-background
and depot/toolmanifest.vdf
from this branch.
An example pre-generated depot/toolmanifest.vdf
for your convenience:
"manifest"
{
"commandline" "/_v2-entry-point --deploy=soldier --suite=soldier --verb=%verb% --"
"version" "2"
}
Put this in ~/.steam/root/compatibilitytools.d/soldier.vdf
:
"soldier"
{
"compat_tools"
{
"soldier"
{
"appid" "1391110"
"depotid" "1391111"
"display_name" "Soldier prototype"
"from_oslist" "linux"
"to_oslist" "linux"
}
}
}
Restart Steam.
Edit the properties of your game.
Check Force the use of a specific Steam Play compatibility tool.
Select Soldier prototype.
Most games will not run in this configuration because they have dependencies that are specific to the old Steam Runtime, but Floating Point (302380) is known to work.
The process tree looks something like this:
│ │ │ └─bash,21673 /home/me/.local/share/Steam/steam.sh
│ │ │ └─steam,21810
│ │ │ ├─SteamChildMonit,22274
│ │ │ │ └─sh,22275 -c '/opt/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --deploy=soldier --suite=soldier --verb=waitforexitandrun -- '/home/me/.local/share/Steam/steamapps/common/Floating Point/Floating Point.x86'
│ │ │ │ └─bwrap,22276 --args 18 /run/pressure-vessel/pv-from-host/bin/pressure-vessel-adverb --exit-with-parent --subreaper --generate-locales --fd 13 --terminate-timeout=10.000000 -- /home/me/.local/share/Steam/steamapps/common/Floating Point/Floating Point.x86
│ │ │ │ └─pressure-vessel,22368 --exit-with-parent --subreaper --generate-locales --fd 13 --terminate-timeout=10.000000 -- /home/me/.local/share/Steam/steamapps/common/Floating Point/Floating Point.x86
│ │ │ │ └─Floating Point.,22411
│ │ │ │ ├─{Floating Point.},22412
│ │ │ │ └─{Floating Point.},22413
For a Proton game on scout
Install Steam MAIN build v1597743020 or better, as above.
Install the scout SteamLinuxRuntime. Set up pressure-vessel
, scripts and
manifest as above, but with scout
instead of soldier
:
"manifest"
{
"commandline" "/_v2-entry-point --deploy=scout --suite=scout --verb=%verb% --"
"version" "2"
}
Have a build of Proton built against soldier. I used 5.0.
Put it in /path/to/steamapps/common/Proton 5.0
.
Put this in .../Proton 5.0/toolmanifest.vdf
:
"manifest"
{
"version" "2"
"commandline" "/proton %verb%"
"require_tool_appid" "1070560"
"use_sessions" "1"
}
Restart Steam.
Edit the properties of your game (I used Soldat, 638490).
Check Force the use of a specific Steam Play compatibility tool.
Select Proton 5.0.
Process tree while running the game:
│ │ │ └─bash,26057 /home/me/.local/share/Steam/steam.sh
│ │ │ └─steam,26195
│ │ │ ├─SteamChildMonit,27071
│ │ │ │ ├─bwrap,27085 --args 9 /run/pressure-vessel/pv-from-host/bin/pressure-vessel-adverb --exit-with-parent --subreaper --generate-locales --fd 5 --terminate-timeout=10.000000 -- sh -euc exec >"$1"; shift; exec "$@" sh /tmp/SteamLinuxRuntime.d4b552963d2d732a/fifo /opt/steamapps/common/SteamLinuxRuntime/pressure-vessel/bin/pressure-vessel-launcher --socket-directory=/tmp/SteamLinuxRuntime.d4b552963d2d732a
│ │ │ │ │ └─pressure-vessel,27172 --exit-with-parent --subreaper --generate-locales --fd 5 --terminate-timeout=10.000000 -- sh -euc exec >"$1"; shift; exec "$@" sh /tmp/SteamLinuxRuntime.d4b552963d2d732a/fifo /opt/steamapps/common/SteamLinuxRuntime/pressure-vessel/bin/pressure-vessel-launcher --socket-directory=/tmp/SteamLinuxRuntime.d4b552963d2d732a
│ │ │ │ │ └─pressure-vessel,27215 --socket-directory=/tmp/SteamLinuxRuntime.d4b552963d2d732a
│ │ │ │ │ ├─pressure-vessel,27221 --subreaper /opt/steamapps/common/Proton 5.0/proton waitforexitandrun /opt/steamapps/common/Soldat/soldat.exe
│ │ │ │ │ │ ├─explorer.exe,27257 /desktop
│ │ │ │ │ │ │ ├─{explorer.exe},27258
│ │ │ │ │ │ │ ├─{explorer.exe},27259
│ │ │ │ │ │ │ └─{explorer.exe},27260
│ │ │ │ │ │ ├─plugplay.exe,27235
│ │ │ │ │ │ │ ├─{plugplay.exe},27239
│ │ │ │ │ │ │ └─{plugplay.exe},27240
│ │ │ │ │ │ ├─python3,27223 /opt/steamapps/common/Proton 5.0/proton waitforexitandrun /opt/steamapps/common/Soldat/soldat.exe
│ │ │ │ │ │ │ └─steam,27225 /opt/steamapps/common/Soldat/soldat.exe
│ │ │ │ │ │ │ └─{steam},27255
│ │ │ │ │ │ ├─services.exe,27232
│ │ │ │ │ │ │ ├─{services.exe},27233
│ │ │ │ │ │ │ ├─{services.exe},27236
│ │ │ │ │ │ │ ├─{services.exe},27243
│ │ │ │ │ │ │ └─{services.exe},27251
│ │ │ │ │ │ ├─soldat.exe,27262
│ │ │ │ │ │ │ ├─{soldat.exe},27266
│ │ │ │ │ │ │ ├─{soldat.exe},27267
│ │ │ │ │ │ │ ├─{soldat.exe},27268
│ │ │ │ │ │ │ ├─{soldat.exe},27269
│ │ │ │ │ │ │ ├─{soldat.exe},27272
│ │ │ │ │ │ │ ├─{soldat.exe},27273
│ │ │ │ │ │ │ ├─{soldat.exe},27274
│ │ │ │ │ │ │ ├─{soldat.exe},27275
│ │ │ │ │ │ │ ├─{soldat.exe},27276
│ │ │ │ │ │ │ ├─{soldat.exe},27277
│ │ │ │ │ │ │ └─{soldat.exe},27278
│ │ │ │ │ │ ├─winedevice.exe,27242
│ │ │ │ │ │ │ ├─{winedevice.exe},27244
│ │ │ │ │ │ │ ├─{winedevice.exe},27245
│ │ │ │ │ │ │ ├─{winedevice.exe},27246
│ │ │ │ │ │ │ ├─{winedevice.exe},27247
│ │ │ │ │ │ │ └─{winedevice.exe},27248
│ │ │ │ │ │ ├─winedevice.exe,27250
│ │ │ │ │ │ │ ├─{winedevice.exe},27252
│ │ │ │ │ │ │ ├─{winedevice.exe},27253
│ │ │ │ │ │ │ └─{winedevice.exe},27254
│ │ │ │ │ │ └─wineserver,27228
│ │ │ │ │ ├─{pressure-vessel},27220
│ │ │ │ │ └─{pressure-vessel},27222
│ │ │ │ └─sh,27072 -c '/opt/steamapps/common/SteamLinuxRuntime'/_v2-entry-point --deploy=scout --suite=scout --verb=waitforexitandrun -- '/opt/steamapps/common/Proton 5.0'/proton waitforexitandrun '/opt/steamapps/common/Soldat/soldat.exe'
│ │ │ │ └─pressure-vessel,27073 --directory=/opt/steamapps/common/Soldat --socket=/tmp/SteamLinuxRuntime.d4b552963d2d732a/socket --terminate --pass-env-matching AMD_VK_* --pass-env-matching DXVK_* --pass-env-matching ENABLE_VK_LAYER_* --pass-env-matching FOSSILIZE_* --pass-env-matching LC_* --pass-env-matching MESA_* --pass-env-matching SDL_* --pass-env-matching STEAM* --pass-env-matching Steam* --pass-env-matching __GL_* --pass-env AMD_VK_PIPELINE_CACHE_FILENAME --pass-env AMD_VK_PIPELINE_CACHE_PATH --pass-env AMD_VK_USE_PIPELINE_CACHE --pass-env DXVK_STATE_CACHE_PATH --pass-env ENABLE_VK_LAYER_VALVE_steam_fossilize_1 --pass-env EnableConfiguratorSupport --pass-env FOSSILIZE_APPLICATION_INFO_FILTER_PATH --pass-env LC_ALL --pass-env LD_PRELOAD --pass-env MESA_GLSL_CACHE_DIR --pass-env MESA_GLSL_CACHE_MAX_SIZE --pass-env SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD --pass-env SDL_GAMECONTROLLER_USE_BUTTON_LABELS --pass-env STEAMVIDEOTOKEN --pass-env STEAM_CLIENT_CONFIG_FILE --pass-env STEAM_COMPAT_CLIENT_INSTALL_PATH --pass-env STEAM_COMPAT_DATA_PATH --pass-env STEAM_COMPAT_MEDIA_PATH --pass-env STEAM_FOSSILIZE_DUMP_PATH --pass-env STEAM_FOSSILIZE_DUMP_PATH_READ_ONLY --pass-env SteamAppId --pass-env SteamAppUser --pass-env SteamClientLaunch --pass-env SteamEnv --pass-env SteamGameId --pass-env SteamOverlayGameId --pass-env SteamStreamingHardwareEncodingAMD --pass-env SteamStreamingHardwareEncodingIntel --pass-env SteamStreamingHardwareEncodingNVIDIA --pass-env __GL_SHADER_DISK_CACHE_APP_NAME --pass-env __GL_SHADER_DISK_CACHE_PATH --pass-env __GL_SHADER_DISK_CACHE_READ_ONLY_APP_NAME --pass-env __GL_SHADER_DISK_CACHE_SKIP_CLEANUP --env STEAM_RUNTIME=/ -- /opt/steamapps/common/SteamLinuxRuntime/pressure-vessel/bin/pressure-vessel-adverb --subreaper /opt/steamapps/common/Proton 5.0/proton waitforexitandrun /opt/steamapps/common/Soldat/soldat.exe
│ │ │ │ └─{pressure-vessel},27219
For a Proton game on soldier
Install Steam MAIN build v1597743020 or better, as above.
Install soldier, as above.
Have a build of Proton built against soldier. I used proton-5.13-1-alpha4,
build 1596118686. Put it in ~/.steam/steam/compatibilitytools.d/proton-5.13
.
Put this in ~/.steam/steam/compatibilitytools.d/proton-5.13/compatibilitytool.vdf
:
"compatibilitytools"
{
"compat_tools"
{
"proton_5.13"
{
"install_path" "."
"display_name" "proton_5.13"
"from_oslist" "windows"
"to_oslist" "linux"
}
}
}
and this in ~/.steam/steam/compatibilitytools.d/proton-5.13/toolmanifest.vdf
:
"manifest"
{
"version" "2"
"commandline" "/proton %verb%"
"require_tool_appid" "1391110"
"use_sessions" "1"
}
Restart Steam.
Edit the properties of your game (I used Soldat, 638490).
Check Force the use of a specific Steam Play compatibility tool.
Select proton_5.13.
This is currently not working for me:
Traceback (most recent call last):
File "/home/me/.local/share/Steam/compatibilitytools.d/proton-5.13/proton", line 846, in <module>
g_session.init_session()
File "/home/me/.local/share/Steam/compatibilitytools.d/proton-5.13/proton", line 697, in init_session
os.symlink(g_proton.path("proton_winedir"), "/tmp/.wine-" + str(os.getuid()))
FileExistsError: [Errno 17] File exists: '/home/me/.local/share/Steam/compatibilitytools.d/proton-5.13/proton_winedir' -> '/tmp/.wine-1000'