Wayland
I finally made it and enabled Wayland for the first time on my Desktop PC.
I have always used Nvidia GPUs and had always given up due to various problems.
The recent bug that afflicted X11, nvidia and the Google login gave me the cue to try more seriously and after many attempts I found the definitive solution.
How to enable Wayland on Arch Linux GNOME 44 & Nvidia GPU
Tested with GPU Nvidia RTX3070 & Nvidia official drivers installed (instead of gedit you can use nano or your preferred text editor).
1 – GDM custom.conf
Give the command
$ sudo gedit /etc/gdm/custom.conf
Replace
#WaylandEnable=false
With
WaylandEnable=true
Save
2 – Mkinitcpio modules
$ sudo gedit /etc/mkinitcpio.conf
Replace
MODULES=()
With
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
Save the file & update with
$ sudo mkinitcpio -P
3 – Kernel flag
Choose one of the following methods depending on whether your boot manager is systemd-boot or grub
Add kernel flag to systemd-boot
Give the command
$ sudo gedit /boot/loader/entries/arch.conf
Add nvidia_drm.modeset=1 to the options field and save the file
For example:
title Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root=/dev/nvme1 rw nvidia_drm.modeset=1
Update with
$ sudo bootctl update
Add kernel flag to grub
Give the command
$ sudo gedit /etc/default/grub
Add nvidia-drm.modeset=1 and save
For example
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia_drm.modeset=1"
Update with
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
4 – Disable GDM udev rules which force the use of Xorg
Give this command & reboot
$ sudo ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
You will immediately notice that something has changed from the new graphic style of the initial boot selector. At the next GDM login it will be possible to start Wayland by selecting GNOME and return to X11 by selecting GNOME on Xorg.
Verify use of Wayland
Give the command
$ echo $XDG_SESSION_TYPE
Conclusions
Switching from X11 to Wayland on Arch Linux allowed me to fix the “Signin with Google account freezes content” bug and get a surprisingly responsive system. Applications that use acceleration such as games work properly and system security has been increased.
It was necessary a DPI reset from GNOME Panel Monitor settings (scale 200% for 4K) and re-enable all Gnome Shell Extensions from universal switch.
Greyzusht says
Thank you for this guild,
Your method always works for me.
osside says
Thanks for this feedback!!
aaa says
thanks it works