diff -Nru gdm3-42.0/debian/changelog gdm3-42.0/debian/changelog --- gdm3-42.0/debian/changelog 2022-04-14 18:29:35.000000000 +0000 +++ gdm3-42.0/debian/changelog 2022-04-16 01:02:08.000000000 +0000 @@ -1,3 +1,16 @@ +gdm3 (42.0-1ubuntu6) jammy; urgency=medium + + * Fix Wayland no longer being available for everyone + - Fix by adding a separate revert patch instead of trying to + rebase the cherry-picked patches (LP: #1969243) + * Please note that Wayland is not currently available for + systems using the Nvidia graphics drivers because those drivers + don't properly handle suspend and resuming from suspend. It is + intended for those drivers to be fixed in a future stable release + update for Ubuntu 22.04 LTS. See bug 1968929 + + -- Jeremy Bicha Fri, 15 Apr 2022 21:02:08 -0400 + gdm3 (42.0-1ubuntu4) jammy; urgency=medium * Drop patch disabling Wayland on hybrid laptops using Nvidia's drivers. diff -Nru gdm3-42.0/debian/patches/data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch gdm3-42.0/debian/patches/data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch --- gdm3-42.0/debian/patches/data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdm3-42.0/debian/patches/data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch 2022-04-16 01:02:08.000000000 +0000 @@ -0,0 +1,67 @@ +From: Ray Strode +Date: Tue, 15 Feb 2022 08:36:28 -0500 +Subject: data: Disable GDM on hybrid graphics laptops with vendor NVidia + driver + +We really don't want wayland on hybrid graphics laptops, because +certain connectors won't work right now. + +This commit tries to detect the case and disable it. + +(cherry picked from commit 440d6f9ecc151fbcf8c852d500c5cc5add168b94) +--- + data/61-gdm.rules.in | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in +index 0f6e446..6b36bcb 100644 +--- a/data/61-gdm.rules.in ++++ b/data/61-gdm.rules.in +@@ -15,6 +15,42 @@ 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, disable 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_disable_wayland" ++LABEL="gdm_hybrid_nvidia_laptop_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, +@@ -43,3 +79,4 @@ RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false" + GOTO="gdm_end" + + LABEL="gdm_end" ++ diff -Nru gdm3-42.0/debian/patches/data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch gdm3-42.0/debian/patches/data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch --- gdm3-42.0/debian/patches/data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch 2022-04-14 18:29:35.000000000 +0000 +++ gdm3-42.0/debian/patches/data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch 2022-04-16 01:02:08.000000000 +0000 @@ -11,10 +11,10 @@ 1 file changed, 7 insertions(+) diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in -index d45f1c1..cc9f764 100644 +index 5351e0b..5bc9941 100644 --- a/data/61-gdm.rules.in +++ b/data/61-gdm.rules.in -@@ -81,6 +81,13 @@ TEST!="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_passthrough_check +@@ -100,6 +100,13 @@ TEST!="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_passthrough_check GOTO="gdm_disable_wayland" LABEL="gdm_virt_passthrough_check_end" @@ -25,6 +25,6 @@ +TEST=="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_multi_gpu_check_end" +LABEL="gdm_virt_multi_gpu_check_end" + - GOTO="gdm_end" - - LABEL="gdm_prefer_xorg" + # 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, diff -Nru gdm3-42.0/debian/patches/data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch gdm3-42.0/debian/patches/data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch --- gdm3-42.0/debian/patches/data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch 2022-04-14 18:29:35.000000000 +0000 +++ gdm3-42.0/debian/patches/data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch 2022-04-16 01:02:08.000000000 +0000 @@ -11,7 +11,7 @@ 1 file changed, 23 insertions(+) diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in -index 87072fa..d45f1c1 100644 +index 52da36d..5351e0b 100644 --- a/data/61-gdm.rules.in +++ b/data/61-gdm.rules.in @@ -1,7 +1,20 @@ @@ -44,9 +44,9 @@ # but keep it enabled for simple framebuffer drivers DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end" IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland" -@@ -58,6 +73,14 @@ ATTR{version}=="[5-9][1-9][0-9].*", GOTO="gdm_end" - GOTO="gdm_prefer_xorg" - LABEL="gdm_nvidia_drm_end" +@@ -77,6 +92,14 @@ TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_ + GOTO="gdm_disable_wayland" + 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" @@ -56,6 +56,6 @@ +GOTO="gdm_disable_wayland" +LABEL="gdm_virt_passthrough_check_end" + - GOTO="gdm_end" - - LABEL="gdm_prefer_xorg" + # 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, diff -Nru gdm3-42.0/debian/patches/data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch gdm3-42.0/debian/patches/data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch --- gdm3-42.0/debian/patches/data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch 2022-04-14 18:29:35.000000000 +0000 +++ gdm3-42.0/debian/patches/data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch 2022-04-16 01:02:08.000000000 +0000 @@ -14,13 +14,14 @@ 1 file changed, 12 insertions(+) diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in -index 0f6e446..d3c350b 100644 +index 6b36bcb..02a10e9 100644 --- a/data/61-gdm.rules.in +++ b/data/61-gdm.rules.in -@@ -15,6 +15,18 @@ DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end" - IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland" - LABEL="gdm_nomodeset_end" - +@@ -22,6 +22,18 @@ 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" ++ +# Check if suspend/resume services necessary for working wayland support is available +TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland" +TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland" @@ -32,7 +33,6 @@ +ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland" +IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'" +ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland" -+ - # 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, + LABEL="gdm_nvidia_end" + + # If this machine has an internal panel, take note, since it's probably a laptop diff -Nru gdm3-42.0/debian/patches/series gdm3-42.0/debian/patches/series --- gdm3-42.0/debian/patches/series 2022-04-14 18:29:35.000000000 +0000 +++ gdm3-42.0/debian/patches/series 2022-04-16 01:02:08.000000000 +0000 @@ -1,3 +1,14 @@ +# Cherry-picked patches +data-Be-a-little-more-specific-when-matching-PCI-cards.patch +data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch +data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch +data-Disable-wayland-on-some-server-chips.patch +data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch +data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch +local-display-factory-Fix-type-of-signal-connection-id.patch +local-display-factory-Stop-listening-to-udev-events-when-.patch +Update-Basque-translation.patch +# End cherry-picked patches 16_xserver_path.patch 90_config_comments.patch 91_dconf_database_path.patch @@ -11,13 +22,4 @@ ubuntu/dont_set_language_env.patch ubuntu/prefer_ubuntu_session_fallback.patch ubuntu/XSession-Use-x-terminal-emulator-as-fallback-instead-of-x.patch -data-Be-a-little-more-specific-when-matching-PCI-cards.patch -data-Disable-wayland-on-nvidia-if-suspend-is-broken.patch -data-Disable-wayland-on-some-server-chips.patch -data-Disable-wayland-on-guests-with-passthrough-and-virt-.patch -data-Disable-wayland-if-there-are-multiple-virtual-gpus.patch -local-display-factory-Fix-type-of-signal-connection-id.patch -local-display-factory-Stop-listening-to-udev-events-when-.patch -Update-Basque-translation.patch -# We don't want this patch in Ubuntu so revert it when packaging 42.1 -# data-Disable-GDM-on-hybrid-graphics-laptops-with-vendor-N.patch +ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch diff -Nru gdm3-42.0/debian/patches/ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch gdm3-42.0/debian/patches/ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch --- gdm3-42.0/debian/patches/ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdm3-42.0/debian/patches/ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch 2022-04-16 01:02:08.000000000 +0000 @@ -0,0 +1,51 @@ +From: Jeremy Bicha +Date: Fri, 15 Apr 2022 20:59:16 -0400 +Subject: data: Don't disable GDM on hybrid graphics laptops with vendor + NVidia driver + +This commit is no longer necessary because Ubuntu carries the patches +from https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2341 + +This reverts commit 440d6f9ecc151fbcf8c852d500c5cc5add168b94. +--- + data/61-gdm.rules.in | 27 --------------------------- + 1 file changed, 27 deletions(-) + +diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in +index 5bc9941..d3be611 100644 +--- a/data/61-gdm.rules.in ++++ b/data/61-gdm.rules.in +@@ -65,33 +65,6 @@ IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-su + ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland" + 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, disable 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_disable_wayland" +-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"