Difference between revisions of "Steam"

From ArchWiki
Jump to: navigation, search
(Native Steam on Linux)
m (Added Backout Instructions, Clarified refreshing desktop session required to effect xprofile changes, Clarified minimal approach vs repo/meta-package for users.)
 
(297 intermediate revisions by 97 users not shown)
Line 1: Line 1:
 
[[Category:Gaming]]
 
[[Category:Gaming]]
[[Category:Wine]]
 
 
[[ja:Steam]]
 
[[ja:Steam]]
 +
[[ru:Steam]]
 
[[zh-CN:Steam]]
 
[[zh-CN:Steam]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|[http://store.steampowered.com/about/ Steam] is a content delivery system made by Valve Software. It 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.}}
+
{{Related|Steam/Wine}}
 +
{{Related|Steam/Troubleshooting}}
 +
{{Related|Steam/Game-specific troubleshooting}}
 +
{{Related articles end}}
 +
From [[Wikipedia:Steam (software)|Wikipedia]]:
 +
: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.
  
{{Article summary heading|Related}}
+
[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.
{{Article summary wiki|Wine}}
+
{{Article summary wiki|Steam/Game-specific troubleshooting}}
+
{{Article summary end}}
+
  
From [[Wikipedia:Steam (software)|Wikipedia]]:
+
== Installation ==
: ''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.''
+
  
== Native Steam on Linux ==
+
{{Note|Arch Linux is '''not''' [https://support.steampowered.com/kb_article.php?ref=1504-QHXN-8366 officially supported].}}
  
{{Note|
+
If you have a 64-bit system, enable the [[multilib]] repository.
* 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. You also most likely need to install the 32-bit version of your graphics driver to run Steam.
+
}}
+
  
Steam can be installed with the package {{Pkg|steam}}, available in the [[official repositories]]. If you have a 64-bit system, enable the [[multilib]] repository first.
+
[[Install]] the {{Pkg|steam}} package.
  
 
Steam is not supported on this distribution. As such some fixes are needed on the users part to get things functioning properly:
 
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 one of the official Microsoft fonts packages containing Arial: {{AUR|ttf-microsoft-arial}}, {{AUR|ttf-ms-win8}},{{AUR|ttf-office-2007-fonts}}, {{AUR|ttf-win7-fonts}} or {{AUR|ttf-ms-fonts}}. See [[MS Fonts]] for more details. Asian languages require {{Pkg|wqy-zenhei}} to display properly.
+
*Steam makes heavy usage of the Arial font. A decent Arial font to use is {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|the fonts provided by Steam]]. Asian languages require {{Pkg|wqy-zenhei}} to display properly.
  
*Most games require {{Pkg|libtxc_dxtn}} and {{Pkg|lib32-libtxc_dxtn}} when using mesa drivers, so it is recommended to install these packages.
+
*If you have a 64-bit system, you '''must''' install the 32-bit Multilib version of your [[Xorg#Driver installation|graphics driver]].
  
*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.  
+
*If you have a 64-bit system, you will need to install {{pkg|lib32-alsa-plugins}} to enable sound.
  
=== Troubleshooting ===
+
*If you have a 64-bit system, you will need to install {{pkg|lib32-curl}} to enable update at first run.
  
{{Note|
+
*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.
* 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].
+
* Connection problems may occur when using DD-WRT with peer-to-peer traffic filtering.
+
}}
+
  
==== GUI problems with KDE ====
+
== Usage ==
  
: Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/594 issue 594]
+
=== Big Picture Mode (with a Display Manager) ===
  
If you are using KDE and you have problems with the GUI (such as lag or random crashes), in KDE system settings, go to ''Workspace Appearance and Behaviour > Desktop Effects > Advanced''. Change "Compositing type" from "XRender" to "OpenGL".
+
To start Steam in Big Picture Mode from a Display Manager (such as GDM), install {{AUR|steam-session-git}}. This will set up the necessary session files to launch Steam from xfwm4, along with shutting down Steam cleanly on exit. Launching from xfwm4 may also help those having issues with mouse/keyboard/controller input.
  
==== The close button only minimizes the window ====
 
  
: Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/1025 issue 1025]
+
Alternatively, you can create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following content:
  
To close the Steam window (and remove it from the taskbar) when you press '''x''', but keep Steam running in the tray, set the environment variable {{ic|STEAM_FRAME_FORCE_CLOSE}} to {{ic|1}}. You can do this by launching Steam using the following command.
+
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki>
$ STEAM_FRAME_FORCE_CLOSE=1 steam
+
[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>}}
  
==== Flash not working on 64-bit systems ====
+
=== Silent Mode ===
  
: Steam Support [https://support.steampowered.com/kb_article.php?ref=1493-GHZB-7612 article]
+
To stop the main window from showing at startup, use the {{ic|-silent}} option:
 +
$ steam -silent
  
First ensure {{Pkg|lib32-flashplugin}} is installed. It should be working at this point, if not create a local Steam Flash plugin folder:
+
alternatively, if you launch Steam from a desktop shortcut, you can add this option to a custom [[desktop entry]]:
$ mkdir ~/.steam/bin32/plugins/
+
and set a symbolic link to the global lib32 flash plugin file in your upper new folder
+
$ ln -s /usr/lib32/mozilla/plugins/libflashplayer.so ~/.steam/bin32/plugins/
+
  
==== Text is corrupt or missing ====
+
{{hc|~/.config/autostart/steam.desktop|<nowiki>
 +
[Desktop Entry]
 +
Name=Steam
 +
...
 +
Exec=/usr/bin/steam -silent %U
 +
...
 +
</nowiki>}}
  
The Steam Support [https://support.steampowered.com/kb_article.php?ref=1974-YFKL-4947 instructions] for Windows seem to work on Linux also: Simply download [https://support.steampowered.com/downloads/1974-YFKL-4947/SteamFonts.zip SteamFonts.zip] and install them (copying to {{ic|~/.fonts/}} works at least).
+
=== Headless In-Home Streaming Server ===
  
==== Error on some games: black textures/S3TC support is missing ====
+
To setup a Headless In-Home Streaming Server follow the Guide at: https://steamcommunity.com/sharedfiles/filedetails/?id=680514371
  
Install the following dependencies:
+
== Tips and tricks ==
* {{Pkg|libtxc_dxtn}}
+
* {{Pkg|lib32-libtxc_dxtn}}
+
  
====Black screen on (Valve?) games (but audio works)====
+
=== Launching games with custom commands ===
  
Check the Steam stdout/stderr for Error lines, some quick dependencies for reference:
+
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:
* {{Pkg|lib32-intel-dri}} (not confirmed as absolutely necessary)
+
  
Run Steam from console via primusrun steam
+
primusrun %command% -w 1920 -h 1080
  
If using KDE, disable all desktop effects ({{ic|Alt+Shift+F12}}) before starting Steam.
+
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:
 +
 +
locate libGL
  
==== SetLocale('en_US.UTF-8') fails at game startup ====
+
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:
  
Edit {{ic|/etc/locale.gen}} in your favourite editor and uncomment the line {{ic|en_US.UTF-8 UTF-8}}. Then run {{ic|# locale-gen}}.
+
LD_PRELOAD=/usr/lib/nvidia/libGL.so optirun %command%
  
==== Steam complains about direct rendering not available on 64bit systems with NVIDIA driver ====
+
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}}
  
Make sure you have [multilib] enabled in {{ic|/etc/pacman.conf}}.
+
# schedtool -I -e %command% ''other arguments''
  
Install the following dependencies:
+
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:
* {{Pkg|lib32-nvidia-utils}}
+
* {{Pkg|lib32-nvidia-libgl}}
+
  
Steam, being a 32-bit application, requires 32-bit nvidia GL libraries to run. This packages will install the proper 32-bit libGl libraries and symlinks in {{ic|/usr/lib32}} and will replace any existing mesa equivalent symlinks.
+
IGNORE_ME=%command% glxgears
  
=== Launching games with custom commands, such as Bumblebee/Primus ===
+
=== Killing standalone compositors when launching games ===
  
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:
+
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.
  
primusrun %command% -w 1920 -h 1080
+
  killall compton && %command%; compton -b &
  
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}}
+
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.
  
# schedtool -I -e %command% ''other arguments''
+
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.
  
==== Killing standalone compositors when launching games ====
+
=== Using native runtime ===
  
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.
+
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:
  
  killall compton && %command%; nohup compton &
+
$ STEAM_RUNTIME=0 steam
  
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.
+
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:
  
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.
+
$ cd ~/.local/share/Steam/ubuntu12_32
 +
$ LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file *|sed '/ELF/!d;s/:.*//g')|grep 'not found'|sort|uniq
  
=== Using native runtime ====
+
{{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.}}
  
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 HRTF support). To use your own system libraries, you can run Steam with:
+
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:
 +
 +
$ for i in $(pgrep steam); do sed '/\.local/!d;s/.*  //g' /proc/$i/maps; done | sort | uniq
  
  STEAM_RUNTIME=0 steam
+
To launch Steam using native runtime in a graphical user environment you can add the [[Environment_variables|environment variable]] to your [[xprofile]] file:
  
However, if you're 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:
+
{{hc|~/.xprofile|<nowiki>
 +
export STEAM_RUNTIME=0
 +
</nowiki>}}
  
  cd ~/.local/share/Steam/ubuntu12_32
+
If you create or edit this file while in a desktop session you will need to log out and then back into your [[desktop environment]] to enable the change to take effect.
  LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file *|sed '/ELF/!d;s/:.*//g')|grep 'not found'|sort|uniq
+
  
Note that 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.
+
'''Backing out the using native runtime in a graphical environment change'''
  
Once you've done this, run steam again with STEAM_RUNTIME=0 steam and verify it's not loading anything outside of the handful of steam support libraries:
+
To reverse this change remove or comment out the export line in your [[xprofile]] file. Log out and then in again to refresh your desktop session. When launched, Steam will use the old bundled Ubuntu libraries.
  
  cat /proc/`pidof steam`/maps|sed '/\.local/!d;s/.*  //g'|sort|uniq
+
'''Convenience repository'''
 +
 
 +
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.
 +
 
 +
All you need to install is the meta-package {{AUR|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.
 +
 
 +
'''Satisfying dependencies without using the convenience repository or steam-libs meta-package (For x86_64)'''
 +
 
 +
If you do not like the approach of installing all the libraries known for Steam and various game-compatibility libraries and want to install the minimum required libraries to launch Steam and most games install the following libraries:
 +
 +
Steam on x86_64 requires the following libraries from [[Arch User Repository|AUR]] to be installed {{AUR|lib32-gconf}} {{AUR|lib32-dbus-glib}} {{AUR|lib32-libnm-glib}} and {{AUR|lib32-libudev0}}.
 +
 
 +
It will also require the following libraries from the [[multilib]] repository {{pkg|lib32-openal}} {{pkg|lib32-nss}} {{pkg|lib32-gtk2}} and {{pkg|lib32-gtk3}}.
 +
 
 +
If Steam displays errors related to libcanberra-gtk3 install {{pkg|lib32-libcanberra}}.
 +
 
 +
While most games will run with the minimal set of libraries listed here some games will require additional libraries to run. For a list of known game-compatibility libraries consult the [[Steam/Game-specific troubleshooting|game-specific troubleshooting]] page.
  
 
=== Skins for Steam ===
 
=== Skins for Steam ===
 +
 +
{{Note|Using skins that are not up-to-date with the version of the Steam client may cause visual errors.}}
  
 
The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.
 
The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.
 +
 +
An extensive list of skins can be found on [http://forums.steampowered.com/forums/showthread.php?t=1161035 Steam's forums].
  
 
==== Steam skin manager ====
 
==== Steam skin manager ====
  
The process of applying a skin to Steam can be greatly simplified using {{AUR|steam-skin-manager}} from the AUR. 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.
+
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.
  
 
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.
 
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.
  
The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance. A Faience theme is under development and already has its own package on the AUR {{AUR|steam-skin-faience-git}}.
+
The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance.
  
== Steam on Wine ==
+
=== Changing the Steam friends notification placement ===
  
Install {{Pkg|wine}} from the [[multilib]] and follow the instructions provided in the [[Wine|article]].
+
{{Note|A handful of games do not support this, for example this can not work with XCOM: Enemy Unknown.}}
  
Install the required Microsoft fonts {{AUR|ttf-microsoft-tahoma}} and {{AUR|ttf-ms-fonts}} from the [[AUR]] or through {{AUR|winetricks-svn}}.
+
==== Use a skin ====
{{Note|If you have access to Windows discs, you may want to install {{AUR|ttf-ms-win8}} or {{AUR|ttf-win7-fonts}} instead.}}
+
  
If you have an old Wine prefix ({{ic|~/.wine}}), you should remove it and let Wine create a new one to avoid problems (you can transfer over anything you want to keep to the new Wine prefix).
+
You can create a skin that does nothing but change the notification corner. First you need to create the directories:
  
=== Installation ===
+
  $ mkdir -p $HOME/Top-Right/resource
 +
  $ 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
  
Download and run the Steam installer from [http://store.steampowered.com/about/ steampowered.com]. It is no longer an {{ic|.exe}} file so you have to start it with {{ic|msiexec}}:
+
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.
$ msiexec /i SteamInstall.msi
+
  
=== Starting Steam ===
+
Now find the entry: {{ic|Notifications.PanelPosition}} in whichever file you opened and change it to the appropriate value, for example for Top-Right:
  
On x86:
+
  Notifications.PanelPosition    "TopRight"
$ wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe
+
  
On x86_64 (with steam installed to a clean wine prefix):
+
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.
$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe
+
  
Alternatively, you may use this method:
+
To finish you will have to select the skin in Steam: ''Settings > Interface'' and ''<default skin>'' in the drop-down menu.
$ wine "C:\\Program Files\\Steam\\steam.exe"
+
  
You should consider making an alias to easily start steam (and put it in your shell's rc file), example:
+
You can use these files across distributions and even between Windows and Linux (OS X has its own entry for the desktop notification placement)
alias steam='wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'
+
  
{{Note|If you are using an nvidia card through Bumblebee, you should prefix those commands with {{ic|optirun}}.}}
+
==== On-the-fly patch ====
  
=== Tips ===
+
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.
  
==== Performance ====
+
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.
  
Consider disabling wine debugging output by adding this to your shell rc file:
+
First you will need a patch:
export WINEDEBUG=-all
+
or, just add it to your steam alias to only disable it for steam:
+
alias steam='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'
+
Additionally, Source games rely on a paged pool memory size specification for audio, and WINE by default does not have this set. To set it:
+
$ wine reg add "HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\" /v PagedPoolSize /t REG_DWORD /d 402653184 /f
+
  
==== Application launch options ====
+
{{hc|$HOME/.steam/topright.patch|<nowiki>
 +
--- 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>}}
  
Go to ''Properties > Set Launch Options'', e.g.:
+
{{Note|The patch file should have all above lines, including the newline at the end.}}
-console -dxlevel 90 -width 1280 -height 1024
+
* {{ic|console}}
+
: Activate the console in the application to change detailed applications settings.
+
* {{ic|dxlevel}}
+
: Set the application's DirectX level, e.g. 90 for DirectX Version 9.0. It is recommended to use the video card's DirectX version to prevent crashes. See the official Valve Software wiki http://developer.valvesoftware.com/wiki/DirectX_Versions for details.
+
* {{ic|width}} and {{ic|height}}
+
: Set the screen resolution. In some cases the graphic settings are not saved in the application and the applications always starts in the default resolution.
+
Please refer to http://developer.valvesoftware.com/wiki/Launch_options for a complete list of launch options.
+
  
==== Using a pre-existing Steam install ====
+
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.
  
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to {{ic|~/.wine/drive_c/Program Files/Steam/}} . However, be sure to do '''all''' the previous steps in this wiki. Confirm Steam launches and logs into your account, ''then'' do this:
+
Next create an alias in {{ic|$HOME/.bashrc}}:
  
$ cd ~/.wine/drive_c/Program\ Files/
+
  alias steam_topright='pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd'
$ mv Steam/ Steam.backup/  (or you can just delete the directory)
+
$ ln -s /mnt/windows_partition/Program\ Files/Steam/
+
  
{{Note|
+
Log out and back in to refresh the aliases. Launch Steam and wait for it to fully load, then run the alias
* If you have trouble starting Steam after symlinking the entire Steam folder, try linking only the {{ic|steamapps}} subdirectory in your existing wine steam folder instead.
+
* If you still have trouble starting games, use {{ic|# mount --bind /path/to/SteamApps ~/.local/share/Steam/SteamApps -ouser&#61;your-user-name }}, this is the only thing that worked for me with {{ic|TF2}}.
+
}}
+
  
==== Steam links in Firefox, Chrome, etc ====
+
  $ steam_topright
  
To make {{ic|steam://}} urls in your browser connect with Steam in Wine, there are several things you can do. One involves making steam url-handler keys in gconf, another involves making protocol files for KDE, others involve tinkering with desktop files or the Local State file for chromium. These seem to only work in firefox or under certain desktop configurations. One way to do it that works more globally is using mimeo, a tool made by Xyne (an Arch TU) which follows. For another working and less invasive (but firefox-only) way, see the first post [http://ubuntuforums.org/showthread.php?t=433548 here] .
+
And most games you launch after this will have their notification in the upper right corner.
  
* Make {{ic| /usr/bin/steam}} with your favorite editor and paste:
+
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.
  
{{bc|
+
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:
#!/bin/sh
+
#
+
# Steam wrapper script
+
#
+
exec wine "c:\\program files\\steam\\steam.exe" "$@"
+
}}
+
  
* Make it executable:
+
  $ chmod +755 $HOME/.scripts/steam_topright.sh
  
# chmod +x /usr/bin/steam
+
The contents of the file should be the following:
  
* Install {{AUR|mimeo}} and {{AUR|xdg-utils-mimeo}} from AUR. You will need to replace the existing {{Pkg|xdg-utils}} if installed. In XFCE, you will also need {{Pkg|xorg-utils}}.
+
  #!/bin/sh
 +
  pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd
  
* Create {{ic|~/.config/mimeo.conf}} with your favorite editor and paste:
+
And the launch options should be something like the following.
  
{{bc|
+
  $HOME/.scripts/steam_topright.sh && %command%
/usr/bin/steam %u
+
  ^steam://
+
}}
+
  
* Lastly, open {{ic|/usr/bin/xdg-open}} in your favorite editor. Go to the {{ic|detectDE()}} section and change it to look as follows:
+
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.
  
{{bc|<nowiki>
+
=== Prevent Memory Dumps Consuming RAM ===
detectDE()
+
 
{
+
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.
    #if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
+
 
    #elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
+
# ln -s /dev/null /tmp/dumps
    #elif $(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1) ; then DE=gnome;
+
    #elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+
    #elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
+
    #else DE=""
+
    #fi
+
    DE=""
+
}
+
</nowiki>}}
+
  
* Restart the browser and you should be good to go. In Chromium, you cannot enter a {{ic|steam://}} link in the url box like you can with Firefox. The forum link above has a {{ic|steam://open/friends}} link to try if needed.
+
or
  
{{Note|
+
# mkdir /tmp/dumps
* If you have any problems with file associations after doing this, simply revert to regular xdg-utils and undo your changes to {{ic|/usr/bin/xdg-open}}.
+
# chmod 600 /tmp/dumps
* Those on other distributions that stumble upon this page, see the link above for firefox specific instructions. No easy way to get it working on Chromium on other distros exists.
+
}}
+
  
==== No text rendered problem ====
+
== Troubleshooting ==
  
If there is no text/font rendered when starting steam you should try to start steam with the parameter {{ic|-no-dwrite}}. Read more in [https://bbs.archlinux.org/viewtopic.php?id=146223 the forum thread about it.]
+
See [[Steam/Troubleshooting]].
{{bc|wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite}}
+
  
 
== See also ==
 
== See also ==
  
* https://wiki.gentoo.org/wiki/Steam
+
* [https://wiki.gentoo.org/wiki/Steam Steam] at Gentoo wiki
* [http://appdb.winehq.org/objectManager.php?sClass=version&iId=19444 Wine Application Database]
+
* [http://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

Latest revision as of 20:50, 26 May 2016

From Wikipedia:

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.

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.

Installation

Note: Arch Linux is not officially supported.

If you have a 64-bit system, enable the multilib repository.

Install the steam package.

Steam is not supported on this distribution. As such some fixes are needed on the users part to get things functioning properly:

  • If you have a 64-bit system, you must install the 32-bit Multilib version of your graphics driver.
  • If you have a 64-bit system, you will need to install lib32-curl to enable update at first run.
  • 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.

Usage

Big Picture Mode (with a Display Manager)

To start Steam in Big Picture Mode from a Display Manager (such as GDM), install steam-session-gitAUR. This will set up the necessary session files to launch Steam from xfwm4, along with shutting down Steam cleanly on exit. Launching from xfwm4 may also help those having issues with mouse/keyboard/controller input.


Alternatively, you can create a /usr/share/xsessions/steam-big-picture.desktop file with the following content:

/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

Silent Mode

To stop the main window from showing at startup, use the -silent option:

$ steam -silent

alternatively, if you launch Steam from a desktop shortcut, you can add this option to a custom desktop entry:

~/.config/autostart/steam.desktop
[Desktop Entry]
Name=Steam
...
Exec=/usr/bin/steam -silent %U
...

Headless In-Home Streaming Server

To setup a Headless In-Home Streaming Server follow the Guide at: https://steamcommunity.com/sharedfiles/filedetails/?id=680514371

Tips and tricks

Launching games with custom commands

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 %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:

primusrun %command% -w 1920 -h 1080

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:

locate libGL

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:

LD_PRELOAD=/usr/lib/nvidia/libGL.so optirun %command%

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 schedtool

# schedtool -I -e %command% other arguments

Also keep in mind that Steam doesn't really care what you want it to run. By setting %command% to an environment variable, you can have Steam run whatever you would like. For example, the Launch Option used in the image above:

IGNORE_ME=%command% glxgears

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.

Using native runtime

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 HRTF and surround71 support). To use your own system libraries, you can run Steam with:

$ STEAM_RUNTIME=0 steam

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:

$ cd ~/.local/share/Steam/ubuntu12_32
$ 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.

Once you have done this, run steam again with STEAM_RUNTIME=0 steam and verify it is not loading anything outside of the handful of steam support libraries:

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

To launch Steam using native runtime in a graphical user environment you can add the environment variable to your xprofile file:

~/.xprofile
export STEAM_RUNTIME=0

If you create or edit this file while in a desktop session you will need to log out and then back into your desktop environment to enable the change to take effect.

Backing out the using native runtime in a graphical environment change

To reverse this change remove or comment out the export line in your xprofile file. Log out and then in again to refresh your desktop session. When launched, Steam will use the old bundled Ubuntu libraries.

Convenience repository

The unofficial 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.

All you need to install is the meta-package steam-libsAUR, 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.

Satisfying dependencies without using the convenience repository or steam-libs meta-package (For x86_64)

If you do not like the approach of installing all the libraries known for Steam and various game-compatibility libraries and want to install the minimum required libraries to launch Steam and most games install the following libraries:

Steam on x86_64 requires the following libraries from AUR to be installed lib32-gconfAUR lib32-dbus-glibAUR lib32-libnm-glibAUR and lib32-libudev0AUR.

It will also require the following libraries from the multilib repository lib32-openal lib32-nss lib32-gtk2 and lib32-gtk3.

If Steam displays errors related to libcanberra-gtk3 install lib32-libcanberra.

While most games will run with the minimal set of libraries listed here some games will require additional libraries to run. For a list of known game-compatibility libraries consult the game-specific troubleshooting page.

Skins for Steam

Note: Using skins that are not up-to-date with the version of the Steam client may cause visual errors.

The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.

An extensive list of skins can be found on Steam's forums.

Steam skin manager

The process of applying a skin to Steam can be greatly simplified by installing the steam-skin-managerAUR[broken link: archived in aur-mirror] 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.

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.

The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance.

Changing the Steam friends notification placement

Note: A handful of games do not support this, for example this can not work with XCOM: Enemy Unknown.

Use a skin

You can create a skin that does nothing but change the notification corner. First you need to create the directories:

 $ mkdir -p $HOME/Top-Right/resource
 $ 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. Top-Right/resource/styles/gameoverlay.style will change the corner for the in-game overlay whereas steam.style will change it for your desktop.

Now find the entry: Notifications.PanelPosition in whichever file you opened and change it to the appropriate value, for example for Top-Right:

 Notifications.PanelPosition     "TopRight"

This line will look the same in both files. Repeat the process for all the 3 variants (Top-Right, Top-Left and Bottom-Left) and adjust the corners for the desktop and in-game overlay to your satisfaction for each skin, then save the files.

To finish you will have to select the skin in Steam: Settings > Interface and <default skin> in the drop-down menu.

You can use these files across distributions and even between Windows and Linux (OS X has its own entry for the desktop notification placement)

On-the-fly patch

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 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.

First you will need a patch:

$HOME/.steam/topright.patch
--- 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
 
Note: The patch file should have all above lines, including the newline at the end.

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.

Next create an alias in $HOME/.bashrc:

 alias steam_topright='pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd'

Log out and back in to refresh the aliases. Launch Steam and wait for it to fully load, then run the alias

 $ steam_topright

And most games you launch after this will have their notification in the upper right corner.

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.

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:

 $ chmod +755 $HOME/.scripts/steam_topright.sh

The contents of the file should be the following:

 #!/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%

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.

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

Troubleshooting

See Steam/Troubleshooting.

See also