Steam

From NixOS Wiki
Revision as of 15:32, 11 October 2017 by imported>Makefu (→‎Using the FOSS Radeon drivers)

This page is intended to describe the current state of Steam under NixOS.

I want to play

For 64-bit systems it's important to have hardware.opengl.driSupport32Bit = true in your NixOS configuration. You'll also need hardware.pulseaudio.support32Bit = true if you are using PulseAudio - this will enable 32bit ALSA apps integration.

In short, add this to your configuration.nix

{
  ...
  users.users.<your-username>.packages = [
    pkgs.steam
  ];
  hardware.opengl.driSupport32Bit = true;
  hardware.pulseaudio.support32Bit = true;
}

Troubleshooting

I was sure you would reach this part.

Steam fails to start. What do I do?

strace is your friend.

Game X fails to start

Games may fail to start because they lack dependencies (this should be added to the script, for now), or because they cannot be patched. The steps to launch a game directly are:

  • Patch the script/binary if you can
  • Add a file named steam_appid.txt in the binary folder, with the appid as contents (it can be found in the stdout from steam)
  • Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary
 LD_LIBRARY_PATH=~/.steam/bin32:$LD_LIBRARY_PATH:/nix/store/pfsa... blabla ...curl-7.29.0/lib:. ./Osmos.bin32 (if you could not patchelf the game, call ld.so directly with the binary as param)

With this technique, I can play many games directly from steam. Others, like Team Fortress, cannot be patched so I only managed to run them from the cmd line.

new Libcpp for steam

The open source radeon drivers need a newer libc++ than is provided by the default runtime, which leads to acrash on launch. Use

(steamPackages.override { newLibcpp = true; }).steam-chrootenv

in your config if you get an error like

libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

Known issues

  1. No java in steam chrootenv. Games affected: Towns:
/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found

HiDPI

If you're blessed with a higher DPI monitor, Steam's UI fonts may be unbearably tiny. You can add a custom skin from https://github.com/MoriTanosuke/HiDPI-Steam-Skin for your user to alleviate this. The skins directory is ~/.local/share/Steam/skins/.