Enable udev debug by adding udev.log-priority=debug to kernel parameter.
I notice that the in 61-gdm3.rules, the condition for
gdm_hybrid_nvidia_laptop_check [1] will be fulfilled early then kernel
module nvidia_drm been inserted. So the "prefer xorg" logic [2] won't be
executed.

[1]
# If this is a hybrid graphics laptop with vendor nvidia driver, prefer Wayland
LABEL="gdm_hybrid_nvidia_laptop_check"
TEST!="/run/udev/gdm-machine-is-laptop", 
GOTO="gdm_hybrid_nvidia_laptop_check_end"
TEST!="/run/udev/gdm-machine-has-hybrid-graphics", 
GOTO="gdm_hybrid_nvidia_laptop_check_end"
TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", 
GOTO="gdm_hybrid_nvidia_laptop_check_end"
GOTO="gdm_end"
LABEL="gdm_hybrid_nvidia_laptop_check_end"

[2]
KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end"
SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end"
ACTION!="add", GOTO="gdm_nvidia_drm_end"
# disable wayland if nvidia-drm modeset is not enabled
ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
# disable wayland for nvidia drivers versions lower than 470
ATTR{version}=="4[0-6][0-9].*|[0-3][0-9][0-9].*|[0-9][0-9].*|[0-9].*", 
GOTO="gdm_disable_wayland"
# For nvidia drivers versions Above 510, prefer Xorg by default
ATTR{version}=="[5-9][1-9][0-9].*", GOTO="gdm_prefer_xorg"
# For nvidia drivers versions 470-495, prefer Xorg by default
GOTO="gdm_prefer_xorg"
LABEL="gdm_nvidia_drm_end"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2080498

Title:
  Default session type changed from Xorg to Wayland in some installs of
  22.04 on Nvidia hybrids since kernel 6.8

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/2080498/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to