Steam/Troubleshooting: Difference between revisions

From ArchWiki
(→‎Steam runtime issues: add section summarizing ways to launch steam wrt the runtime)
(→‎Steam runtime issues: rm old sections, now simplified via steam-runtime script and steam-native-runtime pkg)
Line 53: Line 53:


  $ steam-native
  $ steam-native
This is the command run by the "Steam (Native)" [[desktop entry]]. This version forces Steam to ignore its runtime and only use system libraries. You will probably need to install {{pkg|steam-native-runtime}} in order for Steam to run at all, though some games may require additional packages. See [[Steam/Game-specific troubleshooting]].
This is the command run by the "Steam (Native)" [[desktop entry]]. This version forces Steam to ignore its runtime and only use system libraries. You will probably need to install {{pkg|steam-native-runtime}} in order for Steam to run at all, though some games may require additional packages. See [[#Finding missing runtime libraries]] and [[Steam/Game-specific troubleshooting]].


  $ /usr/lib/steam/steam
  $ /usr/lib/steam/steam
This is the normal Steam launcher without any Arch-specific workarounds.
This is the normal Steam launcher without any Arch-specific workarounds.


=== Dynamic linker ===
=== Finding missing runtime libraries ===


The dynamic linker—see {{man|8|ld.so}}—can be used to force Steam to load the up-to-date system libraries via the {{ic|LD_PRELOAD}} [[environment variable]]. For example:
If individual games or Steam itself is failing to launch when using {{ic|steam-native}} you are probably missing libraries. To find the required libraries run:
 
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam
 
{{Note|The {{ic|$LIB}} above is '''not''' a variable, but a directive to the linker to pick the appropriate architecture for the library. The single quotes are required to prevent the shell from treating {{ic|$LIB}} as a variable.}}
 
{{Tip|You can put this command in a wrapper script such as {{ic|/usr/local/bin/steam-preload}}, appending {{ic|"$@"}} to preserve command-line  arguments. This script can be referred to in a [[desktop file]], for example through {{ic|1=Exec=/usr/local/bin/steam-preload %U}}.}}
 
=== Native runtime ===
 
To force Steam to use only your system libraries, run it with
 
$ steam-native
 
Or through the menu entry "Steam (Native)" provided by the steam-native.desktop file.
 
{{Note|1=Always use this wrapper as (besides setting STEAM_RUNTIME=0) it also ensures to contain common workarounds and roundups like DBUS_FATAL_WARNINGS=0 to avoid coredumps on shutdown}}
 
This wrapper can be called in another wrapper script or .desktop file, as with the [[#Dynamic linker]] solution. However, if you are missing any libraries from the Steam runtime, individual games or Steam itself may fail to launch. To find the required libraries run:


  $ cd ~/.local/share/Steam/ubuntu12_32
  $ cd ~/.local/share/Steam/ubuntu12_32
  $ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
  $ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq


Alternatively, while Steam is running, the following command will show which non-system libraries Steam is using (not all of these are part of the Steam runtime):
Alternatively, run Steam with its runtime ({{ic|/usr/bin/steam}}) and use the following command to see which non-system libraries Steam is using (not all of these are part of the Steam runtime):
   
   
  $ for i in $(pgrep steam); do sed '/\.local/!d;s/.*  //g' /proc/$i/maps; done | sort | uniq
  $ for i in $(pgrep steam); do sed '/\.local/!d;s/.*  //g' /proc/$i/maps; done | sort | uniq
==== Libraries for x86_64 ====
The minimum required libraries needed on an x86_64 system are
* {{pkg|lib32-openal}}
* {{pkg|lib32-nss}}
* {{pkg|lib32-gtk2}}
* {{pkg|lib32-gtk3}}
* {{pkg|lib32-libcanberra}}
* {{Pkg|lib32-gconf}}
* {{Pkg|lib32-dbus-glib}}
* {{Pkg|lib32-libnm-glib}}
* {{Pkg|lib32-libudev0-shim}}
Some games may require additional libraries in order to launch without the runtime.
The meta-package {{pkg|steam-native-runtime}} includes all of these libraries (as well as some game-specific libraries) as dependencies, to simplify the install process.


== Multiple monitors setup ==
== Multiple monitors setup ==

Revision as of 18:18, 24 January 2017

Tip: The Steam launcher redirects its stdout and stderr to /tmp/dumps/USER_stdout.txt. This means you do not have to run Steam from a terminal emulator to see that output.
Note: In addition to being documented here, any bug/fix/error should be, if not already, reported on Valve's bug tracker on their GitHub page.

Debugging Steam

It is possible to debug Steam to gain more information which could be useful to find out why something does not work.

You can set DEBUGGER environment variable with one of gdb, cgdb, valgrind, callgrind, strace and then start steam.

For example with gdb

$ DEBUGGER=gdb steam

gdb will open, then type run which will start steam and once crash happens you can type backtrace to see call stack.

Steam runtime issues

Steam installs its own older versions of some libraries collectively called the "Steam Runtime". These will often conflict with the libraries included in Arch Linux, and out-of-date libraries may be missing important features (Notably, the OpenAL version they ship lacks HRTF and surround71 support).

Some of the possible symptoms of this issue are the Steam client itself crashing or hanging, and/or various errors:

libGL error: unable to load driver: some_driver_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: some_driver
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Failed to load libGL: undefined symbol: xcb_send_fd
ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
OpenGL GLX context is not using direct rendering, which may cause performance problems.
Could not find required OpenGL entry point 'glGetError'! Either your video card is unsupported or your OpenGL driver needs to be updated.
Note: A misconfigured firewall may cause Steam to fail as it can not connect to its servers. [1] Most games will crash if the Steam API fails to load.

See also upstream issue #13, and these forum threads:

Solutions

There are three ways to run Steam provided by the steam package:

$ steam-runtime

This is the command which is run when you run Steam via /usr/bin/steam or the "Steam" desktop entry. Runtime libraries which are known to cause problems are overriden via the LD_PRELOAD environment variable (see ld.so(8)). If your system still has library conflicts with this command, you can make a copy of /usr/bin/steam-runtime and edit it to add additional workarounds.

$ steam-native

This is the command run by the "Steam (Native)" desktop entry. This version forces Steam to ignore its runtime and only use system libraries. You will probably need to install steam-native-runtime in order for Steam to run at all, though some games may require additional packages. See #Finding missing runtime libraries and Steam/Game-specific troubleshooting.

$ /usr/lib/steam/steam

This is the normal Steam launcher without any Arch-specific workarounds.

Finding missing runtime libraries

If individual games or Steam itself is failing to launch when using steam-native you are probably missing libraries. To find the required libraries run:

$ cd ~/.local/share/Steam/ubuntu12_32
$ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq

Alternatively, run Steam with its runtime (/usr/bin/steam) and use the following command to see which non-system libraries Steam is using (not all of these are part of the Steam runtime):

$ for i in $(pgrep steam); do sed '/\.local/!d;s/.*  //g' /proc/$i/maps; done | sort | uniq

Multiple monitors setup

The factual accuracy of this article or section is disputed.

Reason: relating a wrong ELF class and disabling displays is inaccurate at best (Discuss in Talk:Steam/Troubleshooting)

Setup with multiple monitors can cause ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. error which will make game unable to start. If you stuck on this error and have multiple monitors, try to disable all additional displays, and then run a game. You can enable them after the game successfully started.

Also you can try this:

export LD_LIBRARY_PATH=/usr/lib32/nvidia:/usr/lib/nvidia:$LD_LIBRARY_PATH

and then run steam.

Native runtime: steam.sh line 756 Segmentation fault

Valve GitHub issue 3863

As per the bug report above, Steam crashes with /home/<username>/.local/share/Steam/steam.sh: line 756: <variable numeric code> Segmentation fault (core dumped) when running with STEAM_RUNTIME=0.

This happens because steamclient.so is linked to libudev.so.0 (lib32-libudev0AUR) which conflicts with libudev.so.1 (lib32-systemd)

The only proposed workaround is copying Steam's packaged 32-bit versions of libusb and libgudev to /usr/lib32:

# cp $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libgudev* /usr/lib32
# cp $HOME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libusb* /usr/lib32

Notice that the workaround is necessary because the bug affects systems with lib32-libgudev and lib32-libusb installed.

Alternatively it has been successful to prioritize the loading of the libudev.so.1 (see comment on the same issue):

$ LD_PRELOAD=/usr/lib32/libudev.so.1 STEAM_RUNTIME=0 steam

Audio not working or 756 Segmentation fault

First try to install pulseaudio and pulseaudio-alsa and if you run a x86_64 system lib32-libpulse and lib32-alsa-plugins.

If you do not have audio in the videos which play within the Steam client, it is possible that the ALSA libs packaged with Steam are not working.

Attempting to playback a video within the steam client results in an error similar to:

ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

A workaround is to rename or delete the alsa-lib folder and the libasound.so.* files. They can be found at:

~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/

An alternative workaround is to add the libasound.so.* library to the LD_PRELOAD environment variable:

LD_PRELOAD='/usr/$LIB/libasound.so.2 '${LD_PRELOAD} steam

If audio still won't work, adding the Pulseaudio-libs to the LD_PRELOAD variable may help:

LD_PRELOAD='/usr/$LIB/libpulse.so.0 /usr/$LIB/libpulse-simple.so.0 '${LD_PRELOAD}

Be adviced that their names may change over time. If so, it is necessary to take a look in

~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu

and find the new libs and their versions.

Bugs reports have been filed: #3376 and #3504

Text is corrupt or missing

The Steam Support instructions for Windows seem to work on Linux also.

You can install them via the steam-fontsAUR package, or manually by downloading and installing SteamFonts.zip.

Note: When steam cannot find the Arial fonts, font-config likes to fall back onto the Helveticia bitmap font. Steam does not render this and possibly other bitmap fonts correctly, so either removing problem fonts or disabling bitmap fonts will most likely fix the issue without installing the Arial or ArialBold fonts. The font being used in place of Arial can be found with the command
$ fc-match -v Arial

Specific games may have other font requirement. See Steam/Game-specific troubleshooting.

SetLocale('en_US.UTF-8') fails at game startup

Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen and then run locale-gen as root.

The game crashes immediately after start

First, right-click on the game, choose Properties, and click the "Set Launch Options" button. In that text box put:

LD_PRELOAD='./libcxxrt.so:/usr/$LIB/libstdc++.so.6' %command%

And try the game again. Some games work with this and some games don't.

Then if your game still crashes immediately, try disabling: "Enable the Steam Overlay while in-game" in game Properties.

And finally, if those don't work, you should check Steam's output for any error from the game. You may encounter the following:

  • munmap_chunk(): invalid pointer
  • free(): invalid pointer

In these particular cases, try replacing the libsteam_api.so file from the problematic game with one from a game that works fine. This error usually happens for games that were not updated recently when Steam runtime is disabled. This error has been encountered with at least AYIM, Bastion and Monaco.

OpenGL not using direct rendering / Steam crashes Xorg

Sometimes presented with the error message "OpenGL GLX context is not using direct rendering, which may cause performance problems." [2]

If you still encounter this problem after addressing #Steam runtime issues, you have probably not installed your 32-bit graphics driver correctly. See Xorg#Driver installation for which packages to install.

You can check/test if it is installed correctly by installing lib32-mesa-demos and running the following command:

$ glxinfo32 | grep OpenGL.

No audio in certain games

If there is no audio in certain games, and the suggestions provided in Steam/Game-specific troubleshooting do not fix the problem, #Native runtime may provide a successful workaround. (See the note about "Steam Runtime issues" at the top of this section.)

FMOD sound engine

While troubleshooting a sound issue, it became evident that the following games (as examples) use the 'FMOD' audio middleware package:

  • Hotline Miami
  • Hotline Miami 2
  • Transistor

This package is a bit buggy, and as a result while sound can appear to be working fine for the rest of your system, some games may still have problems.

It usually occurs when an unused sound device is used as default for ALSA. See Advanced Linux Sound Architecture#Set the default sound card.

Missing libc

This could be due to a corrupt Steam executable. Check the output of:

$ ldd ~/.local/share/Steam/ubuntu12_32/steam

Should ldd claim that it is not a dynamic executable, then Steam likely corrupted the binary during an update. The following should fix the issue:

$ cd ~/.local/share/Steam/
$ ./steam.sh --reset

If it doesn't, try to delete the ~/.local/share/Steam/ directory and launch steam again, telling it to reinstall itself.

This error message can also occur due to a bug in steam which occurs when your $HOME directory ends in a slash (Valve GitHub issue 3730). This can be fixed by editing /etc/passwd and changing /home/<username>/ to home/<username>, then logging out and in again. Afterwards, steam should repair itself automatically.

Missing libGL

You may encounter this error when you launch Steam at first time.

You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1

Make sure you have installed the lib32 version of all your video drivers as described in Xorg#Driver installation.

If you get this error after reinstalling your Nvidia proprietary drivers, or switching from a version to another, reinstall lib32-nvidia-utils and lib32-nvidia-libgl.

Games do not launch on older Intel hardware

On older Intel hardware which doesn't support OpenGL 3, such as Intel GMA chips or Westmere CPUs, games may immediately crash when run. It appears as a gameoverlayrenderer.so error in /tmp/dumps/mobile_stdout.txt, but looking in /tmp/gameoverlayrenderer.log it shows a GLXBadFBConfig error.

This can be fixed, however, by forcing the game to use a later version of OpenGL than it wants. Right click on the game, select Properties. Then, click "Set Launch Options" in the "General" tab and paste the following:

MESA_GL_VERSION_OVERRIDE=3.1 MESA_GLSL_VERSION_OVERRIDE=140 %command%

2k games do not run on xfs partitions

This article or section needs expansion.

Reason: Seems to be a general issue, e.g. [3] (Discuss in Talk:Steam/Troubleshooting)

If you are running 2k games such as Civilization 5 on xfs partitions, then the game may not start or run properly due to how the game loads files as it starts. [4]

Unable to add library folder because of missing execute permissions

If you add another steam library folder on another drive, you might receive the error message "New Steam library folder must be on a filesystem mounted with execute permissions".

Make sure you are mounting the filesystem with the correct flags in your /etc/fstab, usually by adding exec to the list of mount parameter. The parameter must occur after any user or users parameter since these can imply noexec.

This error might also occur if you are readding a library folder and Steam is unable to find a contained steamapps folder. Previous versions used SteamApps instead, so ensure the name is fully lowercase.

This error can also occur because of steam runtime issues and may be fixed following the #Dynamic linker section.

Steam controller not being detected correctly

See Gamepad#Steam Controller.

Steam hangs on "Installing breakpad exception handler..."

BBS#177245

Steam has the following output:

Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0_client)

Then nothing else happens. This is likely related to mis-matched lib32-nvidia-* packages.

'GLBCXX_3.X.XX' not found when using Bumblebee

This error is likely caused because Steam packages its own out of date libstdc++.so.6. See #Steam runtime issues about working around the bad library. See also GitHub issue 3773.

Prevent Memory Dumps Consuming RAM

Every time steam crashes, it writes a memory dump to /tmp/dumps/. If Steam falls into a crash loop, and it often does, the dump files can start consuming considerable space. Since /tmp on Arch is mounted as tmpfs, memory and swap file can be consumed needlessly. To prevent this, you can make a symbolic link to /dev/null or create and modify permissions on /tmp/dumps. Then Steam will be unable to write dump files to the directory. This also has the added benefit of Steam not uploading these dumps to Valve's servers.

# ln -s /dev/null /tmp/dumps

or

# mkdir /tmp/dumps
# chmod 600 /tmp/dumps

Killing standalone compositors when launching games

Further to this, utilising the %command% switch, you can kill standalone compositors (such as Xcompmgr or Compton) - which can cause lag and tearing in some games on some systems - and relaunch them after the game ends by adding the following to your game's launch options.

 killall compton && %command%; compton -b &

Replace compton in the above command with whatever your compositor is. You can also add -options to %command% or compton, of course.

Steam will latch on to any processes launched after %command% and your Steam status will show as in game. So in this example, we run the compositor through nohup so it is not attached to Steam (it will keep running if you close Steam) and follow it with an ampersand so that the line of commands ends, clearing your Steam status.

In Home Streaming does not work from archlinux host to archlinux guest

Chances are you are missing lib32-libcanberra. Once you install that, it should work as expected.

With that, steam should no longer crash when trying to launch a game through in home streaming.

Very slow app down speed

If your Steam apps (games, software…) download speed through client is unusually slow, but browsing Steam store and streaming videos is unaffected, installing DNS cache program, such as dnsmasq can help [5].

Symbol lookup error using dri3

Steam outputs this error and exits.

 symbol lookup error: /usr/lib/libxcb-dri3.so.0: undefined symbol: xcb_send_request_with_fds

For steam to work, disable dri3 in xorg config file or as a workaround run steam with LIBGL_DRI3_DISABLE=1

 LIBGL_DRI3_DISABLE=1 steam