Difference between revisions of "Steam"

From Funtoo
Jump to navigation Jump to search
(47 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Subpages|Docker}}
Steam is a content delivery system and ecosystem for gaming, developed by Valve Software. It offers hundreds of games, from popular ones such as DOTA 2 to many other less popular and even obscure community games. Steam runs on Microsoft Windows, MacOS, and also Linux.
Steam is a content delivery system and ecosystem for gaming, developed by Valve Software. It offers hundreds of games, from popular ones such as DOTA 2 to many other less popular and even obscure community games. Steam runs on Microsoft Windows, MacOS, and also Linux.


=== History on Funtoo ===
== Current Supported Options ==
 
Through Funtoo Linux 1.2, it was possible to play Steam directly under Funtoo. However, with the move to Funtoo Linux 1.3, 32-bit support was dropped from Funtoo, and Steam is currently dependent on a host of 32-bit libraries. Thus, Steam no longer worked under Funtoo directly. Howevever, it is still possible to run Steam under Funtoo via use of containerization technology.
 
=== Steam in Docker ===
 
This page will currently document the setup of Steam running on NVIDIA hardware, with documentation for non-NVIDIA hardware to follow shortly.
 
To run Steam on NVIDIA graphics, with full PulseAudio sound, docker with NVIDIA support will be used.
 
=== Host Setup ===
 
To get your host ready to run Steam, emerge the following packages:
 
{{console|body=
# ##i##emerge -av --jobs docker nvidia-container-runtime nvidia-docker
}}
 
You will also want to ensure that you have NVIDIA proprietary graphics running in a graphical environment on your host. Please ensure that you have {{c|x11-drivers/nvidia-kernel-modules-435.21-r1}} or later installed on your host, and that you don't have any special permissions settings in {{f|/etc/modprobe.d}}.
 
Next, you will want to add {{c|docker}} and {{c|nvidia-container}} to your default runlevel:
 
{{console|body=
# ##i##rc-update add docker default
##g##*##!g## service docker added to runlevel default
# ##i##rc-update add nvidia-container default
##g##*##!g## nvidia-container added to runlevel default.
# rc
}}
 
=== User Setup ===
 
When using docker, you will be starting the Steam container as a regular user account so the container can inherit the connection to
your X server. You will want to make sure your user account is in the {{c|docker}} group:
 
{{console|body=
# ##i##gpasswd -a drobbins docker
Adding user drobbins to group docker
}}
 
You will need to log out and log back in for this group change to take effect.
 
=== PulseAudio Setup ===
 
In order to allow the container to connect to PulseAudio, you will of course need to be using PulseAudio, and then you will also need to enable support for UNIX socket connectivity in PulseAudio. This can be done by adding the following to {{f|/etc/pulse/default.pa}}:
 
{{file|name=/etc/pulse/default.pa|body=
load-module module-native-protocol-unix auth-anonymous=1
}}
 
Once this is done, you should restart your user's pulseaudio daemon for this to take immediate effect:
 
{{console|body=
$ killall pulseaudio
}}
 
Once this has been done, you should be able to see a {{c|native}} UNIX socket in the PulseAudio run directory. This socket will get mapped into the container:
 
{{console|body=
$ ##i##ls /run/user/$UID/pulse/
native  pid
}}
 
=== Docker Container Setup ===
 
As your regular user, create the following script:
 
{{file|name=create-steam.sh|lang=bash|body=
#!/bin/bash
xhost +local:
exec nvidia-docker run \
-ti \
--name steam-nvidia-${USER} \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /dev/shm:/dev/shm \
--privileged \
-v /run/user/${UID}/pulse:/run/user/1000/pulse \
-e PULSE_SERVER=unix:/run/user/1000/pulse/native \
funtoolinux/steam-nvidia-ubuntu18:1.0 \
/bin/bash
}}
 
Now, make the script executable and run it:
 
{{console|body=
$ ##i##chmod +x create-steam.sh
$ ##i##./create-steam.sh
}}
 
The container should begin to initialize and you should then be placed inside the container, at which point you can perform some quick
tests to ensure that the container is functioning properly.


=== Container Validation ===
The current recommended method for running Steam on Funtoo is via use of [[Flatpak]]. The steps for setting this up are listed on the [[Flatpak]] page and will get you up and running with Steam. The Flatpak Steam image is based on Ubuntu 12.


To ensure that PulseAudio is functioning properly from within the container, the following command can be run to play back white noise via PulseAudio:
In the past we have also offered a Docker image for Steam, but this method is no longer officially supported. See [[Steam/Docker]] for details on this image. It actually works very similarly to the Flatpak method, and interested developers may want to play with it or study it. It was missing some things like desktop icon integration. Since it requires a decent amount of work to maintain, and the Flatpak Steam image is actively maintained by others, and works well, Daniel Robbins decided it would be best to just use the Flatpak version as our official method.


{{console|body=
While these two options use different technologies, under the hood they are actually quite similar. They both use a containerized version of Ubuntu which contains the SteamOS runtime.
%steam-container% ##i##pacat -vvvv /dev/urandom
}}


To ensure that OpenGL is working properly from within the container, and that the container is properly connecting to your X server, you can run {{c|glxgears}}:
== History on Funtoo ==


{{console|body=
Through Funtoo Linux 1.2, it was possible to play Steam directly under Funtoo. However, with the move to Funtoo Linux 1.3, 32-bit support was dropped from Funtoo, and Steam is currently dependent on a host of 32-bit libraries.
%steam-container% ##i##glxgears
}}


You should see glxgears running in a window on your desktop.
Thus, Steam no longer worked under Funtoo directly. However, it is still possible to run Steam under Funtoo via use of containerization technology. Initially, much of the setup was left to users to figure out. But now, there are officially supported options for Steam that are easy to set up.


At this point, you can exit the container by pressing Control-D or typing {{c|exit}}. Make a mental note that the container name is {{c|steam-nvidia-yourusername}}.
[[Category:Official Documentation]]
[[Category:Containers]]
[[Category:Docker]]
[[Category:Games]]

Revision as of 07:10, February 22, 2021

Subpages:

Steam is a content delivery system and ecosystem for gaming, developed by Valve Software. It offers hundreds of games, from popular ones such as DOTA 2 to many other less popular and even obscure community games. Steam runs on Microsoft Windows, MacOS, and also Linux.

Current Supported Options

The current recommended method for running Steam on Funtoo is via use of Flatpak. The steps for setting this up are listed on the Flatpak page and will get you up and running with Steam. The Flatpak Steam image is based on Ubuntu 12.

In the past we have also offered a Docker image for Steam, but this method is no longer officially supported. See Steam/Docker for details on this image. It actually works very similarly to the Flatpak method, and interested developers may want to play with it or study it. It was missing some things like desktop icon integration. Since it requires a decent amount of work to maintain, and the Flatpak Steam image is actively maintained by others, and works well, Daniel Robbins decided it would be best to just use the Flatpak version as our official method.

While these two options use different technologies, under the hood they are actually quite similar. They both use a containerized version of Ubuntu which contains the SteamOS runtime.

History on Funtoo

Through Funtoo Linux 1.2, it was possible to play Steam directly under Funtoo. However, with the move to Funtoo Linux 1.3, 32-bit support was dropped from Funtoo, and Steam is currently dependent on a host of 32-bit libraries.

Thus, Steam no longer worked under Funtoo directly. However, it is still possible to run Steam under Funtoo via use of containerization technology. Initially, much of the setup was left to users to figure out. But now, there are officially supported options for Steam that are easy to set up.