Difference between revisions of "Steam"

From Funtoo
Jump to: navigation, search
(Host Validation)
 
(14 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, but much of the setup was left to users to figure out.
 
 
 
Now, not only is Steam supported, but we now have officially-tested Docker images to allow you to do this easily. Currently we have just an NVIDIA docker image, but this is actually the more challenging one to build and one for Open Source graphics will be appearing shortly.
 
 
 
Funtoo's official Steam container for use with NVIDIA graphics is based on Ubuntu 18, since Steam and Ubuntu have an unholy alliance and this is the officially-supported platform for Steam. That's fine -- we can still run Steam on Ubuntu -- on Funtoo!
 
 
 
The base Ubuntu container image upon which our container is an official Ubuntu container from NVIDIA Corporation and has been configured to work perfectly with container GPU acceleration and libglvnd.
 
 
 
=== Steam in Docker ===
 
 
 
{{Note|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 GPUs, you must meet the following prerequisites:
 
 
 
* You must be using Funtoo Linux 1.4 or later, x86-64bit.
 
* You must have an NVIDIA graphics card.
 
* Already have NVIDIA drivers ({{c|x11-drivers/nvidia-drivers}}) installed and a desktop environment running that uses them.
 
* A regular, non-root user created from which you will be launching Steam.
 
* PulseAudio working.
 
 
 
If you are using the [https://forums.funtoo.org/topic/3125-gnome-stages-and-lxd-images-now-available/ Funtoo Linux GNOME stage3] as a starting point, you should be in good shape regarding all these requirements.
 
 
 
=== 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
 
}}
 
 
 
Please ensure that this pulls in {{c|libnvidia-container-bin-1.0.2-r1}} or later.
 
 
 
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}} (See the [[#Device Node Permissions|Device Node Permissions]] section below for details.)
 
 
 
Next, you will want to add {{c|docker}} and {{c|nvidia-container}} to your default runlevel, and start them:
 
 
 
{{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.
 
# ##i##rc
 
}}
 
 
 
=== Device Node Permissions ===
 
 
 
If you are using {{c|x11-drivers/nvidia-kernel-modules-435.21-r1}} or later, and have run {{c|etc-update}}, then your device nodes should have correct permissions for GPU acceleration to work:
 
 
 
{{console|body=
 
$ ##i##ls /dev/nvidia* -l
 
crw-rw-rw- 1 root root 195, 254 Oct 23 10:09 ##y##/dev/nvidia-modeset
 
crw-rw-rw- 1 root root 239,  0 Oct 23 10:09 ##y##/dev/nvidia-uvm
 
crw-rw-rw- 1 root root 239,  1 Oct 23 10:09 ##y##/dev/nvidia-uvm-tools
 
crw-rw-rw- 1 root root 195,  0 Oct 23 10:08 ##y##/dev/nvidia0
 
crw-rw-rw- 1 root root 195, 255 Oct 23 10:08 ##y##/dev/nvidiactl
 
}}
 
 
 
Otherwise, you will need to follow these steps. To allow all local users to access your GPU, not just the {{c|video}} user, by setting {{c|1=NVreg_DeviceFileMode=0666}} in {{f|/etc/modprobe.d/nvidia.conf}} and rebooting.
 
 
 
=== Host Validation ===
 
 
 
With the host and device node permissions set up properly, you should be able to run {{c|nvidia-container-cli info}} as your regular user and see details about your GPU and not receive any error messages:
 
 
 
{{console|body=
 
$ ##i##nvidia-container-cli info
 
NVRM version:  435.21
 
CUDA version:  10.1
 
 
 
Device Index:  0
 
Device Minor:  0
 
Model:          Quadro P400
 
Brand:          Quadro
 
GPU UUID:      GPU-9bb98f5f-7d9d-ee0a-64a1-154c46934f45
 
Bus Location:  00000000:01:00.0
 
Architecture:  6.1
 
}}
 
 
 
If you receive an error message, this indicates that your {{c|/dev/nvidia*}} device node permissions are too restrictive or that {{c|/etc/init.d/nvidia-container}} has not been started properly. Try rebooting or restarting Docker to resolve the issue.
 
 
 
=== 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
 
}}
 
 
 
You should restart your user's pulseaudio daemon for this to take immediate effect:
 
 
 
{{console|body=
 
$ ##i##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 ===
 
 
 
We now have a fairly sophisticated launcher script called {{c|steam-nvidia-launcher}} which you should use to launch Steam. Download and install as follows:
 
 
 
{{console|body=
 
$ wget https://code.funtoo.org/bitbucket/users/drobbins/repos/docker-steam/raw/steam-nvidia-launcher?at=refs%2Ftags%2F1.3
 
$ chmod +x steam-nvidia-launcher
 
}}
 
 
 
=== Container Validation ===
 
  
To ensure that PulseAudio is functioning properly from within the container, the following command can be run to play back white noise via PulseAudio:
+
There are two supported options for Steam on Funtoo:
  
{{console|body=
+
1. 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.
%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}}:
+
2. We also have an official Docker image for Steam. See [[Steam/Docker]] for details on this image. This method currently only supports NVIDIA hardware. Our Steam image is based on Ubuntu 18.
  
{{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##glxgears
 
}}
 
  
You should see glxgears running in a window on your desktop.
+
== History on Funtoo ==
  
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}}, and is specifically configured to be launched by this user and no other.
+
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 two officially supported options for Steam that are easy to set up and at least one should work for you.
  
 
[[Category:Official Documentation]]
 
[[Category:Official Documentation]]

Latest revision as of 19:42, January 3, 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

There are two supported options for Steam on Funtoo:

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

2. We also have an official Docker image for Steam. See Steam/Docker for details on this image. This method currently only supports NVIDIA hardware. Our Steam image is based on Ubuntu 18.

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 two officially supported options for Steam that are easy to set up and at least one should work for you.