Difference between revisions of "Steam"

From ArchWiki
Jump to navigation Jump to search
(Much needed warning)
m (Fixed minor typo in Steam Remote Play section)
 
(242 intermediate revisions by 58 users not shown)
Line 2: Line 2:
 
[[ja:Steam]]
 
[[ja:Steam]]
 
[[ru:Steam]]
 
[[ru:Steam]]
[[zh-CN:Steam]]
+
[[zh-hans:Steam]]
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Steam/Wine}}
+
{{Related|Steam/Troubleshooting}}
 
{{Related|Steam/Game-specific troubleshooting}}
 
{{Related|Steam/Game-specific troubleshooting}}
 +
{{Related|Gaming}}
 +
{{Related|Gamepad}}
 +
{{Related|List of games}}
 
{{Related articles end}}
 
{{Related articles end}}
From [[Wikipedia:Steam (software)|Wikipedia]]:
+
[http://store.steampowered.com/about/ Steam] is a popular game distribution platform by Valve.
: ''Steam is a digital distribution, digital rights management, multiplayer and communications platform developed by Valve Corporation. It is used to distribute games and related media online, from small independent developers to larger software houses.''
 
  
[http://store.steampowered.com/about/ Steam] is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.
+
{{Warning|Steam native runtime has issues on Arch, you can install steam-native-pcre-fix from AUR to work around store and friends not loading because of missing lib-pcre or preload required libraries as described in [[Steam/Troubleshooting#Steam_webview/game_browser_not_working_in_native_runtime]]
 +
[https://forum.manjaro.org/t/steam-cant-work-correctly-without-steam-runtime-1-anymore/79970/9 Forum Resolution]  For offical reference, see {{Bug|62095}}}}
 +
 
 +
{{Note|Steam for Linux only supports Ubuntu LTS.[https://support.steampowered.com/kb_article.php?ref=1504-QHXN-8366] Thus, do not turn to Valve for support for issues with Steam on Arch Linux.}}
  
 
== Installation ==
 
== Installation ==
  
{{Note|
+
Enable the [[multilib]] repository and [[install]] the {{Pkg|steam}} package.
* Arch Linux is '''not''' [https://support.steampowered.com/kb_article.php?ref=1504-QHXN-8366 officially supported].
 
* Because the Steam client is a 32-bit application, you will need to enable the [[multilib]] repository if you have a 64-bit system. It may also make sense to install {{Grp|multilib-devel}} to provide some important multilib libraries.
 
}}
 
 
 
To install Steam, [[install]] the {{Pkg|steam}} package. If you have a 64-bit system, enable the [[multilib]] repository first.
 
 
 
Steam is not supported on this distribution. As such some fixes are needed on the users part to get things functioning properly:
 
 
 
*Steam makes heavy usage of the Arial font. A decent Arial font to use is {{Pkg|ttf-liberation}} or [[#Text is corrupt or missing|the fonts provided by Steam]]. Asian languages require {{Pkg|wqy-zenhei}} to display properly.
 
 
 
*'''If you have a 64-bit system, you will need to install [[Xorg#Driver installation|the 32-bit version of your graphics driver]] (the package in the ''Multilib Package'' column) to run 32-bit games'''.
 
 
 
*If you have a 64-bit system, you will need to install {{pkg|lib32-alsa-plugins}} to enable sound in 32-bit games.
 
 
 
*Several games have dependencies which may be missing from your system. If a game fails to launch (often without error messages) then make sure all of the libraries listed in [[Steam/Game-specific troubleshooting]] are installed.
 
 
 
== Starting Steam ==
 
 
 
=== Big Picture Mode (with a Display Manager) ===
 
 
 
To start Steam in Big Picture Mode from a Display Manager (such as LightDM), create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following content:
 
 
 
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki>
 
[Desktop Entry]
 
Name=Steam Big Picture Mode
 
Comment=Start Steam in Big Picture Mode
 
Exec=/usr/bin/steam -bigpicture
 
TryExec=/usr/bin/steam
 
Icon=
 
Type=Application</nowiki>}}
 
 
 
Alternatively, under Steam > Settings > Interface, check 'Start Steam in Big Picture Mode' and start Steam normally. This can behave slightly better with certain window managers than the command line option.
 
 
 
=== Silent Mode ===
 
 
 
If your steam main window is showing at startup, you can add the {{ic|-silent}} parameter to your startup command to hide the window:
 
/usr/bin/steam -silent %U
 
 
 
alternatively, you can edit the following desktop file, and manually add the parameter:
 
 
 
{{hc|~/.config/autostart/steam.desktop|<nowiki>
 
[Desktop Entry]
 
Name=Steam
 
Comment=Application for managing and playing games on Steam
 
Exec=/usr/bin/steam -silent %U
 
Icon=steam
 
Terminal=false
 
Type=Application
 
Categories=Network;FileTransfer;Game;
 
MimeType=x-scheme-handler/steam;
 
Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;
 
...</nowiki>}}
 
 
 
== Troubleshooting ==
 
 
 
{{Note|In addition to being documented here, any bug/fix/error should be, if not already, reported on Valve's bug tracker on their [https://github.com/ValveSoftware/steam-for-linux GitHub page].}}
 
 
 
=== Steam runtime issues ===
 
 
 
[https://github.com/ValveSoftware/steam-runtime/issues/13 Upstream GitHub issue tracker]
 
 
 
Steam ships with its own versions of some libraries (the "Steam Runtime") in an attempt to emulate the Ubuntu 12.04 environment in later versions of Ubuntu.
 
 
 
However, some core libraries included in the Steam Runtime will often conflict with the newer versions of other libraries included in Arch Linux (such as drivers, and specifically the open-source [[ATI]] driver).
 
 
 
You can work around this by deleting the Steam Runtime versions of these libraries, forcing Steam to fall back to the up-to-date system versions (the ones installed by [[pacman]]).
 
 
 
Note that Steam will frequently re-install these runtime libraries when Steam is updated, so until [https://github.com/ValveSoftware/steam-runtime/issues/13 ValveSoftware/steam-runtime#13] is resolved, whenever Steam updates, you should exit, remove the libraries, and restart it again.
 
 
 
Run this command to remove the runtime libraries known to cause issues on Arch Linux:
 
 
 
{{bc|
 
find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete
 
}}
 
 
 
If the above command does not work, run the above command again, then run this command.
 
{{bc|
 
find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete
 
}}
 
 
 
Alternatively you can run steam overriding those libraries.
 
{{bc|LD_PRELOAD&#61;'/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' steam
 
}}
 
 
 
If you wish to use this method in a .desktop shortcut, you can use this command in the '''Exec=''' field.
 
{{bc|env LD_PRELOAD&#61;'/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' /usr/bin/steam %U
 
}}
 
 
 
If you wish to restore the files that were deleted by the commands above, you can use the built-in steam reset functionality. WARNING: This also deletes the AppCache (games).
 
{{bc|steam --reset
 
}}
 
 
 
Examples of issues / error messages known to occur if these libraries are present:
 
 
 
* {{ic|Failed to load libGL: undefined symbol: xcb_send_fd}}
 
* {{ic|ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.}}
 
* Problems with 64-bit games like XCOM
 
* "OpenGL GLX context is not using direct rendering, which may cause performance problems." [[#OpenGL not using direct rendering / Steam crashes Xorg|(see below)]]
 
* "Could not find required OpenGL entry point 'glGetError'! Either your video card is unsupported or your OpenGL driver needs to be updated."
 
* The Steam client itself crashing
 
 
 
A misconfigured firewall may also show up as a runtime issue, because Steam silently fails whenever it can't connect to its servers, and most games just crash whenever the Steam API fails to load.
 
 
 
Forum threads:
 
 
 
* https://bbs.archlinux.org/viewtopic.php?id=181171
 
* https://bbs.archlinux.org/viewtopic.php?id=183141
 
 
 
See also [[#Using native runtime]] below.
 
 
 
=== Multiple monitors setup ===
 
 
 
Setup with multiple monitors can cause
 
{{ic|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 [https://github.com/ValveSoftware/steam-for-linux/issues/3863 issue 3863]
 
 
 
As per the bug report above, Steam crashes with {{ic|/home/<username>/.local/share/Steam/steam.sh: line 756: <variable numeric code> Segmentation fault (core dumped)}} when running with STEAM_RUNTIME=0.
 
 
 
The only proposed workaround is copying Steam's packaged 32-bit versions of libusb and libgudev to /usr/lib32:
 
 
 
{{bc|# 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.
 
 
 
=== The close button only minimizes the window ===
 
 
 
: Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/1025 issue 1025]
 
 
 
To close the Steam window (and remove it from the taskbar) when you press '''x''', but keep Steam running in the tray, export the environment variable {{ic|1=STEAM_FRAME_FORCE_CLOSE=1}}. See [[Environment variables#Graphical applications]].
 
 
 
Steam provides a script located at {{ic|/usr/bin/steam}} that will be run when launching Steam; adding {{ic|1=export STEAM_FRAME_FORCE_CLOSE=1}} to this file will export the environment variable for Steam on application launch.
 
 
 
=== Audio not working or 756 Segmentation fault ===
 
 
 
First try to install {{Pkg|pulseaudio}} and {{Pkg|pulseaudio-alsa}} and if you run a x86_64 system {{Pkg|lib32-libpulse}} and {{Pkg|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.
 
 
 
If launching Steam from a terminal and attempting to playback a video within the steam client results in an error similar to the following:
 
 
 
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
 
 
 
There is a workaround which involves renaming or deleting some Steam Runtime folders and library files. The bugs have already been reported here: [https://github.com/ValveSoftware/steam-for-linux/issues/3376 #3376] and [https://github.com/ValveSoftware/steam-for-linux/issues/3504 #3504]
 
 
 
The solution is to rename or delete the {{ic|alsa-lib}} folder and the {{ic|libasound.so.*}} files. They can be found within {{bc|~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/}}
 
 
 
As an alternative, these {{ic|libasound.so.*}} libraries can also be prepended to the '''LD_PRELOAD''' environment variable to fix this issue:
 
 
 
{{bc|1=LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib32/libasound.so.2:${LD_PRELOAD}" steam}}
 
 
 
=== Text is corrupt or missing ===
 
 
 
The Steam Support [https://support.steampowered.com/kb_article.php?ref=1974-YFKL-4947 instructions] for Windows seem to work on Linux also.
 
 
 
You can install them via the {{AUR|steam-fonts}} package, or manually by downloading and [[fonts#Manual installation|installing]] [https://support.steampowered.com/downloads/1974-YFKL-4947/SteamFonts.zip 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 [[Font configuration#Disable bitmap fonts|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 {{bc|$ fc-match -v Arial}}}}
 
 
 
=== SetLocale('en_US.UTF-8') fails at game startup ===
 
 
 
Uncomment {{ic|en_US.UTF-8 UTF-8}} in {{ic|/etc/locale.gen}} and then run {{ic|locale-gen}} as root.
 
 
 
=== The game crashes immediately after start ===
 
 
 
If your game crashes immediately, try disabling: ''"Enable the Steam Overlay while in-game"'' in game ''Properties''.
 
 
 
If this doesn't work, you should launch Steam from a terminal to catch any error the game may output. 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." [https://support.steampowered.com/kb_article.php?ref=9938-EYZB-7457]
 
 
 
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 {{Pkg|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, [[#Using native runtime]] may provide a successful workaround. (See the note about "Steam Runtime issues" at the top of this section.)
 
 
 
==== Some games use FMOD to obfuscate having to deal with Linux audio stack ====
 
 
 
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 you have a default sound device set with ALSA, but you don't actually use that device, and have manually changed the device through other software, with me I had my default set as HDMI, but audio set through Steam/Gnome as S/PDIF.
 
 
 
To check what your default device is set as, use something like 'aplay' to output to your 'default' device, and see if you get sound, if you don't, your default is likely set to something that isn't even plugged in!
 
 
 
=== You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1 ===
 
 
 
You may encounter this error when you launch Steam at first time. Make sure you have installed the {{ic|lib32}} version of all your video drivers as described in [[#Installation]]
 
 
 
In some cases, if you get this error after reinstalling your Nvidia proprietary drivers, or switching from a version to another, [[reinstall]] {{Pkg|lib32-nvidia-utils}} and {{Pkg|lib32-nvidia-libgl}}.
 
 
 
=== Games do not launch on older intel hardware ===
 
 
 
On older Intel hardware, if the game immediately crashes when run, it may be because your hardware does not directly support the latest OpenGL. 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 ===
 
 
 
{{Expansion|Seems to be a general issue, e.g. [https://github.com/ValveSoftware/Source-1-Games/issues/1685]}}
 
 
 
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.
 
[https://bbs.archlinux.org/viewtopic.php?id=185222]
 
 
 
=== 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 you sure you are mounting the filesystem with the correct flags in your {{ic|/etc/fstab}}, usually by adding {{ic|exec}} to the list of mount parameter. The parameter must occur after any {{ic|user}} or {{ic|users}} parameter since these can imply {{ic|noexec}}.
+
The following requirements must be fulfilled in order to run Steam on Arch Linux:
  
This error might also occur if you are readding a library folder and Steam is unable to find a contained {{ic|steamapps}} folder. Previous versions used {{ic|SteamApps}} instead, so ensure the name is fully lowercase.
+
* Installed 32-bit version [[Xorg#Driver installation|OpenGL graphics driver]].
 +
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.
 +
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.
 +
* [[Install]] {{Pkg|wqy-zenhei}} to add support for Asian languages.
  
=== Steam controller not being detected correctly ===
+
=== SteamCMD ===
  
See [[Gamepad#Steam Controller]].
+
Install {{AUR|steamcmd}} for the command-line version of [https://developer.valvesoftware.com/wiki/SteamCMD Steam].
  
=== Claims of missing 32-bit libc.so.6 even though lib32-glibc is installed ===
+
=== Alternative Flatpak installation ===
  
The Steam launcher script checks the output of {{ic|ldd}} to determine whether all required libraries are installed; however, this may fail due to reasons other than missing libraries, such as a corrupt Steam executable.
+
Steam can also be installed with [[Flatpak]] as {{ic|com.valvesoftware.Steam}} from [https://flathub.org/ Flathub]. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:
  
Check the output of the following:
+
  flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 +
  flatpak --user install flathub com.valvesoftware.Steam
 +
  flatpak run com.valvesoftware.Steam
  
$ ldd ~/.local/share/Steam/ubuntu12_32/steam
+
The Flatpak application currently does not support themes. Also you currently can't run games via {{ic|optirun}}/{{ic|primusrun}}, see [https://github.com/flatpak/flatpak/issues/869 Issue#869] for more details.
  
Should {{ic|ldd}} claim that it is not a dynamic executable, then Steam likely corrupted the binary during an update. The following should fix the issue:
+
By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:
  
  $ cd ~/.local/share/Steam/
+
  flatpak override com.valvesoftware.Steam --filesystem=$HOME
$ ./steam.sh --reset
 
  
If it doesn't, try to delete the {{ic|~/.local/share/Steam/}} directory and launch steam again, telling it to reinstall itself.
+
==== Asian Font Problems with Flatpak ====
  
=== VERSION_ID: unbound variable ===
+
If you are having problem getting Asian fonts to show in game, it's because org.freedesktop.Platform does not include it. First try mounting your local font :
  
When you launch steam via terminal, you can see the following line:
+
  flatpak run --filesystems=~/.local/share/fonts --filesystem=~/.config/fontconfig com.valvesoftware.Steam
  /home/user/.local/share/Steam/steam.sh: line 161: VERSION_ID: unbound variable
 
This is because steam.sh checks {{ic|/etc/os-release}} for existance and if it exists, parses VERSION_ID variable, which is missing.
 
To solve problem, you can just add the following line to {{ic|/etc/os-release}}:
 
  VERSION_ID="2015.11.01"
 
  
=== Steam hangs on "Installing breakpad exception handler..." ===
+
If that doesn't work, consider this hack: make the fonts available by directly copying the font files into org.freedesktop.Platform's directories, e.g.
  
[https://bbs.archlinux.org/viewtopic.php?id=177245 BBS#177245]
+
# replace ? with your version and hash
 +
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.avail
 +
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.d
 +
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/share/fonts
  
Steam has the following output:
+
== Directory structure ==
  
Running Steam on arch rolling 64-bit
+
The default Steam install location is {{ic|~/.local/share/Steam}}. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the {{ic|~/.steam/root}} symlink to refer to the install location.
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 {{ic|lib32-nvidia-*}} packages.
+
=== Library folders ===
  
== Launching games with custom commands, such as Bumblebee/Primus ==
+
Every Steam application has a unique AppID, which you can find out by looking at its [http://store.steampowered.com/ Steam Store] page path.
  
Steam has fortunately added support for launching games using your own custom command. To do so, navigate to the Library page, right click on the selected game, click Properties, and Set Launch Options. Steam replaces the tag {{ic|%command%}} with the command it actually wishes to run. For example, to launch Team Fortress 2 with primusrun and at resolution 1920x1080, you would enter:
+
Steam installs games into a directory under {{ic|''LIBRARY''/steamapps/common/}}. {{ic|''LIBRARY''}} normally is
 +
{{ic|~/.steam/root}} but you can also have multiple library folders (''Steam > Settings > Downloads > Steam Library Folders'').
  
primusrun %command% -w 1920 -h 1080
+
In order for Steam to recognize a game it needs to have an
 +
{{ic|appmanifest_''AppId''.acf}} file in {{ic|''LIBRARY''/steamapps/}}. The appmanifest file uses the
 +
[https://developer.valvesoftware.com/wiki/KeyValues KeyValues] format and its {{ic|installdir}} property
 +
determines the game directory name.
  
On some systems optirun gives better performances than primusrun, however some games may crash shortly after the launch. This may be fixed preloading the correct version of libGL. Use:
+
== Usage ==
 
   
 
   
  locate libGL
+
  steam [ -options ] [ steam:// URL ]
  
to find out the available implementations. For a 64 bits game you may want to preload the nvidia 64 bits libGL, then use the launch command:
+
For the available command-line options see the [https://developer.valvesoftware.com/wiki/Command_Line_Options#Steam_.28Windows.29 Command Line Options article on the Valve Developer Wiki].
  
LD_PRELOAD=/usr/lib/nvidia/libGL.so optirun %command%
+
Steam also accepts an optional Steam URL, see the [https://developer.valvesoftware.com/wiki/Steam_browser_protocol Steam browser procotol].
  
If you are running the [[Linux-ck]] kernel, you may have some success in reducing overall latencies and improving performance by launching the game in SCHED_ISO (low latency, avoid choking CPU) via {{Pkg|schedtool}}
+
== Launch options ==
  
# schedtool -I -e %command% ''other arguments''
+
When you launch a Steam game, Steam executes its '''launch command''' in a [[Bash]] shell.
 +
To let you alter the launch command Steam provides '''launch options''',
 +
which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on ''Set Launch Options''.
  
Also keep in mind that Steam [http://i.imgur.com/oJcLDBi.png doesn't really care] what you want it to run. By setting {{ic|%command%}} to an environment variable, you can have Steam run whatever you would like. For example, the Launch Option used in the image above:
+
By default Steam simply appends your option string to the launch command. To set environment variables or
 +
pass the launch command as an argument to another command you can use the {{ic|%command%}} substitute.
  
IGNORE_ME=%command% glxgears
+
=== Examples ===
  
== Killing standalone compositors when launching games ==
+
* only arguments: {{ic|-foo}}
 +
* environment variables: {{ic|1=FOO=bar BAZ=bar %command% -baz}}
 +
* completely different command: {{ic|othercommand # %command%}}
  
Further to this, utilising the {{ic|%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.
+
== Tips and tricks ==
  
  killall compton && %command%; nohup compton &
+
=== Proton Steam-Play ===
  
Replace {{ic|compton}} in the above command with whatever your compositor is. You can also add -options to {{ic|%command%}} or {{ic|compton}}, of course.
+
Valve developed a compatibility tool for Steam Play based on Wine and additional components. It allows you to launch many Windows games (see [https://www.protondb.com/ compatibility list]).
  
Steam will latch on to any processes launched after {{ic|%command%}} and your Steam status will show as in game. So in this example, we run the compositor through {{ic|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.
+
It's open-source and available on [https://github.com/ValveSoftware/Proton/ Github]. Steam will install its own versions of Proton when Steam Play is enabled.
  
== Using native runtime ==
+
Proton needs to be enabled on Steam client : {{ic|Steam > Settings > Steam Play}}. You can enable Steam Play for games that have and have not been whitelisted by Valve in that dialog.
  
Steam, by default, ships with a copy of every library it uses, packaged within itself, so that games can launch without issue. This can be a resource hog, and the slightly out-of-date libraries they package may be missing important features (Notably, the OpenAL version they ship lacks [[Gaming#Binaural_Audio_with_OpenAL|HRTF]] and surround71 support). To use your own system libraries, you can run Steam with:
+
If needed, to force enable Proton or a specific version of Proton for a game, right click on the game, click {{ic|Properties > General > Force the use of a specific Steam Play compatibility tool}}, and select the desired version. Doing so can also be used to force games that have a Linux port to use the Windows version.
  
$ STEAM_RUNTIME=0 steam
+
You can also install Proton from AUR with {{AUR|proton}} or {{AUR|proton-git}}, but extra setup is required for them to work with Steam. See the Proton Github for details on how Steam recognizes Proton installs.
  
However, if you are missing any libraries Steam makes use of, this will fail to launch properly. An easy way to find the missing libraries is to run the following commands:
+
=== Big Picture Mode without a window manager ===
  
$ cd ~/.local/share/Steam/ubuntu12_32
+
To start Steam in Big Picture Mode from a [[Display manager]], you can either:
$ LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file *|sed '/ELF/!d;s/:.*//g')|grep 'not found'|sort|uniq
 
  
{{Note|The libraries will have to be 32-bit, which means you may have to download some from the AUR if on x86_64, such as NetworkManager.}}
+
* Install {{AUR|steamos-compositor}}
 +
* Alternatively, install {{AUR|steamos-compositor-plus}}, which hides the annoying color flashing on startup of Proton games and adds a fix for games that start in the background
 +
* Manually add a Steam entry (''but you lose the steam compositor advantages: mainly you '''can't''' control Big Picture mode with keyboard or gamepad''):
  
Once you have done this, run steam again with {{ic|1=STEAM_RUNTIME=0 steam}} and verify it is not loading anything outside of the handful of steam support libraries:
+
create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following contents:  
  
$ < /proc/$(pidof steam)/maps|sed '/\.local/!d;s/.*  //g'|sort|uniq
+
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki>
 +
[Desktop Entry]
 +
Name=Steam Big Picture Mode
 +
Comment=Start Steam in Big Picture Mode
 +
Exec=/usr/bin/steam -bigpicture
 +
TryExec=/usr/bin/steam
 +
Icon=
 +
Type=Application</nowiki>}}
  
'''Convenience repository'''
+
=== Steam skins ===
  
The unofficial [[Unofficial_user_repositories#alucryd-multilib|alucryd-multilib]] repository contains all libraries needed to run native steam on x86_64. Please note that, for some reason, steam does not pick up sdl2 or libav* even if you have them installed. It will still use the ones it ships with.
+
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/root}}.
  
All you need to install is the meta-package {{ic|steam-libs}}, it will pull all the libs for you. Please report if there is any missing library, the maintainer already had some lib32 packages installed so a library may have been overlooked.
+
To install a skin:
  
== Skins for Steam ==
+
# Place its directory in {{ic|~/.steam/root/skins}}.
 +
# Open ''Steam > Settings > Interface'' and select it.
 +
# Restart Steam.
  
{{Note|Using skins that are not up-to-date with the version of the Steam client may cause visual errors.}}
+
An extensive list of skins can be found in [http://forums.steampowered.com/forums/showthread.php?t=1161035 this Steam forums post].
  
The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.
+
{{Note|Using an outdated skin may cause visual errors.}}
  
An extensive list of skins can be found on [http://forums.steampowered.com/forums/showthread.php?t=1161035 Steam's forums].
+
==== Creating skins ====
  
=== Steam skin manager ===
+
Nearly all Steam styles are defined in {{ic|~/.steam/root/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.
 +
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.
  
The process of applying a skin to Steam can be greatly simplified by installing the {{AUR|steam-skin-manager}}{{Broken package link|{{aur-mirror|steam-skin-manager}}}} package. The package also comes with a hacked version of the Steam launcher which allows the window manager to draw its borders on the Steam window.
+
See {{ic|~/.steam/root/skins/skins_readme.txt}} for a primer on how to create skins.
  
As a result, skins for Steam will come in two flavors, one with and one without window buttons. The skin manager will prompt you whether you use the hacked version or not, and will automatically apply the theme corresponding to your GTK+ theme if it is found. You can of course still apply another skin if you want.
+
=== Changing the Steam notification position ===
  
The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance.
+
The default Steam notification position is bottom right.
  
== Changing the Steam friends notification placement ==
+
You can change the Steam notification position by altering {{ic|Notifications.PanelPosition}} in
  
{{Note|A handful of games do not support this, for example this can not work with XCOM: Enemy Unknown.}}
+
* {{ic|resource/styles/steam.styles}} for desktop notifications, and
 +
* {{ic|resource/styles/gameoverlay.styles}} for in-game notifications
  
=== Use a skin ===
+
Both files are overwritten by Steam on startup and {{ic|steam.styles}} is only read on startup.
  
You can create a skin that does nothing but change the notification corner. First you need to create the directories:
+
{{Note|Some games do not respect the setting in {{ic|gameoverlay.styles}} e.g. XCOM: Enemy Unknown.}}
  
  $ mkdir -p $HOME/Top-Right/resource
+
==== Use a skin ====
  $ cp -R $HOME/.steam/steam/resource/styles $HOME/Top-Right/resource/
 
  $ mv $HOME/Top-Right $HOME/.local/share/Steam/skins/
 
  $ cd .local/share/Steam/skins/
 
  $ cp -R Top-Right Top-Left && cp -R Top-Right Bottom-Right
 
  
Then modify the correct files. {{ic|Top-Right/resource/styles/gameoverlay.style}} will change the corner for the in-game overlay whereas {{ic|steam.style}} will change it for your desktop.
+
You can create a skin to change the notification position to your liking. For example to change the position to top right:
  
Now find the entry: {{ic|Notifications.PanelPosition}} in whichever file you opened and change it to the appropriate value, for example for Top-Right:
+
$ cd ~/.steam/root/skins
 +
$ mkdir -p Top-Right/resource
 +
$ cp -r ~/.steam/root/resource/styles Top-Right/resource
 +
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*
  
  Notifications.PanelPosition    "TopRight"
+
==== Live patching ====
  
This line will look the same in both files. Repeat the process for all the 3 variants ({{ic|Top-Right}}, {{ic|Top-Left}} and {{ic|Bottom-Left}}) and adjust the corners for the desktop and in-game overlay to your satisfaction for each skin, then save the files.
+
{{ic|gameoverlay.styles}} can be overwritten while Steam is running, allowing you to have game-specific notification positions.
  
To finish you will have to select the skin in Steam: ''Settings > Interface'' and ''<default skin>'' in the drop-down menu.
+
{{hc|~/.steam/notifpos.sh|
 +
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles
 +
}}
  
You can use these files across distributions and even between Windows and Linux (OS X has its own entry for the desktop notification placement)
+
And the [[#Launch options]] should be something like:
  
=== On The fly patch ===
+
~/.steam/notifpos.sh TopLeft && %command%
  
This method is more compatible with future updates of Steams since the files in the skins above are updated as part of steam and as such if the original files change, the skin will not follow the graphics update to steam and will have to be re-created every time something like that happens. Doing things this way will also give you the ability to use per-game notification locations as you can run a patch changing the location of the notifications by specifying it in the launch options for games.
+
=== Steam Remote Play ===
  
Steam updates the files we need to edit everytime it updates (which is everytime it is launched) so the most effective way to do this is patching the file after Steam has already been launched.
+
{{Note|Steam In-Home Streaming [https://store.steampowered.com/news/51761/ has become Steam Remote Play].}}
  
First you will need a patch:
+
Steam has built-in support for [http://store.steampowered.com/streaming/ remote play].
  
{{hc|$HOME/.steam/topright.patch|<nowiki>
+
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless streaming server on Linux.
--- A/steam/resource/styles/gameoverlay.styles 2013-06-14 23:49:36.000000000 +0000
 
+++ B/steam/resource/styles/gameoverlay.styles 2014-07-08 23:13:15.255806000 +0000
 
@@ -7,7 +7,7 @@
 
mostly_black "0 0 0 240"
 
semi_black "0 0 0 128"
 
semi_gray "32 32 32 220"
 
- Notifications.PanelPosition    "BottomRight"
 
+ Notifications.PanelPosition    "TopRight"
 
}
 
 
styles
 
 
</nowiki>}}
 
  
{{Note|The patch file should have all above lines, including the newline at the end.}}
+
==== Different subnets ====
  
You can edit the entry and change it between "BottomRight"(default), "TopRight" "TopLeft" and "BottomLeft": the following will assume you used "TopRight" as in the original file.
+
{{Remove|This workaround/hack seems to be no longer relevant since it became a feature of [https://store.steampowered.com/news/51761/ Steam Remote Play].}}
  
Next create an alias in {{ic|$HOME/.bashrc}}:
+
Steam client will not be able to detect host if both are on different subnets, which is common case when using VPN to your home network. Even if both client and server can ping each other - steam client would still not be able to detect host, so you need to force it. To do it, start Steam with below command:
  
  alias steam_topright='pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd'
+
$ steam -console
  
Log out and back in to refresh the aliases. Launch Steam and wait for it to fully load, then run the alias
+
Wait until Steam starts. Once it loaded, you will find extra tab named "Console". Open it and then paste below command with correct host IP address:
  
  $ steam_topright
+
connect_remote <host_ip>:27036
  
And most games you launch after this will have their notification in the upper right corner.
+
You will see notification that you can now stream games from host machine.
  
You can also duplicate the patch and make more aliases for the other corners if you do not want all games to use the same corner so you can switch back.
+
{{Note|If above doesn't work - Windows is likely blocking all incoming traffic from different subnets, which means any connections coming from VPN tunnel will be dropped. This also can be confirmed by simply performing ping requests without any response to Windows machine from your VPN client. To workaround this, configure (or disable) all Windows firewalls (including existing antiviruses).}}
  
To automate the process you will need a script file as steam launch options cannot read your aliases. The location and name of the file could for example be '''$HOME/.scripts/steam_topright.sh''', and assuming that is the path you used, it needs to be executable:
+
{{Tip|See [[Gaming#Remote gaming]] for alternatives if above solution does not work.}}
  
  $ chmod +755 $HOME/.scripts/steam_topright.sh
+
=== Steam Controller ===
  
The contents of the file should be the following:
+
Normally a Steam controller requires the use of the Steam-overlay.  In non-Steam native Linux games however the overlay may not be practical.  For that, while the Steam client is running it will maintain a "desktop configuration".  With your Steam controller, configure the desktop configuration for it as a generic XBOX controller.  As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller.  Make sure to select your type of controller to map to in "general controller settings".
  
  #!/bin/sh
 
  pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd
 
  
And the launch options should be something like the following.
 
  
  $HOME/.scripts/steam_topright.sh && %command%
+
== Troubleshooting ==
  
There is another file in the same folder as '''gameoverlay.style''' folder called '''steam.style''' which has an entry with the exact same function as the file we patched and will change the notification corner for the desktop only (not in-game), but for editing this file to actually work it has to be set before steam is launched and the folder set to read-only so steam cannot re-write the file. Therefore the only two ways to modify that file is to make the directory read only so steam cannot change it when it is launched (can break updates) or making a skin like in method 1.
+
See [[Steam/Troubleshooting]].
  
 
== See also ==
 
== See also ==
  
* https://wiki.gentoo.org/wiki/Steam
+
* [https://wiki.gentoo.org/wiki/Steam Gentoo Wiki article]
 +
* [https://pcgamingwiki.com/wiki/The_Big_List_of_DRM-Free_Games_on_Steam The Big List of DRM-Free Games on Steam] at PCGamingWiki
 +
* [http://steam.wikia.com/wiki/List_of_DRM-free_games List of DRM-free games] at Wikia
 +
* [http://store.steampowered.com/browse/linux Steam Linux store]
 +
* [https://github.com/ValveSoftware/Proton/ Proton] Compatibility tool for Steam Play based on Wine and additional components.

Latest revision as of 06:00, 17 July 2019

Steam is a popular game distribution platform by Valve.

Warning: Steam native runtime has issues on Arch, you can install steam-native-pcre-fix from AUR to work around store and friends not loading because of missing lib-pcre or preload required libraries as described in Steam/Troubleshooting#Steam_webview/game_browser_not_working_in_native_runtime Forum Resolution For offical reference, see FS#62095
Note: Steam for Linux only supports Ubuntu LTS.[1] Thus, do not turn to Valve for support for issues with Steam on Arch Linux.

Installation

Enable the multilib repository and install the steam package.

The following requirements must be fulfilled in order to run Steam on Arch Linux:

SteamCMD

Install steamcmdAUR for the command-line version of Steam.

Alternative Flatpak installation

Steam can also be installed with Flatpak as com.valvesoftware.Steam from Flathub. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:

 flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 flatpak --user install flathub com.valvesoftware.Steam
 flatpak run com.valvesoftware.Steam

The Flatpak application currently does not support themes. Also you currently can't run games via optirun/primusrun, see Issue#869 for more details.

By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:

flatpak override com.valvesoftware.Steam --filesystem=$HOME

Asian Font Problems with Flatpak

If you are having problem getting Asian fonts to show in game, it's because org.freedesktop.Platform does not include it. First try mounting your local font :

flatpak run --filesystems=~/.local/share/fonts --filesystem=~/.config/fontconfig  com.valvesoftware.Steam

If that doesn't work, consider this hack: make the fonts available by directly copying the font files into org.freedesktop.Platform's directories, e.g.

# replace ? with your version and hash
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.avail
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.d 
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/share/fonts

Directory structure

The default Steam install location is ~/.local/share/Steam. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the ~/.steam/root symlink to refer to the install location.

Library folders

Every Steam application has a unique AppID, which you can find out by looking at its Steam Store page path.

Steam installs games into a directory under LIBRARY/steamapps/common/. LIBRARY normally is ~/.steam/root but you can also have multiple library folders (Steam > Settings > Downloads > Steam Library Folders).

In order for Steam to recognize a game it needs to have an appmanifest_AppId.acf file in LIBRARY/steamapps/. The appmanifest file uses the KeyValues format and its installdir property determines the game directory name.

Usage

steam [ -options ] [ steam:// URL ]

For the available command-line options see the Command Line Options article on the Valve Developer Wiki.

Steam also accepts an optional Steam URL, see the Steam browser procotol.

Launch options

When you launch a Steam game, Steam executes its launch command in a Bash shell. To let you alter the launch command Steam provides launch options, which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on Set Launch Options.

By default Steam simply appends your option string to the launch command. To set environment variables or pass the launch command as an argument to another command you can use the %command% substitute.

Examples

  • only arguments: -foo
  • environment variables: FOO=bar BAZ=bar %command% -baz
  • completely different command: othercommand # %command%

Tips and tricks

Proton Steam-Play

Valve developed a compatibility tool for Steam Play based on Wine and additional components. It allows you to launch many Windows games (see compatibility list).

It's open-source and available on Github. Steam will install its own versions of Proton when Steam Play is enabled.

Proton needs to be enabled on Steam client : Steam > Settings > Steam Play. You can enable Steam Play for games that have and have not been whitelisted by Valve in that dialog.

If needed, to force enable Proton or a specific version of Proton for a game, right click on the game, click Properties > General > Force the use of a specific Steam Play compatibility tool, and select the desired version. Doing so can also be used to force games that have a Linux port to use the Windows version.

You can also install Proton from AUR with protonAUR or proton-gitAUR, but extra setup is required for them to work with Steam. See the Proton Github for details on how Steam recognizes Proton installs.

Big Picture Mode without a window manager

To start Steam in Big Picture Mode from a Display manager, you can either:

  • Install steamos-compositorAUR
  • Alternatively, install steamos-compositor-plusAUR, which hides the annoying color flashing on startup of Proton games and adds a fix for games that start in the background
  • Manually add a Steam entry (but you lose the steam compositor advantages: mainly you can't control Big Picture mode with keyboard or gamepad):

create a /usr/share/xsessions/steam-big-picture.desktop file with the following contents:

/usr/share/xsessions/steam-big-picture.desktop
[Desktop Entry]
Name=Steam Big Picture Mode
Comment=Start Steam in Big Picture Mode
Exec=/usr/bin/steam -bigpicture
TryExec=/usr/bin/steam
Icon=
Type=Application

Steam skins

The Steam interface can be customized using skins. Skins can overwrite interface-specific files in ~/.steam/root.

To install a skin:

  1. Place its directory in ~/.steam/root/skins.
  2. Open Steam > Settings > Interface and select it.
  3. Restart Steam.

An extensive list of skins can be found in this Steam forums post.

Note: Using an outdated skin may cause visual errors.

Creating skins

Nearly all Steam styles are defined in ~/.steam/root/resource/styles/steam.styles (the file is over 3,500 lines long). For a skin to be recognized it needs its own resource/styles/steam.styles. When a Steam update changes the official steam.styles your skin may become outdated, potentially resulting in visual errors.

See ~/.steam/root/skins/skins_readme.txt for a primer on how to create skins.

Changing the Steam notification position

The default Steam notification position is bottom right.

You can change the Steam notification position by altering Notifications.PanelPosition in

  • resource/styles/steam.styles for desktop notifications, and
  • resource/styles/gameoverlay.styles for in-game notifications

Both files are overwritten by Steam on startup and steam.styles is only read on startup.

Note: Some games do not respect the setting in gameoverlay.styles e.g. XCOM: Enemy Unknown.

Use a skin

You can create a skin to change the notification position to your liking. For example to change the position to top right:

$ cd ~/.steam/root/skins
$ mkdir -p Top-Right/resource
$ cp -r ~/.steam/root/resource/styles Top-Right/resource
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*

Live patching

gameoverlay.styles can be overwritten while Steam is running, allowing you to have game-specific notification positions.

~/.steam/notifpos.sh
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles

And the #Launch options should be something like:

~/.steam/notifpos.sh TopLeft && %command%

Steam Remote Play

Note: Steam In-Home Streaming has become Steam Remote Play.

Steam has built-in support for remote play.

See this Steam Community guide on how to setup a headless streaming server on Linux.

Different subnets

Tango-edit-cut.pngThis section is being considered for removal.Tango-edit-cut.png

Reason: This workaround/hack seems to be no longer relevant since it became a feature of Steam Remote Play. (Discuss in Talk:Steam#)

Steam client will not be able to detect host if both are on different subnets, which is common case when using VPN to your home network. Even if both client and server can ping each other - steam client would still not be able to detect host, so you need to force it. To do it, start Steam with below command:

$ steam -console

Wait until Steam starts. Once it loaded, you will find extra tab named "Console". Open it and then paste below command with correct host IP address:

connect_remote <host_ip>:27036

You will see notification that you can now stream games from host machine.

Note: If above doesn't work - Windows is likely blocking all incoming traffic from different subnets, which means any connections coming from VPN tunnel will be dropped. This also can be confirmed by simply performing ping requests without any response to Windows machine from your VPN client. To workaround this, configure (or disable) all Windows firewalls (including existing antiviruses).
Tip: See Gaming#Remote gaming for alternatives if above solution does not work.

Steam Controller

Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a "desktop configuration". With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in "general controller settings".


Troubleshooting

See Steam/Troubleshooting.

See also