Use Wayland with proprietary NVIDIA drivers
原文地址: https://forum.manjaro.org/t/howto-use-wayland-with-proprietary-nvidia-drivers/36130
Wayland does not play well with proprietary drivers. Currently the biggest issue is that NVIDIA does currently not support Xwayland properly, so apps that require it get software rendering. This includes most games, which are the most common use case for proprietary NVIDIA drivers. This is why GNOME automatically disables Wayland if you have NVIDIA.
Wayland 不能很好地与专有驱动程序配合使用。目前最大的问题是 NVIDIA 目前无法正确支持 Xwayland,因此需要它的应用程序将获得软件渲染。这包括大多数游戏,它们是专有 NVIDIA 驱动程序最常见的用例。这就是为什么如果您有 NVIDIA,GNOME 会自动禁用 Wayland。
However, if this does not deter you, you can use Wayland with NVIDIA drivers. Here is how to do it:
但是,如果这不妨碍您,您可以将 Wayland 与 NVIDIA 驱动程序一起使用。操作方法如下:
If not using GNOME, skip to DE (Desktop Environment)-agnostic instructions in Step 4 :
如果不使用 GNOME,请跳到步骤 4 中与 DE(桌面环境)无关的说明:
-
Edit the
/etc/gdm/custom.conf
file and comment out the lineWaylandEnable=false
. The correct file will then look something like this:
编辑/etc/gdm/custom.conf
文件并注释掉WaylandEnable=false
行。正确的文件将如下所示:# GDM configuration storage daemon] # Uncomment the line below to force the login screen to use Xorg #WaylandEnable=false [security] [xdmcp] [chooser] [debug] # Uncomment the line below to turn on debugging #Enable=true
-
To force-enable Wayland, disable the udev 179 rule responsible for disabling Wayland in GDM:
要强制启用 Wayland,请禁用负责在 GDM 中禁用 Wayland 的 udev179 规则:sudo ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
-
kms-modifiers
must be enabled throughgsettings
. This can be done with the following command:
kms-modifiers
必须通过gsettings
启用。这可以通过以下命令来完成:gsettings set org.gnome.mutter experimental-features '["kms-modifiers"]'
DE(Desktop Environment)-agnostic instructions begin here DE(桌面环境)无关的指令从这里开始#
-
Enable modesetting for nvdia drivers. Follow the instructions in the Arch wiki 1.9k:
为 nvdia 驱动程序启用模式设置。按照 Arch wiki1.9k 中的说明进行操作:- Add the modules
nvidia
,nvidia_modeset
,nvidia_uvm
andnvidia_drm
to/etc/mkinitcpio.conf
and run the commandsudo mkinitcpio -P
将模块nvidia
、nvidia_modeset
、nvidia_uvm
和nvidia_drm
添加到/etc/mkinitcpio.conf
并运行命令sudo mkinitcpio -P
- Add the kernel parameter
nvidia-drm.modeset=1
to/etc/default/grub
and run the commandsudo update-grub
将内核参数nvidia-drm.modeset=1
添加到/etc/default/grub
中并运行命令sudo update-grub
- Add the modules
-
Ensure
xorg-xwayland
,libxcb
andegl-wayland
are installed:
确保安装了xorg-xwayland
、libxcb
和egl-wayland
:sudo pacman -Syu --needed xorg-xwayland libxcb egl-wayland
-
Reboot 重启
-
Profit. Congratulations, you should now be running GNOME with Wayland despite proprietary NVIDIA drivers!
利润。恭喜,尽管有专有的 NVIDIA 驱动程序,您现在应该可以通过 Wayland 运行 GNOME!
作者:DealiAxy
出处:https://www.cnblogs.com/deali/p/18016330
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
微信公众号:「程序设计实验室」
新版StarBlog已经上线,地址:http://blog.deali.cn
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)