Steam: Difference between revisions

Sen (talk | contribs)
Sen (talk | contribs)
m Added links to the word "steam"
Line 1: Line 1:
{{Expansion|See notes in ->}}
{{Expansion|See notes in ->}}


This page is intended to explain how to run Steam, Steam games as well as proprietary DRM-free games under NixOS. A dedicated [[Games]] page lists games and reports on their successful execution on NixOS.  
This page is intended to explain how to run [[Steam]], [[Steam]] games as well as proprietary DRM-free games under NixOS. A dedicated [[Games]] page lists games and reports on their successful execution on NixOS.  


== Install ==
== Install ==


To install the Steam package and enable all the system options necessary to allow it to run:
To install the [[Steam]] package and enable all the system options necessary to allow it to run:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 15: Line 15:
</nowiki>}}
</nowiki>}}


{{note|Enabling steam installs several unfree packages. If you are using <code>allowUnfreePredicate</code> you will need to ensure that your configurations permit all of them.
{{note|Enabling [[steam]] installs several unfree packages. If you are using <code>allowUnfreePredicate</code> you will need to ensure that your configurations permit all of them.
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
{
{
Line 51: Line 51:
</syntaxHighlight>
</syntaxHighlight>


Another option, in case you need more flexibility, is to directly reference the part of steam metapackage.
Another option, in case you need more flexibility, is to directly reference the part of [[steam]] metapackage.


Example snippet of <code>configuration.nix</code>:
Example snippet of <code>configuration.nix</code>:
Line 64: Line 64:
== Adding missing dependencies ==
== Adding missing dependencies ==


In some cases, you may need to override steam to provide missing dependencies.
In some cases, you may need to override [[steam]] to provide missing dependencies.
Use the <code>programs.steam.package</code> for this.
Use the <code>programs.steam.package</code> for this.


Line 100: Line 100:
=== Steam is not updated ===
=== Steam is not updated ===


When you restart Steam after an update, it starts the old version. ([https://github.com/NixOS/nixpkgs/issues/181904 #181904])
When you restart [[Steam]] after an update, it starts the old version. ([https://github.com/NixOS/nixpkgs/issues/181904 #181904])


A workaround is to remove the user files in <code>/home/<USER>/.local/share/Steam/userdata</code>. This can be done with <code>rm -rf /home/<USER>/.local/share/Steam/userdata</code> in the terminal or with your file manager. After that, Steam can be setup again by restarting.
A workaround is to remove the user files in <code>/home/<USER>/.local/share/Steam/userdata</code>. This can be done with <code>rm -rf /home/<USER>/.local/share/Steam/userdata</code> in the terminal or with your file manager. After that, Steam can be setup again by restarting.
Line 132: Line 132:
</syntaxHighlight>
</syntaxHighlight>


In the presence of both drivers, Steam will default to amdvlk. The amdvlk driver can be considered more correct regarding Vulkan specification implementation, but less performant than radv. However, this tradeoff between correctness and performance can sometimes make or break the gaming experience.
In the presence of both drivers, [[Steam]] will default to amdvlk. The amdvlk driver can be considered more correct regarding Vulkan specification implementation, but less performant than radv. However, this tradeoff between correctness and performance can sometimes make or break the gaming experience.


To "reset" your driver to radv when both radv and amdvlk are installed, set either <code>AMD_VULKAN_ICD = "RADV"</code> or <code>VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"</code> environment variable. For example, if you start Steam from the shell, you can enable radv for the current session by running <code>AMD_VULKAN_ICD="RADV" steam</code>. If you are unsure which driver you currently use, you can launch a game with [https://github.com/flightlessmango/MangoHud MangoHud] enabled, which has the capability to show what driver is currently in use.
To "reset" your driver to radv when both radv and amdvlk are installed, set either <code>AMD_VULKAN_ICD = "RADV"</code> or <code>VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"</code> environment variable. For example, if you start [[Steam]] from the shell, you can enable radv for the current session by running <code>AMD_VULKAN_ICD="RADV" steam</code>. If you are unsure which driver you currently use, you can launch a game with [https://github.com/flightlessmango/MangoHud MangoHud] enabled, which has the capability to show what driver is currently in use.


=== SteamVR ===
=== SteamVR ===
Line 145: Line 145:
"Project Zomboid" may report "couldn't determine 32/64 bit of java". This is not related to java at all, it carries its own outdated java binary that refuses to start if path contains non-Latin characters. Check for errors by directly starting local java binary within <code>steam-run bash</code>.
"Project Zomboid" may report "couldn't determine 32/64 bit of java". This is not related to java at all, it carries its own outdated java binary that refuses to start if path contains non-Latin characters. Check for errors by directly starting local java binary within <code>steam-run bash</code>.


Resetting your password through the Steam app may fail at the CAPTCHA step repeatedly, with Steam itself reporting that the CAPTCHA was not correct, even though the CAPTCHA UI shows success. Resetting password through the Steam website should work around that.
Resetting your password through the [[Steam]] app may fail at the CAPTCHA step repeatedly, with [[Steam]] itself reporting that the CAPTCHA was not correct, even though the CAPTCHA UI shows success. Resetting password through the [[Steam]] website should work around that.


== Steam hardware ==
== Steam hardware ==
Line 162: Line 162:
=== Custom Proton versions ===
=== Custom Proton versions ===


By default, Steam looks for custom Proton versions such as GE-Proton in <code>~/.steam/root/compatibilitytools.d</code>. Additionally the environment variable <code>STEAM_EXTRA_COMPAT_TOOLS_PATHS</code> can be set to change or add to the paths which steam searches for custom Proton versions.
By default, [[Steam]] looks for custom Proton versions such as GE-Proton in <code>~/.steam/root/compatibilitytools.d</code>. Additionally the environment variable <code>STEAM_EXTRA_COMPAT_TOOLS_PATHS</code> can be set to change or add to the paths which [[steam]] searches for custom Proton versions.


== See also ==
== See also ==
[[Explaining the current Steam Package build]]
[[Explaining the current Steam Package build]]