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.conffile 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-modifiersmust 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_uvmandnvidia_drmto/etc/mkinitcpio.confand 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=1to/etc/default/gruband run the commandsudo update-grub
将内核参数nvidia-drm.modeset=1添加到/etc/default/grub中并运行命令sudo update-grub
- Add the modules
-
Ensure
xorg-xwayland,libxcbandegl-waylandare 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!

浙公网安备 33010602011771号