Steam

From Gentoo Wiki
Jump to: navigation, search
Resources

Steam is an Internet-based digital distribution, digital rights management (DRM), multiplayer, and social networking platform developed by Valve Corporation. Steam provides the user with installation and automatic updating of games on multiple computers, and community features such as friends lists and groups, cloud saving, and in-game voice and chat functionality. - Wikipedia, the free encyclopedia

Games

Prerequisites

Important
Steam is a 32-bit application and requires a multilib profile on amd64, unless a chroot is used.

Dependencies

Note
This section can be skipped when using the steam-launcher ebuild from an overlay.
Note
The following dependencies may be outdated and require verification. Some of the dependencies may be bundled by the Steam runtime, in which case the system libraries will not be used.

For portage, add the following file to create a set of required steam dependencies:

FILE /etc/portage/sets/steam
# mandatory!
dev-libs/glib:2
dev-libs/libgcrypt
dev-libs/nspr
dev-libs/nss
gnome-base/gconf
media-libs/alsa-lib
media-libs/fontconfig
media-libs/freetype:2
media-libs/libjpeg-turbo
media-libs/libogg
media-libs/libpng:1.2
media-libs/libsdl
media-libs/libtheora
media-libs/libvorbis
media-libs/libtxc_dxtn
media-libs/openal
net-misc/curl
net-print/cups
sys-apps/dbus
>=sys-devel/gcc-4.6.0
>=sys-libs/glibc-2.15
>=sys-libs/zlib-1.2.4
virtual/libusb:1
virtual/opengl
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/pango
x11-libs/pixman
 
# optional
media-sound/pulseaudio
net-misc/networkmanager
x11-misc/xdg-user-dirs

For paludis, add the following file to create a set of required steam dependencies:

FILE /etc/paludis/sets/steam.conf
# mandatory!
* dev-libs/glib:2
* dev-libs/libgcrypt
* dev-libs/nspr
* dev-libs/nss
* gnome-base/gconf
* media-libs/alsa-lib
* media-libs/fontconfig
* media-libs/freetype:2
* media-libs/libjpeg-turbo
* media-libs/libogg
* media-libs/libpng:1.2
* media-libs/libsdl
* media-libs/libtheora
* media-libs/libvorbis
* media-libs/libtxc_dxtn
* media-libs/openal
* net-misc/curl
* net-print/cups
* sys-apps/dbus
* >=sys-devel/gcc-4.6.0
* >=sys-libs/glibc-2.15
* >=sys-libs/zlib-1.2.4
* virtual/libusb:1
* virtual/opengl
* x11-libs/cairo
* x11-libs/gdk-pixbuf
* x11-libs/gtk+:2
* x11-libs/libX11
* x11-libs/libXext
* x11-libs/libXfixes
* x11-libs/libXi
* x11-libs/libXrandr
* x11-libs/libXrender
* x11-libs/pango
* x11-libs/pixman
 
# optional
? media-sound/pulseaudio
? net-misc/networkmanager
? x11-misc/xdg-user-dirs

Install the Steam set. For portage do:

root #emerge --ask @steam

For paludis do:

root #cave resolve steam -x

USE flags

For portage, to enable the required USE flags for steam dependencies under amd64, add the the following file:

FILE /etc/portage/package.use/steam
dev-db/sqlite abi_x86_32
dev-libs/expat abi_x86_32
dev-libs/glib abi_x86_32
dev-libs/libffi abi_x86_32
dev-libs/libpthread-stubs abi_x86_32
dev-libs/nspr abi_x86_32
dev-libs/nss abi_x86_32
dev-util/pkgconfig abi_x86_32
media-libs/libtxc_dxtn abi_x86_32
media-libs/mesa abi_x86_32
sys-devel/llvm abi_x86_32
sys-fs/udev abi_x86_32
sys-libs/gpm abi_x86_32
sys-libs/ncurses abi_x86_32
sys-libs/readline abi_x86_32
sys-libs/zlib abi_x86_32
virtual/libffi abi_x86_32
virtual/libiconv abi_x86_32
virtual/libudev abi_x86_32
virtual/pkgconfig abi_x86_32
x11-libs/libdrm abi_x86_32
x11-libs/libpciaccess abi_x86_32
x11-libs/libX11 abi_x86_32
x11-libs/libXau abi_x86_32
x11-libs/libxcb abi_x86_32
x11-libs/libXdamage abi_x86_32
x11-libs/libXdmcp abi_x86_32
x11-libs/libXext abi_x86_32
x11-libs/libXfixes abi_x86_32
x11-libs/libxshmfence abi_x86_32
x11-libs/libXxf86vm abi_x86_32
x11-proto/damageproto abi_x86_32
x11-proto/dri2proto abi_x86_32
x11-proto/dri3proto abi_x86_32
x11-proto/fixesproto abi_x86_32
x11-proto/glproto abi_x86_32
x11-proto/inputproto abi_x86_32
x11-proto/kbproto abi_x86_32
x11-proto/presentproto abi_x86_32
x11-proto/xcb-proto abi_x86_32
x11-proto/xextproto abi_x86_32
x11-proto/xf86bigfontproto abi_x86_32
x11-proto/xf86driproto abi_x86_32
x11-proto/xf86vidmodeproto abi_x86_32
x11-proto/xproto abi_x86_32

For paludis, to enable the required USE flags for steam dependencies under amd64, add the the following file:

FILE /etc/paludis/use.conf.d/steam.conf
dev-db/sqlite ABI_X86: 32
dev-libs/expat ABI_X86: 32
dev-libs/glib ABI_X86: 32
dev-libs/libffi ABI_X86: 32
dev-libs/libpthread-stubs ABI_X86: 32
dev-libs/nspr ABI_X86: 32
dev-libs/nss ABI_X86: 32
dev-util/pkgconfig ABI_X86: 32
media-libs/libtxc_dxtn ABI_X86: 32
media-libs/mesa ABI_X86: 32
sys-devel/llvm ABI_X86: 32
sys-fs/udev ABI_X86: 32
sys-libs/gpm ABI_X86: 32
sys-libs/ncurses ABI_X86: 32
sys-libs/readline ABI_X86: 32
sys-libs/zlib ABI_X86: 32
virtual/libffi ABI_X86: 32
virtual/libiconv ABI_X86: 32
virtual/libudev ABI_X86: 32
virtual/pkgconfig ABI_X86: 32
x11-libs/libdrm ABI_X86: 32
x11-libs/libpciaccess ABI_X86: 32
x11-libs/libX11 ABI_X86: 32
x11-libs/libXau ABI_X86: 32
x11-libs/libxcb ABI_X86: 32
x11-libs/libXdamage ABI_X86: 32
x11-libs/libXdmcp ABI_X86: 32
x11-libs/libXext ABI_X86: 32
x11-libs/libXfixes ABI_X86: 32
x11-libs/libxshmfence ABI_X86: 32
x11-libs/libXxf86vm ABI_X86: 32
x11-proto/damageproto ABI_X86: 32
x11-proto/dri2proto ABI_X86: 32
x11-proto/dri3proto ABI_X86: 32
x11-proto/fixesproto ABI_X86: 32
x11-proto/glproto ABI_X86: 32
x11-proto/inputproto ABI_X86: 32
x11-proto/kbproto ABI_X86: 32
x11-proto/presentproto ABI_X86: 32
x11-proto/xcb-proto ABI_X86: 32
x11-proto/xextproto ABI_X86: 32
x11-proto/xf86bigfontproto ABI_X86: 32
x11-proto/xf86driproto ABI_X86: 32
x11-proto/xf86vidmodeproto ABI_X86: 32
x11-proto/xproto ABI_X86: 32

Update the system. Under portage do:

root #emerge --ask --changed-use --deep @world

Under paludis do:

root #cave resolve -c world -x

Kernel

Steam expects that /dev/shm, which requires kernel tmpfs support, is mounted prior to being started. /dev/shm should be mounted automatically by OpenRC and systemd during boot, but can also be mounted explicitly via /etc/fstab:

FILE /etc/fstab
# to limit the size add e.g. size=768M to opts (default is 50%)
 
#<fs>      <mountpoint>    <type>	<opts>		     <dump/pass>
shm        /dev/shm        tmpfs        nodev,nosuid,noexec  0 0

Installation

Note
Steam officially supports Ubuntu 12.04+. Attempting to run Steam on any other Linux distribution may cause various issues. Refer to client and games troubleshooting for details.

The Steam installer downloads and installs the Steam client to the users home directory. This prevents Portage from managing the Steam client updates or the software installed by it. The Steam client is solely responsible for managing software installation and updates.

Important
The instructions throughout this page use the typical Steam installation directory ~/.local/share/Steam.

Manual

Fetch and extract the Steam installer:

user $tar -xvzpf steam_latest.tar.gz

Run the Steam installer:

user $cd steam
user $./steam

Install the above Steam installer script:

root #cp steam /usr/local/bin

Steam can be started with:

user $steam
Note
The following step is highly optional. It is recommend with a dedicated Steam user account, to prevent Steam (or the software it depends on) from interfering with the regular user account.

To avoid restarting or running two X servers in parallel, su to the Steam user, and use x11-apps/xauth to give the Steam user access to the running X server. Refer to bash-steam-launcher for details.

Manual with alternative installer script

The following installation method is almost identical to the manual installation method, except that an alternative Steam installer script is used.

Fetch the Steam installer and extract the required files:

user $tar -xvzf steam_latest.tar.gz steam/bootstraplinux_ubuntu12_32.tar.xz
user $tar -xvzf steam_latest.tar.gz steam/steam.desktop

Fetch and run Julian Ospald's (hasufell) Steam installer script:

If the installer script creates broken symbolic links when run with Dash, run the installer script with Bash instead:

user $bash ./steam

Overlay

The steam-launcher ebuild is available from the Gentoo Gamers overlay or anyc's Steam overlay.

Chroot

It is possible to run Steam in a 32-bit chroot on amd64 without relying on multilib, or the emul-linux-x86-* packages (which are masked and scheduled for removal[1]).

Create the chroot directory:

root #mkdir /usr/local/steam32
root #cd /usr/local/steam32

Fetch and extract the stage tarball:

Copy DNS information:

root #cp -L /etc/resolv.conf etc

Create the Portage directory:

root #mkdir usr/portage

Mount the necessary filesystems:

root #mount -R /dev dev
root #mount -R /sys sys
root #mount -t proc proc proc
root #mount -R /usr/portage usr/portage

Chroot with linux32, which is provided by the sys-apps/util-linux package, and update the environment:

root #linux32 chroot .
root #env-update && source /etc/profile

Create the Steam user:

root #useradd -m -G audio,video steam

Next, install Steam from one of the above installation methods. When complete, create the following wrapper script to setup the chroot, su to the Steam user, and start Steam.

FILE /usr/local/bin/steam32
#!/bin/sh
 
CHROOT_DIR=/usr/local/steam32
 
mount -R /dev "${CHROOT_DIR}/dev"
mount -R /sys "${CHROOT_DIR}/sys"
mount -t proc proc "${CHROOT_DIR}/proc"
mount -R /usr/portage "${CHROOT_DIR}/usr/portage"
 
[ -f $CHROOT_DIR/var/run/dbus.pid ] || chroot "${CHROOT_DIR}" dbus-launch
chroot "${CHROOT_DIR}" su steam -c "dbus-launch steam"
 
umount -l "${CHROOT_DIR}/dev"
umount -l "${CHROOT_DIR}/sys"
umount -l "${CHROOT_DIR}/proc"
umount -l "${CHROOT_DIR}/usr/portage"

Although the above script uses D-Bus, it is possible to run Steam without it, but a manual method is required to connect the X server from within the chroot.

Client troubleshooting

Adobe Flash Player on amd64

Note
Installing Adobe Flash Player on amd64 may no longer be necessary, as the Steam client supports playback of full screen HTML5 video[2].
  • Installation via the package manager (recommended)

The following USE flags are required. Under portage add/modify the following file:

FILE /etc/portage/package.use/steam
www-plugins/adobe-flash abi_x86_32

Under paludis add/modify the following file:

FILE /etc/paludis/use.conf.d/steam.conf
www-plugins/adobe-flash ABI_X86: 32

Install the www-plugins/adobe-flash package. Under portage do:

root #emerge --ask www-plugins/adobe-flash

Under paludis do:

root #cave resolve -z www-plugins/adobe-flash -x

Create the plugins directory:

user $mkdir ~/.local/share/Steam/ubuntu12_32/plugins

Create a symbolic link to libflashplayer.so in the plugins directory:

user $ln -s /usr/lib32/nsbrowser/plugins/libflashplayer.so ~/.local/share/Steam/plugins
  • Manual installation

Create the plugins directory:

user $mkdir ~/.local/share/Steam/ubuntu12_32/plugins

Fetch the 32-bit Linux Adobe Flash Player tarball, and then extract libflashplayer.so:

user $tar -xvzf install_flash_player_11_linux.i386.tar.gz -C ~/.local/share/Steam/ubuntu12_32/plugins libflashplayer.so

Set libflashplayer.so as executable:

user $chmod +x ~/.local/share/Steam/ubuntu12_32/plugins/libflashplayer.so

Direct rendering is not being used

If Steam starts with the following error:

Error: OpenGL GLX context is not using direct rendering, which may cause performance problems.

Confirm if direct rendering is enabled with glxinfo, which is provided by the x11-apps/mesa-progs package:

root #glxinfo | grep "direct rendering"
direct rendering: Yes

If direct rendering is not enabled, ensure that the correct OpenGL implementation is selected:

root #eselect opengl list

Next, ensure that the user running Steam has sufficient permissions to access direct rendering. If the USE variable is set to acl and ConsoleKit or systemd is being used, permissions will be handled automatically. Otherwise, add the user running Steam to the video group:

root #gpasswd -a user video

If direct rendering is enabled and the correct OpenGL implementation is selected, then this issue may be caused by app-eselect/eselect-opengl 1.3*.[3]. This issue has been fixed for users of the steam-launcher ebuild. Otherwise, run the following for a temporary workaround:

For ATI drivers:

user $LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/ati/lib" steam

For Nvidia drivers:

user $LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib" steam

If direct rendering is still not enabled, refer to the Steam Knowledge Base article on direct rendering for possible solutions.

Hardened Gentoo

It seems that the Steam binary has rwx bits set, and needs to be PaX marked in order to work on a hardened system:

user $paxctl-ng -m ~/.local/share/Steam/ubuntu12_32/steam

The binaries of most games should also be PaX marked:

user $paxctl-ng -m ~/.local/share/Steam/SteamApps/common/World\ of\ Goo/WorldOfGoo
user $paxctl-ng -m ~/.local/share/Steam/SteamApps/common/Uplink/uplink.bin.x86_64
user $paxctl-ng -m ~/.local/share/Steam/SteamApps/common/Team\ Fortress\ 2/hl2_linux

Failure to perform PaX marking will result in the game failing to run, with little information given. To check if a game needs to be PaX marked, run the game's startup script or binary file (found in ~/.local/share/Steam/SteamApps or ~/.local/share/Steam/SteamApps/common) under a debugger. This can be accomplished with some of Valve's provided startup scripts by setting the GAME_DEBUGGER environment variable to gdb:

user $env GAME_DEBUGGER=gdb ./hl2.sh

If a binary needs to be PaX marked, gdb should output something similar to:

warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages!

and/or:

Cannot access memory at address 0x80486c6.

After an update in July 2013, Steam also needs a PaX marked /bin/bash when the OpenGL libraries require rwx markings, otherwise games will fail to run from the Steam client[4]:

user $sudo paxctl-ng -m /bin/bash

However, this results in Bash failing to run. It is also a security issue, and it is strongly recommended to try without PaX marking. If it works when using the proprietary Nvidia drivers, please make a note of it on this page.

Memory corruption

If Steam starts with the following error:

*** glibc detected *** zenity: malloc(): memory corruption: 0x00000000016cf020 ***

Installing the x11-libs/libXi package should fix the issue. Under portage do

root #emerge --ask x11-libs/libXi

Under paludis do:

root #cave resolve -z x11-libs/libXi -x

Missing fonts

If Steam is having issues with missing fonts, installing the media-fonts/font-bitstream-100dpi and media-fonts/corefonts packages may fix the issue. Under portage do:

root #emerge --ask media-fonts/font-bitstream-100dpi media-fonts/corefonts

Under paludis do:

root #cave resolve -z media-fonts/font-bitstream-100dpi media-fonts/corefonts -x

If the X server does not recognize the newly installed fonts, run the following:

user $xset +fp /usr/share/fonts/100dpi
user $xset +fp /usr/share/fonts/corefonts
user $xset fp rehash

Reset the installation

To reset (i.e. wipe) the Steam installation, including installed games, and reinstall Steam without losing data:

user $steam --reset

Reversed X cursor

If an X cursor theme has not been set by the desktop environment or window manager, Steam will override the default X cursor theme. This can result in a reversed X cursor from left to right. The issue can be fixed by setting an X cursor theme, if one is available, or by installing an X cursor theme. Under portage do:

root #emerge --ask x11-themes/vanilla-dmz-xcursors

Under paludis do:

root #cave resolve -z x11-themes/vanilla-dmz-xcursors -x

If the X cursor is still reversed, even after exiting Steam, run the following to fix the issue:

user $xsetroot -cursor_name left_ptr

Segfault when remember my password is selected

Selecting the Remember my password option at the Steam login dialog, when Steam is running without D-Bus, will cause Steam to segfault the next time it is started[5]. This issue can be fixed by running the following:

user $rm -fr ~/.local/share/Steam/config

Taskbar button persists even when closed or minimzed

Depending on the desktop environment being used, the Steam taskbar button may persist even when the Steam window is closed or minimized to the system tray[6]. To correct this behavior, force the Steam window to close instead of minimize:

user $STEAM_FRAME_FORCE_CLOSE=1 steam

To set the STEAM_FRAME_FORCE_CLOSE environment variable permanently, add the following to the shell login initialization file:

FILE ~/.bash_profileSetting a local environment variable with Bash
export STEAM_FRAME_FORCE_CLOSE=1

Log out and back in to have the changes take effect.

Use system libraries

Steam bundles many libraries which are used instead of the system libraries. To force Steam to use the system libraries, disable the Steam runtime:

Warning
It is not recommended to disable the Steam runtime, as it can lead to numerous problems, including runtime and missing 32-bit libraries.
user $STEAM_RUNTIME=0 steam

To set the STEAM_RUNTIME environment variable permanently, add the following to the shell login initialization file:

FILE ~/.bash_profileSetting a local environment variable with Bash
export STEAM_RUNTIME=0

Log out and back in to have the changes take effect.

Video drivers

  • If ATI Legacy drivers are used, and a Valve game (Counter-Strike: Source, Team Fortress 2, etc.) fails to start with the following error:
Required OpenGL extension "GL_EXT_texture_sRGB_decode" is not supported. Please update your OpenGL driver.

Update the ATI Legacy drivers to the most recent version[7].

Games troubleshooting

Texture compression

Many games, especially those that use the Source engine, require S3 Texture Compression (S3TC) support. Without S3TC support, these games will usually have black or missing textures, or fail to start.

  • Enable S3TC support

The following USE flags are required for amd64:

FILE /etc/portage/package.use/steam
media-libs/libtxc_dxtn abi_x86_32

Install the media-libs/libtxc_dxtn package. Under portage do:

root #emerge --ask media-libs/libtxc_dxtn

Under paludis do:

root #cave resolve -z media-libs/libtxc_dxtn -x

Next, confirm if S3TC support is enabled with glxinfo, which is provided by the x11-apps/mesa-progs package:

root #glxinfo | grep GL_EXT_texture_compression_s3tc
    GL_EXT_texture_compression_s3tc

If S3TC support is not enabled, ensure that the VIDEO_CARDS variable in /etc/portage/make.conf is set to the correct value, and update the video driver to most recent version.

If S3TC support is enabled, but games fail to start with the following error:

This system does not support the OpenGL extension GL_EXT_texture_compression_s3tc

Force enable S3TC support with:

user $force_s3tc_enable=true steam

If nouveau drivers are being used, installing x11-libs/gtkglarea may be required to fix the above error. Under portage do:

root #emerge --ask x11-libs/gtkglarea

Under paludis do:

root #cave resolve -z x11-libs/gtkglarea -x

Dota 2

  • If a red screen is visible during startup and textures are missing in-game, refer to texture compression for details[10].

Left 4 Dead 2

Rust (legacy)

  • If the launcher fails to start, adding LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" %command% to the launch options in Library->Rust->Properties->General->Set launch options.., may fix the issue.

Sid Meier's Civilization V

  • If a black screen is visible and the introduction music is audible during startup, changing the value of FSResID may fix this issue[11]:
FILE ~/.local/share/Aspyr/Sid Meier's Civilization 5/GraphicsSettingsDX9.ini
FSResID = 7

The correct value for FSResID appears to be system dependent, and may require setting different values before working.

Starbound

  • If the launcher fails to start with the following error:
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.

Adding $(dirname %command%)/starbound to the launch options in Library->Starbound->Properties->General->Set launch options.., may fix the issue.

Stealth Bastard Deluxe

root #emerge --ask media-fonts/font-misc-misc

Under paludis do:

root #cave resolve -z media-fonts/font-misc-misc -x

Stealth Bastard Deluxe specifically requests the fonts 9x15/9x15b, which can be checked for availability with x11-apps/xlsfonts. Otherwise, add the fonts to the font path, or create a font alias:

FILE /usr/share/fonts/misc/fonts.alias
9x15 -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1
9x15B -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1

Team Fortress 2

  • If a black screen is visible for 1-2 seconds, adding -nojoy to the launch options in Library->Team Fortress 2->Properties->General->Set launch options.., may fix the issue.

X3: Terran Conflict and X3: Albion Prelude

  • If red, green and blue stripes are visible, or the launcher fails to start, refer to texture compression for details[13].

Asking for help

The best place to ask for help is the Steam thread on the Gentoo Forums. If a solution to an issue is confirmed by others, add it to this page. Please do not remove content without discussion, unless it is obviously wrong.

External resources

References

  1. Michał Górny. True multilib support on amd64, Gentoo, March 28th, 2015. Retrieved on May 25th, 2015.
  2. Valve. Steam Client Update Released, Steam, November 12th, 2014. Retrieved on May 29th, 2015.
  3. Michał Górny. steam-launcher likely broken with eselect-opengl-1.3*, anyc's Steam Overlay, January 2nd, 2015. Retrieved on May 27th, 2015.
  4. Alex Efros. Compatibility with PaX/GrSecurity, Steam for Linux, December 22nd, 2012. Retrieved on May 28th, 2015.
  5. Shished. Steam segfaults when "remember my password" is checked, Steam for Linux, July 28th, 2014. Retrieved on May 25th, 2015.
  6. Kevin Cox. Close to Tray, Steam for Linux, January 30th, 2013. Retrieved on May 27th, 2015.
  7. Mark Browning. [WORKAROUND] Allow TF2 to run with legacy ATI drivers 12.6., Steam for Linux Steam Community, December 4th, 2012. Retrieved on May 30th, 2015.
  8. Arkady Rost. Black texture, Dota 2 Linux and Mac client, August 14th, 2013. Retrieved on May 26th, 2015.
  9. michaelsudnick. Black ground texture on Gentoo amd64, radeonsi open source driver, Dota 2 Linux and Mac client, July 12th, 2014. Retrieved on May 26th, 2015.
  10. proatx. Red-screen and no textures, Dota 2 Linux and Mac client, December 16th, 2013. Retrieved on May 26th, 2015.
  11. Nowaker. Linux: blank/black screen after start - windowed mode maybe?, Sid Meier's Civilization V Steam Community, June 12th, 2014. Retrieved on May 28th, 2015.
  12. Dirk Meijer. Segmentation Fault in Linux, Stealth Bastard Deluxe Steam Community, May 3rd, 2013. Retrieved on May 27th, 2015.
  13. timon37. X³: TC and AP - Linux support thread, X Universe Forums, April 13th, 2013. Retrieved on May 26th, 2015.