diff -Nru gdm3-42.0/debian/changelog gdm3-42.0/debian/changelog --- gdm3-42.0/debian/changelog 2023-04-20 16:27:53.000000000 +0300 +++ gdm3-42.0/debian/changelog 2023-05-23 18:55:51.000000000 +0300 @@ -1,3 +1,11 @@ +gdm3 (42.0-1ubuntu7.22.04.3) UNRELEASED; urgency=medium + + * Add d/p/ubuntu/flush-signal-handler-on-udev-settle.patch: + Clear signal handler after udev settle to avoid sudden + logout (LP: #2020641) + + -- Ghadi Elie Rahme Tue, 23 May 2023 15:55:51 +0000 + gdm3 (42.0-1ubuntu7.22.04.2) jammy; urgency=medium [ Daniel van Vugt ] diff -Nru gdm3-42.0/debian/control gdm3-42.0/debian/control --- gdm3-42.0/debian/control 2023-04-20 16:27:53.000000000 +0300 +++ gdm3-42.0/debian/control 2023-05-23 18:55:51.000000000 +0300 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Jeremy Bicha , Marco Trevisan (TreviƱo) +Uploaders: Iain Lane , Jeremy Bicha , Laurent Bigonville Build-Depends: check (>= 0.9.4), dconf-cli (>= 0.19.90), debhelper-compat (= 13), diff -Nru gdm3-42.0/debian/patches/series gdm3-42.0/debian/patches/series --- gdm3-42.0/debian/patches/series 2023-04-20 16:27:53.000000000 +0300 +++ gdm3-42.0/debian/patches/series 2023-05-23 18:55:51.000000000 +0300 @@ -24,3 +24,4 @@ ubuntu/prefer_ubuntu_session_fallback.patch ubuntu/XSession-Use-x-terminal-emulator-as-fallback-instead-of-x.patch ubuntu/Revert-data-Disable-GDM-on-hybrid-graphics-laptops-with-v.patch +ubuntu/flush-signal-handler-on-udev-settle.patch diff -Nru gdm3-42.0/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch gdm3-42.0/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch --- gdm3-42.0/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch 1970-01-01 02:00:00.000000000 +0200 +++ gdm3-42.0/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch 2023-05-23 18:55:51.000000000 +0300 @@ -0,0 +1,39 @@ +From: Ghadi Elie Rahme +Date: Tue, 23 May 2023 12:40:41 +0000 +Subject: Flush signal handler on udev settle + +When a udev is settled the signal handler is +flushed,however this is not the case if the +function returns early. This patch makes sure +that the signal handler is flushed if the +udev is settled on an early return. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/2020641 +--- +daemon/gdm-local-display-factory.c | 3 +++ + 1 file changed, 3 insertions(+) + + + +--- a/daemon/gdm-local-display-factory.c ++++ b/daemon/gdm-local-display-factory.c +@@ -646,16 +646,19 @@ + + if (factory->seat0_has_platform_graphics) { + g_debug ("GdmLocalDisplayFactory: udev settled, platform graphics enabled."); ++ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client); + return TRUE; + } + + if (factory->seat0_has_boot_up_graphics) { + g_debug ("GdmLocalDisplayFactory: udev settled, boot up graphics available."); ++ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client); + return TRUE; + } + + if (factory->seat0_graphics_check_timed_out) { + g_debug ("GdmLocalDisplayFactory: udev timed out, proceeding anyway."); ++ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client); + return TRUE; + } +