Difference between revisions of "Proton"
Line 3: | Line 3: | ||
== Prerequisites == | == Prerequisites == | ||
− | |||
− | |||
− | |||
=== Gotchas === | === Gotchas === | ||
* If pressure-vessel complains about missing lib64 files or unable to execute some adverb then two things could have happened | * If pressure-vessel complains about missing lib64 files or unable to execute some adverb then two things could have happened | ||
− | |||
** Your version of FEX is too old, needs at least FEX-2207 | ** Your version of FEX is too old, needs at least FEX-2207 | ||
Revision as of 17:37, 29 February 2024
Proton is the Windows on Linux compatibility layer that Steam uses to run Windows titles. Read more about it here
Prerequisites
Gotchas
- If pressure-vessel complains about missing lib64 files or unable to execute some adverb then two things could have happened
- Your version of FEX is too old, needs at least FEX-2207
Running
Selecting a Proton game inside of the Steam install and running it should be all that is necessary. Be patient as due to how pressure-vessel and FEX interacts with each other, building the chroot environment can take a few minutes. Watch the processes in htop if you want to make sure.
DXVK
Lots of games require Vulkan in order to run since they will be executed using DXVK. Make sure your AArch64 device has a new enough Vulkan driver to handle DXVK.
Testing on x86-64 host
Sometimes it is good to test FEX-Emu on an x86-64 host. Setting this up for pressure-vessel to run under Proton takes a bit of setup.
- Copy FEX binaries over to pressure vessel
- ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/soldier_platform_0.20220601.0/files/bin/
- Need FEXInterpreter
- Modify the soldier file tree file to include the new FEXInterpreter file
- ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/soldier_platform_0.20220601.0/usr-mtree.txt.gz
- neovim can edit this file in place
- ./bin/FEXInterpreter type=file mode=755 time=1551367831.0 size=64320 sha256=4d0a7056b0b20a1d99782de7db552b257ecce50b98aed6cae0d3e1f4674738e7
- sha other data doesn't really need to be correct
- Set an environment variable to ensure Steam launches applications through FEX
- export STEAM_GAME_LAUNCH_SHELL=/usr/bin/FEXBash
- Run Steam outside of emulation. Steam itself doesn't need to run under FEX here
- Launch the proton game and it should now be wrapped in FEX
- Look at the processes under htop if you want to confirm
Running outside of pressure-vessel
WIP
Environment variables
- STEAM_COMPAT_DATA_PATH
- This needs to point to a path where proton will set up a wine prefix
- export STEAM_COMPAT_DATA_PATH=$HOME/test_proton
- mkdir $STEAM_COMPAT_DATA_PATH
- STEAM_COMPAT_INSTALL_PATH
- Needs to point to the game install path
- export STEAM_COMPAT_INSTALL_PATH=$STEAM_LIBRARY/steamapps/common/Sonic\ Mania/
- STEAM_COMPAT_CLIENT_INSTALL_PATH
- Needs to point to steam
- export STEAM_COMPAT_CLIENT_INSTALL_PATH=$HOME/.steam
Running
- ./proton waitforexitandrun $STEAM_LIBRARY/steamapps/common/Sonic\ Mania/SonicMania.exe
Pressure-vessel errors
bwrap: Can't get type of source /usr/lib64: No such file or directory
- Might need /usr/lib64 in your AArch64 root?
- Might be because your rootfs is currently "unbroken", thus having a `/tmp` folder inside of it. execute `break_chroot.sh` and ensure `/tmp` is not in the rootfs.
- Not 100% triaged.
Development
Updating pressure-vessel
- On an x86-64 device
- Clone this git repo https://gitlab.steamos.cloud/steamrt/steam-runtime-tools
- Follow build instructions here: https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/master/build-aux/many-builds.md
- If all dependencies are already installed then this can be as simple as following
- ./build-aux/many-builds.py setup
- ./build-aux/many-builds.py build
- ./build-aux/many-builds.py install
- After which it gives you an rsync command to follow to get the build in to the correct folder on an AArch64 device.
Shell for debugging
Set environment variable:
PRESSURE_VESSEL_SHELL=instead
eg: Launching a proton game from Steam
PRESSURE_VESSEL_SHELL=instead %command%
This will open an xterm window that some work can be done before running the application.
To run the command from the xterm instance again
"$@"
The quotes are important