Steam/ru: Difference between revisions

Zetsu (talk | contribs)
Created page with "== Ссылки =="
FuzzyBot (talk | contribs)
Updating to match new version of source page
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
[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, Proton.<ref>https://store.steampowered.com/</ref>
[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, [[#Proton|Proton]].<ref>https://store.steampowered.com/</ref>
</div>
</div>


Line 14: Line 14:
To temporarily use Steam-related tools like <code>steam-run</code> (for FHS environments) or <code>steamcmd</code> (for server management or tools like steam-tui setup) in a shell environment, you can run:
To temporarily use Steam-related tools like <code>steam-run</code> (for FHS environments) or <code>steamcmd</code> (for server management or tools like steam-tui setup) in a shell environment, you can run:
</div>
</div>
<syntaxhighlight lang="bash">
 
nix-shell -p steam-run # For FHS environment
<syntaxhighlight lang="console">
nix-shell -p steamcmd  # For steamcmd
$ nix-shell -p steam-run # For FHS environment
$ nix-shell -p steamcmd  # For steamcmd
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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 `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 [[#steam-tui| steam-tui section]].
</div>
</div>


Line 27: Line 29:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
To install the [[Steam]] package and enable all the system options necessary to allow it to run, add the following to your <code>/etc/nixos/configuration.nix</code>:
To install the [[Steam]] package and enable all the system options necessary to allow it to run, add the following to your system configuration:
</div>
</div>
<syntaxhighlight lang="nix">
 
# Example for /etc/nixos/configuration.nix
 
{{file|/etc/nixos/configuration.nix|nix|
<nowiki>
programs.steam = {
programs.steam = {
   enable = true;
   enable = true;
  remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
  dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
};


Line 40: Line 42:
# you might consider using the LTS kernel or a known stable version.
# you might consider using the LTS kernel or a known stable version.
# boot.kernelPackages = pkgs.linuxPackages_lts; # Example for LTS
# boot.kernelPackages = pkgs.linuxPackages_lts; # Example for LTS
</syntaxhighlight>
</nowiki>
}}
 
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
[https://news.ycombinator.com/item?id=41549030 Anecdata on kernel 6.10 issues]
[https://news.ycombinator.com/item?id=41549030 Anecdata on kernel 6.10 issues]
</div>
</div>


{{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|<span lang="en" dir="ltr" class="mw-content-ltr">Enabling [[steam]] installs several [[unfree software|unfree packages]]. If you are using <code>allowUnfreePredicate</code> you will need to ensure that your configurations permit all of them.</span>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{
   nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
   nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
     "steam"
     "steam"
     "steam-unwrapped"
     "steam-unwrapped"
   ];
   ];
}
</syntaxhighlight>
</syntaxhighlight>
}}
}}
Line 60: Line 62:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Basic Steam features can be enabled directly within the <code>programs.steam</code> attribute set:
Basic Steam features can be enabled directly within the {{nixos:option|programs.steam}} attribute set:
</div>
</div>
<syntaxhighlight lang="nix">
 
{{file|/etc/nixos/configuration.nix|nix|
<nowiki>
programs.steam = {
programs.steam = {
   enable = true; # Master switch, already covered in installation
   enable = true; # Master switch, already covered in installation
   remotePlay.openFirewall = true;  # For Steam Remote Play
   remotePlay.openFirewall = true;  # Open ports in the firewall for Steam Remote Play
   dedicatedServer.openFirewall = true; # For Source Dedicated Server hosting
   dedicatedServer.openFirewall = true; # Open ports for Source Dedicated Server hosting
   # Other general flags if available can be set here.
   # Other general flags if available can be set here.
};
};
# Tip: For improved gaming performance, you can also enable GameMode:
# Tip: For improved gaming performance, you can also enable GameMode:
# programs.gamemode.enable = true;
# programs.gamemode.enable = true;
</syntaxhighlight>
</nowiki>
}}
 
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
If you are using a Steam Controller or a Valve Index, ensure Steam hardware support is enabled. This is typically handled by <code>programs.steam.enable = true;</code> which sets <code>hardware.steam-hardware.enable = true;</code> implicitly. You can verify or explicitly set it if needed:
{{note|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.}}
</div>
</div>
<syntaxhighlight lang="nix">
 
hardware.steam-hardware.enable = true;
</syntaxhighlight>
<span id="Tips_and_tricks"></span>
<span id="Tips_and_tricks"></span>
== Советы и рекомендации ==
== Советы и рекомендации ==
Line 84: Line 88:
=== Gamescope Compositor / "Boot to Steam Deck" ===
=== Gamescope Compositor / "Boot to Steam Deck" ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Gamescope can function as a minimal desktop environment, meaning you can launch it from a TTY and have an experience very similar to the Steam Deck hardware console.
Gamescope can function as a minimal desktop environment, meaning you can launch it from a TTY and have an experience very similar to the Steam Deck hardware console.
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
# Clean Quiet Boot
# Clean Quiet Boot
boot.kernelParams = [ "quiet" "splash" "console=/dev/null" ];
boot = {
boot.plymouth.enable = true;
  kernelParams = [
    "quiet"
    "splash"
    "console=/dev/null"
  ];
  plymouth.enable = true;
};


programs.gamescope = {
programs = {
  enable = true;
  gamescope = {
   capSysNice = true;
    enable = true;
    capSysNice = true;
   };
  steam.gamescopeSession.enable = true;
};
};
programs.steam.gamescopeSession.enable = true; # Integrates with programs.steam


# Gamescope Auto Boot from TTY (example)
# Gamescope Auto Boot from TTY (example)
services.xserver.enable = false; # Assuming no other Xserver needed
services = {
services.getty.autologinUser = "USERNAME_HERE";
  xserver.enable = false; # Assuming no other Xserver needed
  getty.autologinUser = <"USERNAME_HERE">;
  greetd = {
    enable = true;
    settings = {
      default_session = {
        command = "${lib.getExe pkgs.gamescope} -W 1920 -H 1080 -f -e --xwayland-count 2 --hdr-enabled --hdr-itm-enabled -- steam -pipewire-dmabuf -gamepadui -steamdeck -steamos3 > /dev/null 2>&1";
        user = <"USERNAME HERE">;
      };
    };
  };
};
</syntaxhighlight>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Gamescope HDR ===
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
In order for HDR to work within gamescope, you need to separately install the <code>gamescope-wsi</code> package alongside enabling the <code>gamescope</code> program.
</div>


services.greetd = {
<syntaxhighlight lang="nix">
programs.gamescope = {
   enable = true;
   enable = true;
   settings = {
   capSysNice = false;
    default_session = {
      command = "${pkgs.gamescope}/bin/gamescope -W 1920 -H 1080 -f -e --xwayland-count 2 --hdr-enabled --hdr-itm-enabled -- steam -pipewire-dmabuf -gamepadui -steamdeck -steamos3 > /dev/null 2>&1";
      user = "USERNAME_HERE";
    };
  };
};
};
environment.systemPackages = with pkgs; [
  gamescope-wsi # HDR won't work without this
];
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
Additionally, it may be necessary to force HDR in gamescope with the argument <code>--hdr-debug-force-output</code> when configuring your game's launch options in steam (see the example below).
</div>
<syntaxhighlight lang="bash">
gamescope -W 3840 -H 2160 -r 120 -f --adaptive-sync --hdr-enabled --hdr-debug-force-output --mangoapp -- %command%
</syntaxhighlight>
</syntaxhighlight>


=== steam-tui ===
=== steam-tui ===
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
If you want the steam-tui client, you'll have to install it. It relies on <code>steamcmd</code> being set up, so you'll need to run <code>steamcmd</code> once to generate the necessary configuration files.
If you want the steam-tui client, you'll have to install it. It relies on <code>steamcmd</code> being set up, so you'll need to run <code>steamcmd</code> once to generate the necessary configuration files.
First, ensure <code>steamcmd</code> is available (e.g., via <code>nix-shell -p steamcmd</code> or by adding it to <code>environment.systemPackages</code>), then run:
First, ensure <code>steamcmd</code> is available (e.g., via <code>nix-shell -p steamcmd</code> or by adding it to <code>environment.systemPackages</code>), then run:
</div>
</div>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
steamcmd +quit # This initializes steamcmd's directory structure
steamcmd +quit # This initializes steamcmd's directory structure
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Then install and run `steam-tui`. You may need to log in within `steamcmd` first if `steam-tui` has issues:
Then install and run `steam-tui`. You may need to log in within `steamcmd` first if `steam-tui` has issues:
</div>
</div>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# (Inside steamcmd prompt, if needed for full login before steam-tui)
# (Inside steamcmd prompt, if needed for full login before steam-tui)
Line 129: Line 174:
# quit
# quit
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
After setup, <code>steam-tui</code> (if installed e.g. via <code>home.packages</code> or <code>environment.systemPackages</code>) should start fine.
After setup, <code>steam-tui</code> (if installed e.g. via <code>home.packages</code> or <code>environment.systemPackages</code>) should start fine.
Line 136: Line 182:
=== FHS environment only ===
=== FHS environment only ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
To run proprietary games or software downloaded from the internet that expect a typical Linux Filesystem Hierarchy Standard (FHS), you can use <code>steam-run</code>. This provides an FHS-like environment without needing to patch the software.
To run proprietary games or software downloaded from the internet that expect a typical Linux Filesystem Hierarchy Standard (FHS), you can use <code>steam-run</code>. This provides an FHS-like environment without needing to patch the software.
Line 142: Line 189:
1. Install <code>steam-run</code> system-wide or user-specifically:
1. Install <code>steam-run</code> system-wide or user-specifically:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
# In /etc/nixos/configuration.nix
# In /etc/nixos/configuration.nix
Line 148: Line 196:
];
];
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
2. If you need more flexibility or want to use an overridden Steam package's FHS environment:
2. If you need more flexibility or want to use an overridden Steam package's FHS environment:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
# In /etc/nixos/configuration.nix
# In /etc/nixos/configuration.nix
Line 157: Line 207:
];
];
</syntaxhighlight>
</syntaxhighlight>
=== Proton ===
=== Proton ===
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
You should be able to play most Windows games using Proton. If a game has a native Linux version that causes issues on NixOS, you can force the use of Proton by selecting a specific Proton version in the game's compatibility settings in Steam.
You should be able to play most Windows games using Proton. If a game has a native Linux version that causes issues on NixOS, you can force the use of Proton by selecting a specific Proton version in the game's compatibility settings in Steam.
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
By default, Steam also looks for custom Proton versions in <code>~/.steam/root/compatibilitytools.d</code>. The environment variable <code>STEAM_EXTRA_COMPAT_TOOLS_PATHS</code> can be set to add other search paths.
By default, Steam also looks for custom Proton versions in <code>~/.steam/root/compatibilitytools.d</code>. The environment variable <code>STEAM_EXTRA_COMPAT_TOOLS_PATHS</code> can be set to add other search paths.
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Declarative install of custom Proton versions (e.g. GE-Proton):
Declarative install of custom Proton versions (e.g. GE-Proton):
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.extraCompatPackages = with pkgs; [
programs.steam.extraCompatPackages = with pkgs; [
Line 172: Line 227:
];
];
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Manual management of multiple Proton versions can be done with ProtonUp-Qt:
Manual management of multiple Proton versions can be done with ProtonUp-Qt:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
Line 180: Line 237:
];
];
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Overriding the Steam package ===
=== Overriding the Steam package ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
In some cases, you may need to override the default Steam package to provide missing dependencies or modify its build. Use the <code>programs.steam.package</code> option for this. Steam on NixOS runs many games in an FHS environment, but the Steam client itself or certain tools might need extra libraries.
In some cases, you may need to override the default Steam package to provide missing dependencies or modify its build. Use the <code>programs.steam.package</code> option for this. Steam on NixOS runs many games in an FHS environment, but the Steam client itself or certain tools might need extra libraries.
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Example: Adding Bumblebee and Primus (for NVIDIA Optimus):
Example: Adding Bumblebee and Primus (for NVIDIA Optimus):
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.package = pkgs.steam.override {
programs.steam.package = pkgs.steam.override {
Line 201: Line 262:
Example: Adding Xorg libraries for Gamescope (when used within Steam):
Example: Adding Xorg libraries for Gamescope (when used within Steam):
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.package = pkgs.steam.override {
programs.steam.package = pkgs.steam.override {
   extraPkgs = pkgs': with pkgs'; [
   extraPkgs = pkgs': with pkgs'; [
     xorg.libXcursor
     libXcursor
     xorg.libXi
     libXi
     xorg.libXinerama
     libXinerama
     xorg.libXScrnSaver
     libXScrnSaver
     libpng
     libpng
     libpulseaudio
     libpulseaudio
Line 222: Line 284:
=== Fix missing icons for games in GNOME dock and activities overview ===
=== Fix missing icons for games in GNOME dock and activities overview ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
GNOME uses the window class to determine the icon associated with a window. Steam currently doesn't set the required key for this in its .desktop files<ref>https://github.com/ValveSoftware/steam-for-linux/issues/12207</ref>, but you can fix this manually by editing the <code>StartupWMClass</code> key for each game's .desktop file, found under <code>~/.local/share/applications/</code>.
GNOME uses the window class to determine the icon associated with a window. Steam currently doesn't set the required key for this in its .desktop files<ref>https://github.com/ValveSoftware/steam-for-linux/issues/12207</ref>, but you can fix this manually by editing the <code>StartupWMClass</code> key for each game's .desktop file, found under <code>~/.local/share/applications/</code>.
Line 249: Line 312:
StartupWMClass=valheim.x86_64
StartupWMClass=valheim.x86_64
</syntaxhighlight>
</syntaxhighlight>
<span id="Troubleshooting"></span>
<span id="Troubleshooting"></span>
== Устранение неполадок ==
== Устранение неполадок ==
Line 259: Line 323:
=== Steam fails to start. What do I do? ===
=== Steam fails to start. What do I do? ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
One common issue preventing steam from being able to start, at least on <code>x86-64</code> platforms, is not having the following options enabled in your <code>/etc/nixos/hardware-configuration.nix</code>:
</div>
<syntaxhighlight lang="nix">
{
  hardware.graphics.enable = true;
  hardware.graphics.enable32Bit = true;
}
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Run <code>strace steam -dev -console 2> steam.logs</code> in the terminal. If <code>strace</code> is not installed, temporarily install it using <code>nix-shell -p strace</code> or <code>nix run nixpkgs#strace -- steam -dev -console 2> steam.logs</code> (if using Flakes). After that, create a bug report. <!-- This is vague. Where should the user create a bug report?  -->
If you have those options set (or 32-bit isn't applicable to your system/platform) and still can't run steam, then run <code>strace steam -dev -console 2> steam.logs</code> in the terminal. If <code>strace</code> is not installed, temporarily install it using <code>nix-shell -p strace</code> or <code>nix run nixpkgs#strace -- steam -dev -console 2> steam.logs</code> (if using Flakes). After that, create a bug report. <!-- This is vague. Where should the user create a bug report?  -->
</div>
</div>


Line 266: Line 342:
=== Steam is not updated ===
=== Steam is not updated ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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])
Line 274: Line 351:
=== Game fails to start ===
=== Game fails to start ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Games may fail to start because they lack dependencies (this should be added to the script, for now), or because they cannot be patched. The steps to launch a game directly are:
Games may fail to start because they lack dependencies (this should be added to the script, for now), or because they cannot be patched. The steps to launch a game directly are:
Line 280: Line 358:
* Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary
* Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary
</div>
</div>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
LD_LIBRARY_PATH=~/.steam/bin32:$LD_LIBRARY_PATH:/nix/store/pfsa... blabla ...curl-7.29.0/lib:. ./Osmos.bin32 (if you could not patchelf the game, call ld.so directly with the binary as parameter)
LD_LIBRARY_PATH=~/.steam/bin32:$LD_LIBRARY_PATH:/nix/store/pfsa... blabla ...curl-7.29.0/lib:. ./Osmos.bin32 (if you could not patchelf the game, call ld.so directly with the binary as parameter)
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
Line 290: Line 370:
==== 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/ -->====
==== 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/ -->====
</div>
</div>
{{note|This is not recommended because radv drivers tend to perform better and are generally more stable than amdvlk.}}
 
{{note|<span lang="en" dir="ltr" class="mw-content-ltr">This is not recommended because radv drivers tend to perform better and are generally more stable than amdvlk.</span>}}
 
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Sometimes, changing the driver on AMD GPUs helps. To try this, first, install multiple drivers such as radv and amdvlk:
Sometimes, changing the driver on AMD GPUs helps. To try this, first, install multiple drivers such as radv and amdvlk:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
hardware.graphics = {
hardware.graphics = {
Line 304: Line 387:
};
};
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>
</div>
=== SteamVR ===
=== SteamVR ===
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
The setcap issue at SteamVR start can be fixed with:
The setcap issue at SteamVR start can be fixed with:
<code>sudo setcap CAP_SYS_NICE+ep ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher</code>
<code>sudo setcap CAP_SYS_NICE+ep ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher</code>
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Gamescope fails to launch when used within Steam ===
=== Gamescope fails to launch when used within Steam ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
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. ([https://github.com/NixOS/nixpkgs/issues/214275 #214275]) To resolve this override the steam package to add them:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.package = pkgs.steam.override {
programs.steam.package = pkgs.steam.override {
   extraPkgs = pkgs': with pkgs'; [
   extraPkgs = pkgs': with pkgs'; [
     xorg.libXcursor
     libXcursor
     xorg.libXi
     libXi
     xorg.libXinerama
     libXinerama
     xorg.libXScrnSaver
     libXScrnSaver
     libpng
     libpng
     libpulseaudio
     libpulseaudio
Line 338: Line 428:
};
};
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Udev rules for additional Gamepads ===
=== Udev rules for additional Gamepads ===
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
In specific scenarios gamepads, might require some additional configuration in order to function properly in the form of udev rules. This can be achieved with <code>services.udev.extraRules</code>.
In specific scenarios gamepads, might require some additional configuration in order to function properly in the form of udev rules. This can be achieved with <code>services.udev.extraRules</code>.
</div>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
The following example is for the 8bitdo Ultimate Bluetooth controller, different controllers will require knowledge of the vendor and product ID for the device:
The following example is for the 8bitdo Ultimate Bluetooth controller, different controllers will require knowledge of the vendor and product ID for the device:
</div>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
   services.udev.extraRules = ''
   services.udev.extraRules = ''
Line 352: Line 446:
   '';
   '';
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
To find the vendor and product ID of a device [https://search.nixos.org/packages?channel=unstable&show=usbutils&from=0&size=50&sort=relevance&type=packages&query=usbutils usbutils] might be useful
To find the vendor and product ID of a device [https://search.nixos.org/packages?channel=unstable&show=usbutils&from=0&size=50&sort=relevance&type=packages&query=usbutils usbutils] might be useful
</div>
</div>
<span id="Known_issues"></span>
<span id="Known_issues"></span>
== Известные проблемы ==
== Известные проблемы ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
"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>.
Line 364: Line 461:
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.
</div>
</div>
<span id="References"></span>
<span id="References"></span>
== Ссылки ==
== Ссылки ==