NVIDIA 470.42.01 + Xwayland on Ubuntu 21.10 and Gnome 40.2

This is guide, howto enable NVIDIA accelerated 3D rendering and Xwayland on Ubuntu 21.10 with NVIDIA 470.xx (470.42.01) proprietary drivers on GNOME 40.2. Tested with latest NVIDIA drivers, I assume here that you have installed NVIDIA drivers using this guide. This might work normally with any other installation methods too, but it’s not tested.

Note: Do this using fully updated system and latest kernel, also NVIDIA 470.42.01 drivers installed. Check also NVIDIA’s own guide for this OpenGL and Vulkan on Xwayland.

Before you start you will at least following packages installed:

  • Xwayland >=
  • libxcb >= 1.13
  • egl-wayland >= 1.1.7

Check your packages using following command:

dpkg -l xwayland libxcb1 libnvidia-egl-wayland1

6. Enable Xwayland with NVIDIA 470.42.01 proprietary drivers on Fedora 34 GNOME 40.2 desktop

6.1 Change root user

su -
## OR ##
sudo -i

6.2 Edit /etc/default/grub

Append ‘nvidia-drm.modeset=1’ to end of ‘GRUB_CMDLINE_LINUX=”…”‘.

## Example row with Ubuntu 21.10 BTRFS ##
GRUB_CMDLINE_LINUX="rhgb quiet rd.driver.blacklist=nouveau nvidia-drm.modeset=1"

6.3 Update grub2 conf

Ubuntu 21.10

## Update grub config ##

6.4 Update /usr/lib/udev/rules.d/61-gdm.rules

Comment line which starts with DRIVER==”nvidia”:

# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
# disable Wayland when using the proprietary nvidia driver
#DRIVER=="nvidia", RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
# disable Wayland if modesetting is disabled
IMPORT{cmdline}="nomodeset", RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"

6.5 Generate initramfs

## Backup old initramfs nvidia-nomodeset image ##
mv /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r)-nvidia-nomodeset.img

## Generate new initramfs image ##
dracut -q /boot/initrd.img-$(uname -r) $(uname -r)

6.7 Enable kms-modifiers through gsettings (as normal user)

gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]

6.8 Reboot


When you system boot you should be able to select GNOME Wayland session, login using it and open terminal and type:


Output should be Wayland.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.