diff -Nru gdm3-44.1/debian/changelog gdm3-44.1/debian/changelog --- gdm3-44.1/debian/changelog 2023-05-15 19:23:16.000000000 +0000 +++ gdm3-44.1/debian/changelog 2023-05-31 08:40:52.000000000 +0000 @@ -1,3 +1,11 @@ +gdm3 (44.1-1ubuntu2) 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 Wed, 31 May 2023 08:40:52 +0000 + gdm3 (44.1-1ubuntu1) mantic; urgency=medium * Merge with Debian (LP: #2015406). Remaining changes: diff -Nru gdm3-44.1/debian/control gdm3-44.1/debian/control --- gdm3-44.1/debian/control 2023-05-15 19:23:16.000000000 +0000 +++ gdm3-44.1/debian/control 2023-05-31 08:40:52.000000000 +0000 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Jeremy Bicha , Marco Trevisan (TreviƱo) +Uploaders: Jeremy Bicha Build-Depends: check (>= 0.9.4), dconf-cli (>= 0.19.90), debhelper-compat (= 13), diff -Nru gdm3-44.1/debian/patches/series gdm3-44.1/debian/patches/series --- gdm3-44.1/debian/patches/series 2023-05-15 19:23:16.000000000 +0000 +++ gdm3-44.1/debian/patches/series 2023-05-31 08:32:28.000000000 +0000 @@ -13,3 +13,4 @@ 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/start-after-cloudinit.patch +ubuntu/flush-signal-handler-on-udev-settle.patch diff -Nru gdm3-44.1/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch gdm3-44.1/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch --- gdm3-44.1/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdm3-44.1/debian/patches/ubuntu/flush-signal-handler-on-udev-settle.patch 2023-05-31 08:40:40.000000000 +0000 @@ -0,0 +1,45 @@ +From: Ghadi Elie Rahme +Date: Tue, 31 May 2023 12:40:41 +0000 +Subject: Flush signal handler on all udev timeout + +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 and the function returns early. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/2020641 +--- +daemon/gdm-local-display-factory.c | 3 +++ + 1 file changed, 3 insertions(+) + + + +Index: gdm3-44.1/daemon/gdm-local-display-factory.c +=================================================================== +--- gdm3-44.1.orig/daemon/gdm-local-display-factory.c ++++ gdm3-44.1/daemon/gdm-local-display-factory.c +@@ -645,17 +645,20 @@ udev_is_settled (GdmLocalDisplayFactory + + if (factory->seat0_has_platform_graphics) { + g_debug ("GdmLocalDisplayFactory: udev settled, platform graphics enabled."); +- return TRUE; ++ 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."); +- return TRUE; ++ 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."); +- return TRUE; ++ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client); ++ return TRUE; + } + + g_debug ("GdmLocalDisplayFactory: Checking if udev has settled enough to support graphics.");