Steam: Difference between revisions

Malix (talk | contribs)
Gamescope HDR: update: enableWsi option
Ardenet (talk | contribs)
Fixed the error in the translation tag; converted the link to tvar
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
[https://store.steampowered.com/ Steam] is a digital distribution platform for video games, offering a vast library for purchase, download, and management. On NixOS, Steam is generally easy to install and use, often working "out-of-the-box". It supports running many Windows games on Linux through its compatibility layer, [[<tvar name=1>#Proton</tvar>|Proton]].<ref>https://store.steampowered.com/</ref>
<tvar name=steam>[https://store.steampowered.com/ Steam]</tvar> is a digital distribution platform for video games, offering a vast library for purchase, download, and management. On NixOS, Steam is generally easy to install and use, often working "out-of-the-box". It supports running many Windows games on Linux through its compatibility layer, <tvar name=proton>[[#Proton|Proton]]</tvar>.<ref>https://store.steampowered.com/</ref>
</translate>


<translate>
== Installation == <!--T:2-->
== Installation == <!--T:2-->


Line 22: Line 20:
<!--T:5-->
<!--T:5-->
This provides the tools in your current shell without adding them to your system configuration. For <code>steamcmd</code> to work correctly for some tasks (like initializing for steam-tui), you might need to run it once to generate necessary files, as shown in the [[<tvar name=1>#steam-tui</tvar>| steam-tui section]].
This provides the tools in your current shell without adding them to your system configuration. For <code>steamcmd</code> to work correctly for some tasks (like initializing for steam-tui), you might need to run it once to generate necessary files, as shown in the [[<tvar name=1>#steam-tui</tvar>| steam-tui section]].
</translate>


<translate>
==== System setup ==== <!--T:6-->
==== System setup ==== <!--T:6-->


Line 71: Line 67:
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}


{{note|<translate><!--T:11--> If you are using a Steam Controller or a Valve Index, Steam hardware support is implicitly enabled by <code>programs.steam.enable {{=}} true;</code> which sets {{nixos:option|hardware.steam-hardware.enable}} to true.</translate>}}
{{note|<translate><!--T:11--> If you are using a Steam Controller or a Valve Index, Steam hardware support is implicitly enabled by <code>programs.steam.enable {{=}} true;</code> which sets <tvar name=steam_hardware_option>{{nixos:option|hardware.steam-hardware.enable}}</tvar> to true.</translate>}}


{{note|<translate> If you are using the Steam Controller released in 2026, the Steam client has an additional dependency on hidapi, needed to correctly communicate with the controller. If you are seeing repeated errors about failed firmware updates, this is likely why. You can add the dependency directly to the Steam environment like so: <code>programs.steam.extraPackages {{=}} [pkgs.hidapi];</code></translate>}}
{{note|<translate>If you are using the Steam Controller released in 2026, the Steam client has an additional dependency on hidapi, needed to correctly communicate with the controller. If you are seeing repeated errors about failed firmware updates, this is likely why. You can add the dependency directly to the Steam environment like so: <code>programs.steam.extraPackages {{=}} [pkgs.hidapi];</code></translate>}}


<translate>
<translate>
== Tips and tricks ==
== Tips and tricks ==


=== Improving Performance ===
=== Improving Performance ===
You can utilize [https://github.com/FeralInteractive/gamemode GameMode], a combination of a library and daemon for Linux that allows games to request a set of optimizations to be temporarily applied to the host operating system and/or a game process.<syntaxhighlight lang="nixos">
 
You can utilize <tvar name=gamemode>[https://github.com/FeralInteractive/gamemode GameMode]</tvar>, a combination of a library and daemon for Linux that allows games to request a set of optimizations to be temporarily applied to the host operating system and/or a game process.
</translate>
 
<syntaxhighlight lang="nixos">
programs.gamemode.enable = true;
programs.gamemode.enable = true;
</syntaxhighlight>
</syntaxhighlight>


<translate>
=== Gamescope Compositor / "Boot to Steam Deck" === <!--T:13-->
=== Gamescope Compositor / "Boot to Steam Deck" === <!--T:13-->


Line 281: Line 281:


<!--T:58-->
<!--T:58-->
For games running through Proton, the value should be <code>steam_app_<game_id></code> (where <code><game_id></code> matches the value after steam://rungameid/ on the <code>Exec</code> line). To automate this with [[Home Manager]] (executed on every rebuild):
For games running through Proton, the value should be <code>steam_app_<game_id></code> (where <code><game_id></code> matches the value after steam://rungameid/ on the <code>Exec</code> line). To automate this with <tvar name=hm>[[Special:MyLanguage/Home Manager|Home Manager]]</tvar> (executed on every rebuild):
</translate>
</translate>


Line 341: Line 341:


<!--T:36-->
<!--T:36-->
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. (<tvar name=issue>[https://github.com/NixOS/nixpkgs/issues/181904 #181904]</tvar>)
A workaround is to remove the user files in <code>/home/&lt;USER&gt;/.local/share/Steam/userdata</code>. This can be done with <code>rm -rf /home/&lt;USER&gt;/.local/share/Steam/userdata</code> in the terminal or with your file manager. After that, Steam can be set up again by restarting.
A workaround is to remove the user files in <code>/home/&lt;USER&gt;/.local/share/Steam/userdata</code>. This can be done with <code>rm -rf /home/&lt;USER&gt;/.local/share/Steam/userdata</code> in the terminal or with your file manager. After that, Steam can be set up again by restarting.


Line 361: Line 361:
Note: If a game gets stuck on Installing scripts, check for a DXSETUP.EXE process and run it manually, then restart the game launch.
Note: If a game gets stuck on Installing scripts, check for a DXSETUP.EXE process and run it manually, then restart the game launch.


==== Changing the driver on AMD GPUs <!-- this is not recommended due radv drivers performing better and generally more stable than amdvlk. My suggestion remove this section. source: https://forums.guru3d.com/threads/the-mesa-radv-amdvlk-thread.449774/ -->==== <!--T:40-->
==== Changing the driver on AMD GPUs <tvar name=comment><!-- this is not recommended due radv drivers performing better and generally more stable than amdvlk. My suggestion remove this section. source: https://forums.guru3d.com/threads/the-mesa-radv-amdvlk-thread.449774/ --></tvar>==== <!--T:40-->
</translate>
</translate>


Line 398: Line 398:


<!--T:47-->
<!--T:47-->
Gamescope may fail to start due to missing Xorg libraries. ([https://github.com/NixOS/nixpkgs/issues/214275 #214275]) To resolve this override the steam package to add them:
Gamescope may fail to start due to missing Xorg libraries. (<tvar name=issue>[https://github.com/NixOS/nixpkgs/issues/214275 #214275]</tvar>) To resolve this override the steam package to add them:
</translate>
</translate>


Line 439: Line 439:
To find the vendor and product ID of a device <tvar name=usbutils>[https://search.nixos.org/packages?channel=unstable&show=usbutils&from=0&size=50&sort=relevance&type=packages&query=usbutils usbutils]</tvar> might be useful
To find the vendor and product ID of a device <tvar name=usbutils>[https://search.nixos.org/packages?channel=unstable&show=usbutils&from=0&size=50&sort=relevance&type=packages&query=usbutils usbutils]</tvar> might be useful


=== Steam controller mouse input issues === <!--T:52-->
=== Steam controller mouse input issues ===


Mouse input on the controller may fail to take control of the visual cursor. In this instance, the input is still registered, but the cursor does not move. A fix for this is to preload Steam with extest. The Steam package already has an option for it:
Mouse input on the controller may fail to take control of the visual cursor. In this instance, the input is still registered, but the cursor does not move. A fix for this is to preload Steam with extest. The Steam package already has an option for it: