🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #7501

Bug#1156376: debconf: GNOME frontend window is never raised, so questions get buried behind the installer

#7501
From: CLU
Date: Fri, 04 Dec 2026 21:40
118 lines
6846 bytes
Package: debconf
Version: 1.5.86ubuntu1
Severity: normal
Tags: patch
File: /usr/share/perl5/Debconf/FrontEnd/Gnome.pm

When an interactive debconf question is asked during a package transaction
started from a graphical installer (mintupdate/aptkit, PackageKit, GNOME
Software), the debconf GNOME assistant window is mapped but never raised or
focused. If the user has any window stacked above it, the installer appears to
hang at "Applying changes" with no clue that a question is waiting.

Real case, this reporting machine: a gdm3 question ("Default display
manager:") was queued by dpkg-preconfigure during a mintupdate transaction and
rendered underneath the update window. It sat unanswered for 20 hours. Nothing
had been unpacked yet, the progress bar never moved, and there was no way to
tell from the GUI that a dialog was waiting.

Root cause
----------
Debconf/FrontEnd/Gnome.pm creates an ordinary toplevel with no stacking or
attention hints:

  $this->assistant(Gtk3::Assistant->new);
  $this->assistant->set_position("center");
  ...
  $this->assistant->show;

There is no gtk_window_set_keep_above, no gtk_window_present /
present_with_time, and no gtk_window_set_urgency_hint. The frontend is spawned
by pk-debconf-helper, which is socket activated as a systemd --user unit, so
it has no transient-for parent and emits no startup notification that the
window manager could use to place it. Under focus-stealing prevention
(Muffin/Cinnamon, Mutter/GNOME, Xfwm, KWin) the window is therefore mapped
beneath whatever is currently on top and without focus.

Proposed fix
------------
Set keep_above and the urgency hint when the assistant is created, re-assert
keep_above and present the window each time an interactive question is about
to be shown, and drop keep_above when a non-interactive progress page is
displayed so the assistant does not float above everything for the whole
transaction.

Tested on Linux Mint 22.3 (Cinnamon 6 / Muffin, X11), debconf 1.5.86ubuntu1,
libgtk3-perl 0.038. With the patch applied, running

  sudo debconf --frontend=gnome ... (via dpkg-reconfigure -f gnome debconf)

produces a window whose _NET_WM_STATE is

  _NET_WM_STATE_ABOVE, _NET_WM_STATE_FOCUSED

Without the patch the same window carries neither hint and can be mapped
behind the caller. All of set_keep_above, set_urgency_hint, present,
present_with_time and get_window exist in libgtk3-perl 0.038 and apply without
error.

Patch (against debconf 1.5.86ubuntu1, /usr/share/perl5/Debconf/FrontEnd/Gnome.pm):

--- a/Debconf/FrontEnd/Gnome.pm
+++ b/Debconf/FrontEnd/Gnome.pm
@@ -174,6 +174,12 @@
 
 	$this->assistant(Gtk3::Assistant->new);
 	$this->assistant->set_position("center");
+	# Stay above the installer that spawned us: the frontend runs from a
+	# socket-activated unit with no transient parent, so under focus-stealing
+	# prevention the window otherwise maps underneath the caller's window and
+	# the transaction silently waits for an answer nobody can see.
+	$this->assistant->set_keep_above(1);
+	$this->assistant->set_urgency_hint(1);
 	$this->assistant->set_default_size(600, 400);
 	my $hostname = `hostname`;
 	chomp $hostname;
@@ -213,6 +219,7 @@
 	$this->create_assistant_page();
 
 	$this->assistant->show;
+	$this->assistant->present;
 }
 
 
@@ -235,6 +242,8 @@
 		if ($this->assistant->get_current_page == $this->assistant->get_n_pages - 1) {
 			$this->create_assistant_page();
 		}
+		$this->assistant->set_keep_above(1);
+		$this->assistant->present;
 		Gtk3::main();
 	}
 
@@ -250,6 +259,9 @@
 	my $this=shift;
 	$this->SUPER::progress_start(@_);
 
+	# progress pages are not questions: stop floating above everything
+	$this->assistant->set_keep_above(0);
+
 	$this->reset_assistant_page;
 
 	my $element=$this->progress_bar;

Related, not duplicates
-----------------------
- PackageKit issues #452 and #989 (pk-debconf-helper at 100% CPU, update hangs)
  and linuxmint/mintupdate#1052 describe the same user-visible symptom, a hung
  progress bar, through a different mechanism. This report is only about the
  window not being raised or focused.
- Ubuntu LP #2086773 was the Wayland variant where the GTK helper window did
  not appear at all (fixed in packagekit 1.3.0-2).

I could not find an existing report for this in the debconf BTS; the upstream
salsa issue tracker is disabled, hence this mail.

Regards,
Christian Sass
Binary Ranch
Technical Details
Message-ID: <O6Jax-g0x0-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: CLU <clu@sastian.com>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1156376: debconf: GNOME frontend window is never raised, so questions get buried behind the installer
Date: Fri, 04 Dec 2026 22:40:01 +0100
Message-ID: <O6Jax-g0x0-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Dec  4 21:31:10 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: CLU <clu@sastian.com>, 1156376@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debconf-devel@lists.alioth.debian.org
X-Debian-Pr-Message: report 1156376
X-Debian-Pr-Package: debconf
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: debconf
X-Gm-Message-State: APuU4Z+6V7M6omldvqk0bF+B/n4YKRN1W2GPfOJqBIMmOvbA2pBUJC6v
	VCGHrjg6dQydthxnjQ7JKgh7IyloX33VPzh3YFWJVsmfWMZ54IdtoFLVBCjyAIYMOpK4qNw5d3C
	eoTDn
X-Gm-Gg: AZFdTZd57ljJAaBn4w43lVsMXIrXcmjZHMKpo8mgfp0bN8I+RlsNEDbrt3POGmqAJUI
	/lrx0jHzjkEwUzvM6zmKwiE3P0YbmTkwemTdsyZliZ8SxGHsimkZoBvlmN4dSABn5PJYxxjt+Y+
	1n43TMFyQGgHFn7FRCWuuDqW6Jgx8asJgtnI4NosT17B+Kq7JR2RMvfIpc0ywdIzEl1JsphVOM2
	Yi36Gkvz1M83RyB4iogqSELhBuwQAb5nAcw+JbV/Z30cdOantnk66HiTIDjZeWT4OTsF5Oruj4G
	j4YX2HxCs29J1Ln5zCgWrGxGYZH84up/IRTouwzi0JSERSpEqHqM82VbJDGn2qoCVYc+ILI2Kjm
	HoAADgbIOaPxL4ZBQTywIY9hg3r18kHgrTz8UECqqHMRb9a5z5wAQcIbFECMk7M6aB8mwjdx2LC
	nMGMSahQ67wM2CbGR/ucx+NSTt/vMcXWFATG9bHeTI3lZK1NMEWe0IGCt69dX4f1jjjE4+nnf4D
	mijBcacdQLzhiWOhn6H9RtJm5fJw4QIhHf22UFHZX0xu9cr
X-Received: by 2002:a05:6830:4414:b0:862:b15e:243a with SMTP id 46e09a7af769-863f89c3491mr3823171a34.17.1796419741764;
        Fri, 04 Dec 2026 13:29:01 -0800 (PST)
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2007010
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 118
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Fri, 04 Dec 2026 13:29:00 -0800 (PST)
X-Original-Message-ID: <6b13309c.622bb7eb.2e2078.76ae@mx.google.com>