Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

  1. #1
    Join Date
    Jul 2013
    Beans
    92

    Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    I don't get the Wayland option at login on 22.04 LTS. Just "Ubuntu" or "Unity". This is on a machine with an NVidia 640. NVidia drivers is 470 ("proprietary, tested", "This device is using the recommended driver"). Google search for "ubuntu 22.04 wayland nvidia" turns up much contradictory information. It's clear that there have been serious problems in the past with NVidia vs. Wayland, and Weyland has been disabled for some platforms. What's the current status?

    I tried editing custom.conf:

    Code:
    [daemon]
    # Uncomment the line below to force the login screen to use Xorg
    #WaylandEnable=false
    WaylandEnable=true
    No effect.

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    On mine, which is Ubuntu LTS 22.04.2
    Code:
    nfiguration'
           product: GF119M [Quadro NVS 4200M]
           vendor: NVIDIA Corporation
           configuration: driver=nvidia latency=0
           product: 2nd Generation Core Processor Family Integrated Graphics Controller
           vendor: Intel Corporation
           configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
    mafoelffen@Mikes-ThinkPad-T520:~$ echo $XDG_CURRENT_DESKTOP
    ubuntu:GNOME
    mafoelffen@Mikes-ThinkPad-T520:~$ echo $XDG_SESSION_TYPE
    wayland
    When I select "Ubuntu on Wayland". It also has "Ubuntu on Xorg"...

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Jul 2013
    Beans
    92

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    https://i.ibb.co/w4b1ngz/unityselection.png
    Those are the available options. No Wayland option.

    https://i.ibb.co/RHvrTsX/ubuntudetails.png
    System details.

    Recheck:

    > echo $XDG_SESSION_TYPE
    x11

    So, running X11, not Wayland.

    There really is no Wayland option. Why?
    Last edited by ajgreeny; May 19th, 2023 at 08:47 PM. Reason: Huge images removed. PLease use the Attachment facility (paperclip) in the toolbar.

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    I don't know yet..

    What is would suggest, is to post the output of this within CODE Tags
    Code:
    ls -l /usr/share/xsessions/ | awk '{print $9}' | grep -v '^\.'
    gnome-shell --version

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    Jul 2013
    Beans
    92

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    Code:
    $ 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

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    please show us this:
    Code:
    cat /usr/lib/udev/rules.d/61-gdm.rules
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  7. #7
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    Quote Originally Posted by John Nagle View Post
    Code:
    $ 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
    That is the Ubuntu Desktop with Wayland...

    I use and prefer LigntDM, instead of GDM3... And Gnome.
    Code:
    mafoelffen@Mikes-ThinkPad-T520:~$  ls -l /usr/share/xsessions/ | awk '{print $9}' | grep -v '^\.'
    
    gnome-classic.desktop
    gnome-classic-xorg.desktop
    gnome.desktop
    gnome-xorg.desktop
    ubuntu.desktop
    ubuntu-xorg.desktop

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  8. #8
    Join Date
    Jul 2013
    Beans
    92

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    Code:
    $ cat /usr/lib/udev/rules.d/61-gdm.rules
    # identify virtio graphics cards to find passthrough setups
    SUBSYSTEM!="virtio", GOTO="gdm_virtio_device_end"
    ACTION!="add", GOTO="gdm_virtio_device_end"
    ATTR{vendor}=="0x1af4", ATTR{device}=="0x0010", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_virtio_device_end"
    LABEL="gdm_virtio_device_end"
    
    SUBSYSTEM!="pci", GOTO="gdm_pci_device_end"
    ACTION!="bind", GOTO="gdm_pci_device_end"
    
    # identify virtio graphics cards to find passthrough setups
    # cirrus
    ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
    # vga
    ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
    # qxl
    ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
    
    # disable Wayland on Hi1710 chipsets
    ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", GOTO="gdm_disable_wayland"
    
    # disable Wayland on Matrox chipsets
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0522", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0524", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0530", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0532", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0533", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0534", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0536", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x102b", ATTR{device}=="0x0538", GOTO="gdm_disable_wayland"
    
    # disable Wayland on aspeed chipsets
    ATTR{vendor}=="0x1a03", ATTR{device}=="0x2010", GOTO="gdm_disable_wayland"
    ATTR{vendor}=="0x1a03", ATTR{device}=="0x2000", GOTO="gdm_disable_wayland"
    
    LABEL="gdm_pci_device_end"
    
    # disable Wayland if modesetting is disabled
    KERNEL!="card[0-9]*", GOTO="gdm_nomodeset_end"
    SUBSYSTEM!="drm", GOTO="gdm_nomodeset_end"
    IMPORT{parent}="GDM_MACHINE_HAS_VIRTUAL_GPU"
    ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hardware-gpu"
    # but keep it enabled for simple framebuffer drivers
    DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end"
    IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland"
    LABEL="gdm_nomodeset_end"
    
    # The vendor nvidia driver has multiple modules that need to be loaded before GDM can make an
    # informed choice on which way to proceed, so force GDM to wait until NVidia's modules are
    # loaded before starting up.
    KERNEL!="nvidia", GOTO="gdm_nvidia_end"
    SUBSYSTEM!="module", GOTO="gdm_nvidia_end"
    ACTION!="add", GOTO="gdm_nvidia_end"
    RUN+="/usr/bin/touch /run/udev/gdm-machine-has-vendor-nvidia-driver"
    LABEL="gdm_nvidia_end"
    
    # If this machine has an internal panel, take note, since it's probably a laptop
    # FIXME: It could be "ghost connectors" make this pop positive for some workstations
    # in the wild. If so, we may have to fallback to looking at the chassis type from
    # dmi data or acpi
    KERNEL!="card[0-9]-eDP-*", GOTO="gdm_laptop_check_end"
    SUBSYSTEM!="drm", GOTO="gdm_laptop_check_end"
    ACTION!="add", GOTO="gdm_laptop_check_end"
    RUN+="/usr/bin/touch /run/udev/gdm-machine-is-laptop"
    GOTO="gdm_hybrid_nvidia_laptop_check"
    LABEL="gdm_laptop_check_end"
    
    # If this is a hybrid graphics setup, take note
    KERNEL!="card[1-9]*", GOTO="gdm_hybrid_graphics_check_end"
    KERNEL=="card[1-9]-*", GOTO="gdm_hybrid_graphics_check_end"
    SUBSYSTEM!="drm", GOTO="gdm_hybrid_graphics_check_end"
    ACTION!="add", GOTO="gdm_hybrid_graphics_check_end"
    RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hybrid-graphics"
    LABEL="gdm_hybrid_graphics_check_end"
    
    # 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"
    
    # Disable wayland in situation where we're in a guest with a virtual gpu and host passthrough gpu
    LABEL="gdm_virt_passthrough_check"
    TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_passthrough_check_end"
    TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_passthrough_check_end"
    TEST!="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_passthrough_check_end"
    GOTO="gdm_disable_wayland"
    LABEL="gdm_virt_passthrough_check_end"
    
    # Disable wayland when there are multiple virtual gpus
    LABEL="gdm_virt_multi_gpu_check"
    TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_multi_gpu_check_end"
    TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_multi_gpu_check_end"
    TEST=="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_multi_gpu_check_end"
    LABEL="gdm_virt_multi_gpu_check_end"
    
    # Disable wayland when nvidia modeset is disabled or when drivers are a lower
    # version than 470,
    # For versions above 470 but lower than 510 prefer Xorg,
    # Above 510, prefer Wayland.
    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"
    
    GOTO="gdm_end"
    
    LABEL="gdm_prefer_xorg"
    RUN+="/usr/libexec/gdm-runtime-config set daemon PreferredDisplayServer xorg"
    GOTO="gdm_end"
    
    LABEL="gdm_disable_wayland"
    RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
    GOTO="gdm_end"
    
    LABEL="gdm_end"
    Lots of very specific NVidia driver version restrictions in there.
    Last edited by John Nagle; May 17th, 2023 at 08:17 AM.

  9. #9
    Join Date
    Jul 2013
    Beans
    92

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    https://i.ibb.co/cNHWVht/displaydriver.png
    And this is the driver in use. 470, the recommended driver, supplied by the Ubuntu distro.

    Looks like "nvidia-drm" is required for Wayland on Nvidia. So, checking syslog:

    Code:
    $ grep nvidia-drm 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
    Looks OK.

    From the rules, Wayland should be available, but not automatically selected. But I don't even get the option. What am I missing?
    Last edited by ajgreeny; May 19th, 2023 at 08:49 PM. Reason: Huge image removed.

  10. #10
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Does Wayland work on Ubuntu 22.04 LTS with an NVidia GPU?

    Quote Originally Posted by John Nagle View Post
    Code:
    $ cat /usr/lib/udev/rules.d/61-gdm.rules
    ....
    # For nvidia drivers versions 470-495, prefer Xorg by default
    GOTO="gdm_prefer_xorg"
    LABEL="gdm_nvidia_drm_end"
    
    GOTO="gdm_end"
    
    LABEL="gdm_prefer_xorg"
    RUN+="/usr/libexec/gdm-runtime-config set daemon PreferredDisplayServer xorg"
    GOTO="gdm_end"
    
    LABEL="gdm_disable_wayland"
    RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
    GOTO="gdm_end"
    
    LABEL="gdm_end"
    Lots of very specific NVidia driver version restrictions in there.
    Code:
    sudo nano /usr/lib/udev/rules.d/61-gdm.rules
    At the above line (above in red), near the end of the file...
    Code:
    LABEL="gdm_prefer_xorg"
    #RUN+="/usr/lib/gdm-runtime-config set daemon PreferredDisplayServer xorg"
    GOTO="gdm_end"
    
    LABEL="gdm_disable_wayland"
    #RUN+="/usr/lib/gdm-runtime-config set daemon WaylandEnable false"
    GOTO="gdm_end"
    Add # to the two lines like what is shown above (scroll all the way down, both are at the bottom, to comment those two lines out. Save, then reboot. At the graphical login, select the gear Icon again, to see if you have the Wayland Option to login from...

    Note that is was nVidia themselves, that asked Canonical, right before Ubuntu 22.04's release, to prefer Xorg over Wayland.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •