Missing Wayland login option on NVIDIA desktops

Bug #2020249 reported by Nagle-animats
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

Ref: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1968929

The symptom is that there is no Wayland option with the gear icon of the login screen.

This is a reopening of the tracking bug (https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1968929) for the followup from the previous attempt to fix the problem (https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1969243/comments/37). It's a continuation of the ongoing problem of getting NVidia and Wayland to play well together.

It may be that this fix didn't make it into Ubuntu 22.04.2 LTS.

System:

$ lsb_release -rd
Description: Ubuntu 22.04.2 LTS
Release: 22.04

Tags: wayland nvidia
Revision history for this message
Nagle-animats (nagle-animats) wrote :
Revision history for this message
Nagle-animats (nagle-animats) wrote :
Revision history for this message
Nagle-animats (nagle-animats) wrote :
Revision history for this message
Nagle-animats (nagle-animats) wrote :

Additional system information:

    $ echo $XDG_SESSION_TYPE
    x11

    $ ls -l /usr/share/xsessions/ | awk '{print $9}' | grep -v '^\.'
    ubuntu.desktop
    ubuntu-xorg.desktop
    unity.desktop

    $ gnome-shell --version
    GNOME Shell 42.5

So, not running Wayland.

Revision history for this message
Nagle-animats (nagle-animats) wrote :

Looking at /usr/lib/udev/rules.d/61-gdm.rules

The conditions that cause Wayland to be rejected as an option seem to be:

    # disable Wayland if modesetting is disabled
    IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland

    # 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"

So, looking at those conditions:

    Modesetting:

        $ inxi -Gxx
        Graphics:
          Device-1: NVIDIA GK107 [GeForce GT 640] vendor: eVga.com. driver: nvidia
            v: 470.182.03 pcie: speed: 2.5 GT/s lanes: 16 bus-ID: 01:00.0
            chip-ID: 10de:0fc1
          Display: x11 server: X.Org v: 1.21.1.4 compositor: gnome-shell v: 42.5
            driver: X: loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa
            gpu: nvidia display-ID: :1 screens: 1
          Screen-1: 0 s-res: 1920x1080 s-dpi: 101
          Monitor-1: HDMI-0 res: 1920x1080 dpi: 102 diag: 546mm (21.5")
          OpenGL: renderer: NVIDIA GeForce GT 640/PCIe/SSE2
            v: 4.6.0 NVIDIA 470.182.03 direct render: Yes

        $ grep modesetting /var/log/Xorg.0.log
        [155004.672] (==) Matched modesetting as autoconfigured driver 2
        [155004.802] (II) LoadModule: "modesetting"
        [155004.802] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
        [155004.834] (II) Module modesetting: vendor="X.Org Foundation"
        [155004.884] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
        [155004.901] (WW) Falling back to old probe method for modesetting
        [155005.857] (II) UnloadModule: "modesetting"
        [155005.857] (II) Unloading modesetting

      Does that mean modesetting failed to start? And if so, why?

    NVidia DRM:

        $ grep nvidia-drm /var/log/syslog
        May 14 00:45:51 Nagle-LTS kernel: [ 24.035970] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
        May 14 00:45:51 Nagle-LTS kernel: [ 24.035973] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0

      So nvidia-drm seems to be loaded.

    NVidia driver:

        NVidia driver version 470.182.03 is not lower than 470.
        That regular expression should not match.

Revision history for this message
Nagle-animats (nagle-animats) wrote :

Discussion on Ubuntu forums at

    https://ubuntuforums.org/showthread.php?t=2486867

suggested simply commenting out all those tests to force the use of Wayland.

But those tests may be there for a good reason, and forcing Wayland may result in an unstable system.

This bug has a long history, going back to 2019. It's been "fixed" several times now.

Sometimes, they come back.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You can safely comment out those udev rules. They're only there to stop regular users from hitting these issues while Nvidia Wayland support is not production-ready:

https://bugs.launchpad.net/ubuntu/+bugs?field.tag=nvidia-wayland

It's likely some people will only recently have lost the Wayland login option because it was sometimes displayed by mistake until this update: https://launchpad.net/ubuntu/+source/gdm3/42.0-1ubuntu7.22.04.2

So this bug is the design we intended in April 2022, but for some only a recent change that appeared on their machine in April 2023 (after bug 2006059 was fixed).

Changed in gdm3 (Ubuntu):
status: New → Opinion
summary: - Missing Wayland login option on NVIDIA systems - still broken
+ Missing Wayland login option on NVIDIA desktops
Revision history for this message
Nagle-animats (nagle-animats) wrote :

So, halfway through 2023, where are we on Wayland working out of the box with NVidia GPUs?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think many people won't notice the bugs, but there are still too many bugs listed with High severity:
https://bugs.launchpad.net/ubuntu/+bugs?field.tag=nvidia-wayland

Revision history for this message
Nagle-animats (nagle-animats) wrote :

Yes. I just updated one machine to Ubuntu 22.04.2 LTS, latest updates. Now I get a Wayland option at login and Wayland. But programs which use Vulkan graphics, ones that worked under Xorg, crash with a segmentation fault. I have a gdb backtrace. Now I, or someone else, has to sort out what part of the graphics stack (Rend3, WGPU, Vulkan, NVidia 530 driver) is broken.

Ref: https://github.com/BVE-Reborn/rend3/issues/486

I probably should report that bug somewhere else. Suggestions as to where?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I would recommend:

  ubuntu-bug egl-wayland

or report manually at: https://bugs.launchpad.net/ubuntu/+source/egl-wayland/+filebug
and mention: https://github.com/NVIDIA/egl-wayland/issues/80
which sounds like it's already fixed in Ubuntu 22.10 and later.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.