NVIDIA Wayland on Fedora 34 Gnome 40

This is guide, howto enable NVIDIA modesetting and Wayland on Fedora 34 with NVIDIA proprietary drivers on GNOME 40. 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.

8. Enable Wayland with NVIDIA proprietary drivers on Fedora 34 GNOME 40 desktop

8.1 Change root user

su -
## OR ##
sudo -i

8.2 Edit /etc/sysconfig/grub

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

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

## OR with LVM ##
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau nvidia-drm.modeset=1"

8.3 Update grub2 conf

## BIOS ##
grub2-mkconfig -o /boot/grub2/grub.cfg

## UEFI ##
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

h3>8.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"

8.5 Generate initramfs

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

8.6 Reboot

reboot

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

echo $XDG_SESSION_TYPE

Output should be Wayland.

2,952 comments on “NVIDIA Wayland on Fedora 34 Gnome 40

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.

Close