Steam

This page explains how to run Steam, a popular game distribution platform by Valve on Alpine Linux. 
== Platform support ==
Steam requires glibc to run, and thus won't run natively on Alpine Linux. Workarounds generally revolve around using a container or a virtual machine.
The simplest approach is to run it inside a container managed by Flatpak.
== Installation via Flatpak ==
Make sure you have the Flathub repository installed.
 # apk add 
 $ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 $ flatpak --user install com.valvesoftware.Steam
After installation Steam can be started using it's .desktop file or on the command line:
 $ flatpak run com.valvesoftware.Steam
== Troubleshooting ==
=== My controllers aren't detected ===
By default Steam doesn't have permission to read your controllers.
This can be fixed by installing an udev rule from the official Steam package, but the udev rules are also available as an Alpine package.
 # apk add 
These udev rules rely on the TAG+="uaccess", and are therefore only expected to work reliably when using Elogind.
=== SteamVR won't launch ===
Out of the box SteamVR might not be able to launch and give you various errors. Steam tries to fix this itself by setting the right capabilities on the SteamVR binary, but this doesn't work in the Flatpak. Instead we'll have do it manually.
 # setcap CAP_SYS_NICE+ep ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
Then restart Steam.
There is an issue for this on the Flathub repository.
=== Steam - Error: OpenGL GLX extension not supported by display ===
Add the Mesa gallium driver and reboot your system.
 # apk add 
=== eventfd: Too many open files ===
Due to a low amount of allowed open file descriptors, Proton games may crash shortly after launching. This can be worked around by disabling esync but many games will perform measurably worse without it. Instead, user limits should be increased. In order to do this, you will need PAM and a PAM enabled login.
Add the following to /etc/security/limits.conf:
 @users hard nofile 524288
Reboot and run ulimit -Hn to verify the new limits are applied.
=== dbus-launch: no such file or directory ===
Set up dbus for your session.
=== Steam games launched via Proton crash before creating a window ===
Instead of just using the in-Steam menu to install and select a Proton version, try installing the flatpak community build for Proton onto your system. There are several versions, depending on your desired stability, and the experimental version available in Flathub is called "com.valvesoftware.Steam.CompatibilityTool.Proton-Exp". After you install your chosen version, go into Steam to specify compatibility tool for a game as usual. The installed community build will now be an option. Select that and try launching the game again.
As your last resort, you can try installing proton-ge-custom, but please note that in order for this to be even detected by Steam, you will need to install Steam via Nix due to high level of isolation that Flatpaks utilize. This can however come at the expense of your privacy.
=== Steam spams dmesg with x86/split lock detection entries ===
Add the below line to :
 kernel.split_lock_mitigate = 0
=== Steam hangs on start with a steamwebhelper popup ===
If this happens and says that you are missing X server or DISPLAY, it means your DISPLAY is not present in the activation environment. For more information please see https://github.com/ValveSoftware/steam-for-linux/issues/10554 
Sway: go into your sway config file and add DISPLAY to the following line, then restart:
exec dbus-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
For more information about this line, please see the Alpine Wiki's entry on Sway
Hyprland: add an exec-once to the configuration file at to set DISPLAY. Similarly to Sway you may already have a line that sets other variables. If so, add DISPLAY to the line. The line should look similar to this:
exec-once = dbus-update-activation-environment DISPLAY
== See Also ==
* Gaming on Alpine Linux
* Flatpak
category:Gaming