Public bug reported:

[ Impact ]

If the display resolution changes while GNOME Shell's overview startup
animation is running, login can stall at a gray screen that blocks
input. The desktop does not recover on its own. This can happen when a
virtual machine or remote desktop changes resolution as the client
connects.

This bug is separate from LP #2174851. Both leave the same gray screen,
but they stall at different points of the startup animation and are
fixed by different upstream changes. The fixes for both are in the same
uploads (Noble/Jammy, the other releases already have this fix.)

Who Is Affected:

  - Noble: sessions that start in the overview (see LP #2174851: Ubuntu Dock 
normally skips it) on systems where animations are enabled. In testing, 3 of 15 
logins hung when the resolution changed while the dash was rising.
  - Jammy: not reached by a display change alone. Ubuntu Dock normally replaces 
the startup animation with its own, and with the dock disabled a real 
resolution change during the dash rise did not stop the animation (0 of 21 
logins hung). Jammy has the same unguarded callback as Noble, so the hang 
occurs whenever something else stops the dash animation early, such as an 
extension that replaces or recreates the dash during startup. The Jammy 
reproducer stops it directly and hangs on every login without the fix.

Why the Jammy Reproducer Stops the Animation Directly:

On Noble, what stops the dash animation is Ubuntu Dock itself. GNOME
Shell 46 loads extensions asynchronously, and Ubuntu Dock on Noble does
not replace the overview startup animation. When the overview path is
taken, GNOME's own animation runs, animates the dock's dash, and
finishes startup from that animation's onComplete callback. When the
display mode changes, Ubuntu Dock rebuilds its docks, which destroys
that dash while it is still rising, so the callback never runs.

GNOME Shell 42 loads extensions synchronously, before the startup
animation is prepared. Ubuntu Dock on Jammy uses this to replace the
overview startup animation with its own, which restarts itself when the
docks are rebuilt, so a display mode change never leaves GNOME's
callback waiting. With Ubuntu Dock disabled, GNOME's own animation and
callback are used, but nothing in GNOME Shell 42 stops the dash
animation on a display change. The Jammy reproducer therefore disables
Ubuntu Dock and stops the dash animation itself, standing in for the
extension that does this on Noble.

[ Test Plan ]

Reproducer Contents:

reproducers-dash.tar.gz contains noble/ and jammy/, each with a GNOME
Shell extension for that release (46 or 42), run-startup-dash-lxd.sh and
steps.txt (the steps below for that release):

  - noble/startup-dash@test: waits until the dash has started rising during the 
overview startup animation, then switches the display to the nearest other 
resolution through mutter's DisplayConfig D-Bus interface.
  - jammy/startup-dash-stop@test: waits until the dash has started rising 
during the overview startup animation, then stops that animation directly 
(Clutter remove_transition), as an extension that replaces or recreates the 
dash would.
  - Both extensions re-enable animations, which GNOME disables in VMs that 
render in software.
  - run-startup-dash-lxd.sh: installs and enables the extension for the ubuntu 
user and forces the overview startup path on every login (Noble: dash-to-dock 
disable-overview-on-startup=false; Jammy: Ubuntu Dock disabled, since its own 
startup animation does not use the callback being fixed). It then restarts gdm 
once per repeat and reports OK or HUNG.

Count only runs marked fired=1: HUNG means startup did not complete
before the timeout; OK means it did. A result marked (not-fired) did not
exercise the bug.

Steps:

Create a LXD VM from the desktop image of the release under test and
copy the reproducer into it. The images create an ubuntu user with GDM
autologin enabled. <release> is noble or jammy, and <image> is 24.04 or
22.04 respectively.

  lxc launch images:ubuntu/<image>/desktop desktop-<release> --vm -c 
limits.cpu=4 -c limits.memory=4GiB
  lxc file push reproducers-dash.tar.gz desktop-<release>/root/
  lxc shell desktop-<release>

Inside the VM, extract the reproducer and confirm the ubuntu user and
autologin (expect AutomaticLogin=ubuntu and AutomaticLoginEnable=true):

  tar xzf reproducers-dash.tar.gz
  getent passwd ubuntu
  grep AutomaticLogin /etc/gdm3/custom.conf

Run the reproducer as root with the current packages. Then install
gnome-shell and gnome-shell-common from -proposed and repeat the same
command:

  cd <release>
  chmod +x run-startup-dash-lxd.sh
  ./run-startup-dash-lxd.sh 20

The optional argument is REPEATS (default 10).

On Noble, some logins hang with the current package and none with the
fix. On Jammy, every login hangs with the current package and none with
the fix.

Results Obtained Before Upload:
  
Noble, with the current package (./run-startup-dash-lxd.sh 15). 3 of 15 hung:

  rep=1 pid=6358 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] -> 
[email protected] (dash at y=154)] OK
  rep=2 pid=7362 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] -> 
[email protected] (dash at y=416)] OK
  rep=3 pid=8336 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] -> 
[email protected] (dash at y=547)] OK
  rep=4 pid=9304 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] -> 
[email protected] (dash at y=368)] OK
  rep=5 pid=10307 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=527)] OK
  rep=6 pid=11308 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=542)] HUNG
  rep=7 pid=12502 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=412)] OK
  rep=8 pid=13496 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=330)] OK
  rep=9 pid=14478 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=532)] OK
  rep=10 pid=15443 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=511)] HUNG
  rep=11 pid=16401 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=532)] OK
  rep=12 pid=17372 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=54)] OK
  rep=13 pid=18366 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=430)] OK
  rep=14 pid=19360 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=552)] OK
  rep=15 pid=20330 gnome-shell=46.0-0ubuntu6~24.04.17 fired=1 [[email protected] 
-> [email protected] (dash at y=326)] HUNG

Noble, with the patched package (./run-startup-dash-lxd.sh 15). All 14
runs where the mode change fired completed:

  rep=1 pid=21394 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=421)] OK
  rep=2 pid=22373 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=462)] OK
  rep=3 pid=23354 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=326)] OK
  rep=4 pid=24324 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=284)] OK
  rep=5 pid=25319 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=482)] OK
  rep=6 pid=26287 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=186)] OK
  rep=7 pid=27278 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=421)] OK
  rep=8 pid=28251 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=453)] OK
  rep=9 pid=29229 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=462)] OK
  rep=10 pid=30195 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=542)] OK
  rep=11 pid=31171 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=563)] OK
  rep=12 pid=32156 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=521)] OK
  rep=13 pid=33147 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=527)] OK
  rep=14 pid=34131 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=0 [] 
OK(not-fired)
  rep=15 pid=35111 gnome-shell=46.0-0ubuntu6~24.04.18+ppa fired=1 
[[email protected] -> [email protected] (dash at y=537)] OK
  
Jammy, with the current package (./run-startup-dash-lxd.sh 10). 10 of 10 hung:

  rep=1 pid=23429 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.34 y=69)] 
HUNG
  rep=2 pid=24127 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.20 y=83)] 
HUNG
  rep=3 pid=24801 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.20 y=83)] 
HUNG
  rep=4 pid=25497 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.22 y=82)] 
HUNG
  rep=5 pid=26183 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.29 y=73)] 
HUNG
  rep=6 pid=26865 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.29 y=73)] 
HUNG
  rep=7 pid=27552 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.36 y=66)] 
HUNG
  rep=8 pid=28239 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.32 y=70)] 
HUNG
  rep=9 pid=28921 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.23 y=81)] 
HUNG
  rep=10 pid=29615 gnome-shell=42.9-0ubuntu2.4 fired=1 [(progress=0.27 y=76)] 
HUNG

Jammy, with the patched package (./run-startup-dash-lxd.sh 10). 10 of 10
completed:

  rep=1 pid=30447 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.20 
y=83)] OK
  rep=2 pid=31232 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.20 
y=83)] OK
  rep=3 pid=31998 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.20 
y=83)] OK
  rep=4 pid=32782 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.25 
y=78)] OK
  rep=5 pid=33566 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.20 
y=83)] OK
  rep=6 pid=34359 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.34 
y=68)] OK
  rep=7 pid=35140 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.20 
y=83)] OK
  rep=8 pid=35918 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.26 
y=77)] OK
  rep=9 pid=36726 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.25 
y=78)] OK
  rep=10 pid=37515 gnome-shell=42.9-0ubuntu2.6+ppa fired=1 [(progress=0.21 
y=82)] OK

[ Where problems could occur ]

Startup now finishes when the dash animation stops for any reason, not
only when it runs to the end. A mistake here could cause something like
the dash appearing before its animation completes.

[ Other Info ]

Root cause and fix:

During the overview startup animation, js/ui/overviewControls.js
finishes startup from the dash's rise animation, using an onComplete
callback. onComplete only runs if the transition reaches its end. If the
transition is stopped early, the callback never runs, 'startup-complete'
is never emitted, and the input-blocking cover pane stays on screen.
Upstream commit 93b33cf3 (MR !3422) uses onStopped instead, which runs
however the transition ends.

What stops the transition:

A 'monitors-changed' signal on its own does not stop it. It makes the
overview hide, but the dash animation keeps running and completes: 6 of
6 Noble logins completed when the signal was emitted while the dash was
moving, and on Jammy the dash finished normally in all 22 runs where the
signal arrived during it. A real display mode change does stop it on
Noble. In an earlier diagnostic run that switched between 1280x800 and
1280x1024, 6 of 19 logins hung with gnome-shell 46.0-0ubuntu6~24.04.17,
each with the dash animation stopped short of its final position, and 20
of 20 completed with the patched package.

Upstream Reference:

93b33cf314c1cab980d0221ce33cf8b574e4b8ee  overviewControls: Make sure
startup animation completes  (MR !3422, first released in GNOME 47.0)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3422

** Affects: gnome-shell (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: gnome-shell (Ubuntu Jammy)
     Importance: High
     Assignee: Dean Marx (dmarx11)
         Status: In Progress

** Affects: gnome-shell (Ubuntu Noble)
     Importance: High
     Assignee: Dean Marx (dmarx11)
         Status: In Progress

** Attachment added: "reproducers-dash.tar.gz"
   
https://bugs.launchpad.net/bugs/2175432/+attachment/6019754/+files/reproducers-dash.tar.gz

** Also affects: gnome-shell (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: gnome-shell (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: gnome-shell (Ubuntu Jammy)
     Assignee: (unassigned) => Dean Marx (dmarx11)

** Changed in: gnome-shell (Ubuntu Noble)
     Assignee: (unassigned) => Dean Marx (dmarx11)

** Changed in: gnome-shell (Ubuntu Noble)
    Milestone: None => noble-updates

** Changed in: gnome-shell (Ubuntu Jammy)
    Milestone: None => jammy-updates

** Changed in: gnome-shell (Ubuntu Jammy)
   Importance: Undecided => High

** Changed in: gnome-shell (Ubuntu Noble)
   Importance: Undecided => High

** Changed in: gnome-shell (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: gnome-shell (Ubuntu Noble)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175432

Title:
  gnome-shell startup stuck at a gray screen when the display mode
  changes during the dash startup animation

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2175432/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to