VR/zh: Difference between revisions

Ardenet (talk | contribs)
No edit summary
Ardenet (talk | contribs)
Tags: Mobile edit Mobile web edit
 
(8 intermediate revisions by the same user not shown)
Line 164: Line 164:
通过应用 [https://github.com/Frogging-Family/community-patches/blob/a6a468420c0df18d51342ac6864ecd3f99f7011e/linux61-tkg/cap_sys_nice_begone.mypatch 此补丁],AMDGPU 内核驱动程序将忽略进程权限并允许任何应用程序创建高优先级环境(high priority contexts)。
通过应用 [https://github.com/Frogging-Family/community-patches/blob/a6a468420c0df18d51342ac6864ecd3f99f7011e/linux61-tkg/cap_sys_nice_begone.mypatch 此补丁],AMDGPU 内核驱动程序将忽略进程权限并允许任何应用程序创建高优先级环境(high priority contexts)。


{{Warning|<span class="mw-translate-fuzzy">{{Warning|这将移除内核中特意设置的限制,并可能导致调度问题。虽然目前尚未收到导致问题的报告,但这应被视为不受支持的配置。}}</span>}}
{{Warning|这将移除内核中特意设置的限制,并可能导致调度问题。虽然目前尚未收到导致问题的报告,但这应被视为不受支持的配置。}}


<span id="Applying_as_a_NixOS_kernel_patch"></span>
<span id="Applying_as_a_NixOS_kernel_patch"></span>
Line 185: Line 185:
也可以只修补 amdgpu 并将其构建为树外模块(out-of-tree module),如 [[Special:MyLanguage/Linux_kernel#Patching_a_single_In-tree_kernel_module|Pacthing a single In-tree Kernel Module]] 中所述
也可以只修补 amdgpu 并将其构建为树外模块(out-of-tree module),如 [[Special:MyLanguage/Linux_kernel#Patching_a_single_In-tree_kernel_module|Pacthing a single In-tree Kernel Module]] 中所述


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Patching_bubblewrap_to_allow_capabilities"></span>
=== Patching bubblewrap to allow capabilities ===
=== 修补 bubblewrap 以允许启用能力(capabilities) ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
通过修改用于运行 Steam 的 bubblewrap 二进制文件,您可以允许该 FHS 环境中的进程获取能力。这样就无需直接修补内核了。
By modifying the bubblewrap binary used for running Steam, you can allow processes in that FHS environment to acquire capabilities. This removes the need for patching the kernel directly.
</div>


{{Warning|<span lang="en" dir="ltr" class="mw-content-ltr">This circumvents an intended security mechanism in bubblewrap, and allows all other software launched by steam, or running via steam-run to acquire these capabilities as well.</span>}}
{{Warning|这绕过了 bubblewrap 中预设的安全机制,并允许所有其他由 steam 启动或通过 steam-run 运行的软件也获得这些能力。}}


{{file|/etc/nixos/configuration.nix|nix|3=programs.steam = let
{{file|/etc/nixos/configuration.nix|nix|3=programs.steam = let
Line 232: Line 229:
}}
}}


<div lang="en" dir="ltr" class="mw-content-ltr">
作为额外的更改,您可能还需要用指向修改后的 bwrap 二进制文件的符号链接替换 ​​Steam 自己的 bwrap 二进制文件,该链接位于 <code>~/.local/share/Steam/ubuntu12_32/steam-runtime/usr/libexec/steam-runtime-tools-0/srt-bwrap</code>
as an additional change, you may also need to replace Steam's own bwrap binary with a symbolic link to this modified bwrap binary, found at <code>~/.local/share/Steam/ubuntu12_32/steam-runtime/usr/libexec/steam-runtime-tools-0/srt-bwrap</code>.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
steam-runtime 更新时,Steam 会定期用自己的二进制文件替换此修改,因此您可能需要在功能异常时,重新应用此修改。
Steam will periodically replace this modification with its own binary when steam-runtime updates, so you may need to re-apply this change if it breaks.
</div>


== wlx-overlay-s ==
== wlx-overlay-s ==
Line 247: Line 240:
==== SteamVR 自动启动 ====
==== SteamVR 自动启动 ====


<div class="mw-translate-fuzzy">
在 SteamVR(或任何 OpenVR 合成器)中启动 wlx-overlay-s 时,它会注册一个自动启动清单。目前,此清单将引用 wlx-overlay-s 的 Nix 存储路径,该路径可能会在重建 NixOS/Nix 配置文件后被垃圾回收。一种解决方法是定期运行以下命令来更新清单的存储路径:
在 SteamVR(或任何 OpenVR 合成器)中启动 wlx-overlay-s 时,它会注册一个自动启动清单。目前,此清单将引用 wlx-overlay-s 的 Nix 存储路径,该路径可能会在重建 NixOS/Nix 配置文件后被垃圾回收。一种解决方法是定期运行以下命令来更新清单的存储路径:{{Commands|
# 运行 wlx-overlay-s 并替换任何正在运行的实例
$ wlx-overlay-s --replace}}
</div>


{{Commands|
{{Commands|
# <span lang="en" dir="ltr" class="mw-content-ltr">Run wlx-overlay-s and replace any running instance</span>
# 运行 wlx-overlay-s 并替换任何正在运行的实例
$ wlx-overlay-s --replace}}
$ wlx-overlay-s --replace}}


Line 260: Line 249:
== 另见 ==
== 另见 ==


<div class="mw-translate-fuzzy">
* [https://lvra.gitlab.io Linux VR Adventures Wiki]
* [https://lvra.gitlab.io Linux VR Adventures Wiki]
[[Category:Video/zh|分类:视频]]
[[Category:Video/zh|分类:视频]]
[[Category:Hardware/zh|分类:硬件]]
[[Category:Hardware/zh|分类:硬件]]
[[Category:Desktop/zh|分类:桌面]]
[[Category:Desktop/zh|分类:桌面]]
[[Category:Gaming/zh|分类:游戏]]
[[Category:Gaming/zh|分类:游戏]]
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
[[Category:Video]]
[[Category:Hardware]]
[[Category:Desktop]]
[[Category:Gaming]]
</div>