Skip to content

gdm.rules: Keep wayland enabled in all nvidia configurations allowing it

Marco Trevisan requested to merge 3v1n0/gdm:more-nvidia-wayland-rules into master

Nvidia drivers since version 470 supports both native wayland and accelerated Xwayland. The latter also works in hybrid configurations using nvidia Optimus (the session will run using the main integrated GPU, but it will be possible to use switcherooctl to run applications using the discrete nvidia card).

So, tune the rules so that, when the nvidia-drm module is loaded:

  • if modeset is not enabled, disable wayland
  • if driver version is minor than 470, disable wayland
  • otherwise, allow wayland (if main configuration permits it), but set Xorg as preferred display server.

Merge request reports