Steam/zh: Difference between revisions

RhenCloud (talk | contribs)
Created page with "在终端运行 <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 版本)临时安装。之后,请提交错误报告。"
RhenCloud (talk | contribs)
Created page with "如果两个驱动程序都存在,Steam 将默认使用 amdvlk。amdvlk 驱动程序在 Vulkan 规范实现方面更准确,但性能不如 radv。然而,这种在正确性和性能之间的权衡有时会直接影响游戏体验。"
Line 218: 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 248: 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.
</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.