Steam/zh: Difference between revisions

RhenCloud (talk | contribs)
No edit summary
RhenCloud (talk | contribs)
Created page with "Gamescope 可以作为最小桌面环境运行,这意味着您可以从 TTY 启动它,并获得与 Steam Deck 硬件控制台非常相似的体验。"
 
(3 intermediate revisions by the same user not shown)
Line 183: Line 183:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
对于通过 Proton 运行的游戏,该值应为 <code>steam_app_<game_id></code> (在哪里<code><game_id></code><code>Exec</code> 行中 steam://rungameid/ 之后的值匹配)。
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).
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
对于原生运行的游戏,该值应与游戏的主可执行文件匹配。
For games running natively, the value should match the game's main executable.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
例如,Valheim 的修改后的 .desktop 文件如下所示:
For example, the modified .desktop file for Valheim looks like this:
</div>


<syntaxhighlight lang="desktop">
<syntaxhighlight lang="desktop">
Line 209: Line 203:
== 故障排除 ==
== 故障排除 ==


<div lang="en" dir="ltr" class="mw-content-ltr">
对于所有问题:首先通过终端运行 <code>steam -dev -console</code> 并读取输出。
For all issues: first run <code>steam -dev -console</code> through the terminal and read the output.
</div>


<span id="Steam_fails_to_start._What_do_I_do?"></span>
<span id="Steam_fails_to_start._What_do_I_do?"></span>
=== Steam 无法启动。我该怎么办? ===
=== Steam 无法启动。我该怎么办? ===
<div lang="en" dir="ltr" class="mw-content-ltr">
在终端运行 <code>strace steam -dev -console 2> steam.logs</code> 命令。如果未安装 <code>strace</code> ,请使用 <code>nix-shell -p strace</code> <code>nix run nixpkgs#strace -- steam -dev -console 2> steam.logs</code> (如果使用 Flakes 版本)临时安装。之后,请提交错误报告。
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>


<span id="Steam_is_not_updated"></span>
<span id="Steam_is_not_updated"></span>
Line 228: Line 218:
<span id="Game_fails_to_start"></span>
<span id="Game_fails_to_start"></span>
=== 游戏无法启动 ===
=== 游戏无法启动 ===
<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:
如果可以,请修补脚本/二进制文件。
* Patch the script/binary if you can
* 在二进制文件夹中添加一个名为 steam_appid.txt 的文件,内容为 appid(可在 Steam 的标准输出中找到)。
* Add a file named steam_appid.txt in the binary folder, with the appid as contents (it can be found in the stdout from steam)
* 使用来自 nix/store steam 脚本的 LD_LIBRARY_PATH,启动游戏二进制文件
* Using the LD_LIBRARY_PATH from the nix/store steam script, with some additions, launch the game binary
</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">
注意:如果游戏卡在“正在安装脚本”界面,请检查是否存在 DXSETUP.EXE 进程并手动运行它,然后重新启动游戏。
Note: If a game gets stuck on Installing scripts, check for a DXSETUP.EXE process and run it manually, then restart the game launch.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Changing_the_driver_on_AMD_GPUs"></span>
==== 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/ -->====
==== 更改 AMD GPU 的驱动程序 ====
</div>
{{note|This is not recommended because radv drivers tend to perform better and are generally more stable than amdvlk.}}
{{note|This is not recommended because radv drivers tend to perform better and are generally more stable than amdvlk.}}
<div lang="en" dir="ltr" class="mw-content-ltr">
有时,更换 AMD GPU 的驱动程序会有帮助。要尝试此方法,首先,安装多个驱动程序,例如 radv amdvlk
Sometimes, changing the driver on AMD GPUs helps. To try this, first, install multiple drivers such as radv and amdvlk:
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
hardware.graphics = {
hardware.graphics = {
Line 258: Line 241:
};
};
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
如果两个驱动程序都存在,[[Steam]] 将默认使用 amdvlk。amdvlk 驱动程序在 Vulkan 规范实现方面更准确,但性能不如 radv。然而,这种在正确性和性能之间的权衡有时会直接影响游戏体验。
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.
如果同时安装了 radv 和 amdvlk,要将驱动程序“重置”为 radv,请设置环境变量 <code>AMD_VULKAN_ICD = "RADV"</code> <code>VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"</code> 。例如,如果您从 shell 启动 Steam,则可以通过运行 <code>AMD_VULKAN_ICD="RADV" steam</code> 为当前会话启用 radv。如果您不确定当前使用的是哪个驱动程序,可以启动一个启用了 MangoHud 的游戏,MangoHud 可以显示当前正在使用的驱动程序。
</div>
<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.
</div>
=== SteamVR ===
=== SteamVR ===
<div lang="en" dir="ltr" class="mw-content-ltr">
SteamVR 启动时的 setcap 问题可以通过以下方法解决:
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>
<span id="Gamescope_fails_to_launch_when_used_within_Steam"></span>
<span id="Gamescope_fails_to_launch_when_used_within_Steam"></span>
=== 与 Steam 使用时 Gamescope 无法启动 ===
=== 与 Steam 使用时 Gamescope 无法启动 ===