[solved] How to run steam?

Can someone please help me figure out how to run steam? I’ve read the corresponding page on the Wiki [1] and for all I know it should be possible to just run the main executable, right? But when I try, all I get is this:

~ $ steam

** (process:11303): ERROR **: 07:59:34.247: bind_mount: mount(source, target, NULL, MS_BIND | MS_REC, NULL): No such device
zsh: trace trap (core dumped)  steam

This is happening on nixos-unstable with a recent checkout of master. What am I doing wrong?

2 Likes

Yes, that should normally work (it does for me anyway). I suspect something around your system mounts is confusing the part that sets up the mount namespace.

The problem appears to be that my /tmp directory is a memory file system. According to strace, steam fails here:

[...]
mkdir("/tmp/chrootenv5A20M0", 0755)     = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f2e535030d0) = 21734
wait4(21734, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGTRAP && WCOREDUMP(s)}], 0, NULL) = 21734
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=21734, si_uid=1000, si_status=SIGTRAP, si_utime=0, si_stime=0} ---
rmdir("/tmp/chrootenv5A20M0")           = 0
getpid()                                = 21732
kill(21732, SIGTRAP)                    = 0
--- SIGTRAP {si_signo=SIGTRAP, si_code=SI_USER, si_pid=21732, si_uid=1000} ---
+++ killed by SIGTRAP (core dumped) +++

So I tried running TMPDIR=/var/tmp steam and that appears to fix that particular error.

Of course, with that error out of the way I’m just running into a new error which looks like this:

cp: cannot create regular file '/home/simons/.local/share/Steam/bootstrap.tar.xz': Permission denied
Running Steam on nixos 20.09pre228622.029a5de0839 64-bit
STEAM_RUNTIME has been set by the user to: /steamrt
Can't find 'steam-runtime-check-requirements', continuing anyway
/home/simons/.local/share/Steam/ubuntu12_32/steam
Installing breakpad exception handler for appid(steam)/version(1591251555)
Installing breakpad exception handler for appid(steam)/version(1591251555)
Installing breakpad exception handler for appid(steam)/version(1591251555)
Loaded SDL version 2.0.13-5893924
Installing breakpad exception handler for appid(steam)/version(1591251555)
[2020-06-23 10:23:43] Startup - updater built Jun  4 2020 05:50:42
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2020-06-23 10:23:43] Checking for update on startup
[2020-06-23 10:23:43] Checking for available updates...
[2020-06-23 10:23:43] Downloading manifest: client-download.steampowered.com/client/steam_client_ubuntu12
[2020-06-23 10:23:43] Download skipped: /client/steam_client_ubuntu12 version 1591251555, installed version 1591251555
[2020-06-23 10:23:43] Nothing to do
[2020-06-23 10:23:43] Verifying installation...
[2020-06-23 10:23:43] Performing checksum verification of executable files
[2020-06-23 10:23:44] Verification complete
glXChooseVisual failed
glXChooseVisual failed/data/src/steamUI/Main.cpp (338) : Assertion Failed: Fatal Error: glXChooseVisual failed
/data/src/steamUI/Main.cpp (338) : Assertion Failed: Fatal Error: glXChooseVisual failed
Installing breakpad exception handler for appid(steam)/version(1591251555)
STEAM_RUNTIME_HEAVY: ./steam-runtime-heavy
assert_20200623102344_6.dmp[31320]: Uploading dump (out-of-process)
/tmp/dumps/assert_20200623102344_6.dmp
[0623/102344.249360:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: browser
[0623/102344.263159:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0
[0623/102344.263195:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1591249846
[0623/102344.263198:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public
[0623/102344.263200:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve
[0623/102344.283149:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0
[0623/102344.283186:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1591249846
[0623/102344.283188:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public
[0623/102344.283191:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve
[0623/102344.283551:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: gpu-process
[0623/102344.346958:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[0623/102344.361301:WARNING:crash_reporting.cc(286)] Failed to set crash key: UserID with value: 0
[0623/102344.361337:WARNING:crash_reporting.cc(286)] Failed to set crash key: BuildID with value: 1591249846
[0623/102344.361340:WARNING:crash_reporting.cc(286)] Failed to set crash key: SteamUniverse with value: Public
[0623/102344.361342:WARNING:crash_reporting.cc(286)] Failed to set crash key: Vendor with value: Valve
[0623/102344.361709:INFO:crash_reporting.cc(247)] Crash reporting enabled for process: utility
assert_20200623102344_6.dmp[31320]: Finished uploading minidump (out-of-process): success = yes
assert_20200623102344_6.dmp[31320]: response: CrashID=bp-f83da5b6-1ca9-481d-9581-c5b1b2200623
assert_20200623102344_6.dmp[31320]: file ''/tmp/dumps/assert_20200623102344_6.dmp'', upload yes: ''CrashID=bp-f83da5b6-1ca9-481d-9581-c5b1b2200623''

That’s weird. I do have boot.tmpOnTmpfs = true; and steam just works for me.

Years ago I used to have problems due to (parts of) $HOME being symlinked to another FS. The sandbox didn’t “detect” some of these FSs, so they weren’t present in the sandbox and thus the Steam’s directory wasn’t usable inside (or something like that, my memory is quite hazy about this now).

IIRC I’d install steam-run, run steam-run bash and inspect the relevant directories.

1 Like

Sorry for replying to myself here, but I found out how to fix the “glXChooseVisual” error. I had to install the 32 bit versions of the OpenGL libraries (as well as enable PulseAudio support for 32 bit). Now Steam appears to be running fine. I’ve enabled Proton, and now it’s even content to install Skyim! The download (10GB) is still running … but according to the Skyrim Wiki, this might actually work. :slight_smile:

2 Likes

:tada: Oh, right… I should’ve read the log properly, it’s a typical mistake.

This has just gotten way more confusing. :frowning:

The TMPDIR=/var/tmp steam thing has stopped working for no apparent reason. Clearly you were right that “tmpfs” wasn’t the problem in the first place. I’m not back to the original error where the executable crashes immediately after startup. I don’t know what happened.

I’ve opened a ticket on GIthub to figure out this issue: Steam crashes immediately after startup · Issue #91349 · NixOS/nixpkgs · GitHub.

It appears that Steam iterates through all the mount points configured in /etc/fstab. On my system, some of those mount points connect to an NFS server, which is reachable only after I’ve started a VPN. If the VPN is up, Steam works just fine. If the VPN is down (and the mount points are unreachable), then Steam crashes with the error I’ve pasted above.

4 Likes