Steam

From FEX-Emu Wiki
Jump to navigation Jump to search

Installing Steam to your host

We install Steam to the host OS to execute games from.

Debian and Ubuntu

Steps to install

Fedora

ArchLinux

  • Download the deb file from above
  • Extract with ar x steam.deb
  • tar -xvf data.tar.xz
  • copy the folders in to the root /
    • Careful with using rsync here! It might overwrite your /usr symlink with a directory and break things!
    • I'd recommend recursive cp instead.
  • run with `FEXBash steam`

Quirks

32-bit application under FEX

FEX is a 64bit AArch64 application. To get 32-bit applications like Steam running under FEX there we workarounds in place to get them working without kernel patches.

This involves a userspace virtual memory allocator and ioctl emulation. Ideally we have kernel patches in place to have full coverage of ioctls but those patches are difficult to land upstream.

There is an ongoing effort to upstream these kernel bits but the ARM kernel maintainers really don't want to support this use case. For more information about the problems we encounter Development:32Bit_Syscall_Woes

Setting environment variable STEAMOS and STEAM_RUNTIME

  • export STEAMOS=1
  • export STEAM_RUNTIME=1

Setting these environment variables skips Steam's bash script from checking for glibc and throwing a warning window

Some additional arguments that can be helpful when tinkering. Don't use these unless you understand what you're breaking.

 -noverifyfiles -nobootstrapupdate -skipinitialbootstrap -norepairfiles -nodircheck -inhibitbootstrap -noassert

Problems/Workarounds

Steam is a very complex application which can cause FEX some pain. The primary application is also a 32bit binary which requires kernel patches to run on AArch64 platforms.

Steam crashing on startup

If steam has updated its runtime then it may have updated its pinned libraries and broke itself

  • Message: `Version `GCC_7.0.0' not found (required by /usr/lib/i386-linux-gnu/dri/msm_dri.so) (search paths /usr/lib/i386-linux-gnu/dri)`

Going in to the runtime and deleting some libraries can help here.

These live in $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu/

Delete the following files from that folder and it can help

  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu/libstdc++*
  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu/libxcb*
  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu/libgcc_s*

Game Library and other things not visible

Steam is using CEF (Chromium Embedded Framework) for large amounts of its library rendering

This can be a bit buggy due to some circumstances. Either driver, CPU timeout, or other reasons.

Known bits that use CEF

  • Game Library (Switch over to Small Mode or Big Picture mode in the menu)
  • Friends List
  • Game properties window
  • Storefront and other web views
  • Game install window

CEF crashing on startup

You may find messages in the steam log saying that steamwebhelper has failed to find symbols.

You may need to remove some libraries from the steam-runtime to get past this point.

This will let the steamwebhelper to use libraries from the rootfs instead of the steam-runtime

  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu/libz.so*
  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu/libfreetype.so.6*
  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu/libfontconfig.so.1*
  • rm $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu/libdbus-1.so*

Long load times

Steam's load time can take a couple minutes. This is due to x87 utilization during initialization which is particularly slow. This will take some time to optimize. It can look like Steam has hung while loading. Might be worth watching the process in something like htop to watch if it crashed or is running.

  • Additionally Steam starts some background processes and if they hang or crash, then it takes a minute or two for that to timeout
    • An example is if you stall steamwebhelper, it will hang for a while, seemingly waiting for the process.

Additionally it launches a few applications in the background that searches for things which can be a bit slow.

steamcmd

Installing

Follow Valve's guide for installing steamcmd manually here or

 mkdir ~/Steam && cd ~/Steam
 curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
 FEXBash ./steamcmd.sh

Running

Just execute steamcmd.sh under FEXBash