[SRU] Ubuntu Unity takes 90 seconds to log out

Bug #2063383 reported by Simon Quigley
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Triaged
High
Simon Quigley
Noble
Confirmed
High
Simon Quigley

Bug Description

[ Impact ]

Ubuntu Unity reliably takes 90 seconds to log out. This is due to the user-level gnome-session.service systemd unit not properly terminating gnome-session on logout. An attempt is made to send SIGTERM to the process, which gnome-session does not care about.

Instead, gnome-session-quit should be invoked when the systemd unit shuts down, which acts effectively and immediately.

[ Test Plan ]

Actual behavior:
 1. Log in to a Unity session on Ubuntu Unity 24.04.
 2. Log out of Ubuntu Unity.
 3. Observe that only the wallpaper is shown for 90 seconds prior to the login manager showing again.

Expected behavior:
 1. Log in to a Unity session on Ubuntu Unity 24.04.
 2. Log out of Ubuntu Unity.
 3. Observe that logging out takes a few seconds at most, and you are able to log back in as the same user, or a different one.

[ Where problems could occur ]

If the gnome-session or gnome-session-quit binaries change the arguments they accept by default, log in and log out functionality on Unity sessions are likely to break.

Additionally, if lightdm or systemd changes in a non-reverse-compatible way, this increases the chance of a user-facing regression.

Simon Quigley (tsimonq2)
summary: - Ubuntu Unity takes 90 seconds to log out
+ [SRU] Ubuntu Unity takes 90 seconds to log out
Changed in gnome-session (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Simon Quigley (tsimonq2)
Changed in gnome-session (Ubuntu Noble):
milestone: none → noble-updates
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/2063383

tags: added: iso-testing
tags: added: noble
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Simon, or anyone else affected,

Accepted gnome-session into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-session/46.0-1ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-session (Ubuntu Noble):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Benjamin Drung (bdrung) wrote :

I'll test this fix (since I am experience the bug).

Revision history for this message
aein (aeinner) wrote :

Proposed package (gnome-session/46.0-1ubuntu4.1) partially fixed this bug for me. When some applications are running (Microsoft Teams in my case) logout takes long time ~90 seconds. Without any running applications logout works as expected.

Revision history for this message
Benjamin Drung (bdrung) wrote :

I did not fix it for me. The logout still takes a long time (could be around a minute / 90 seconds) even with no applications running.

```
$ dpkg -l | grep 46.0-1ubuntu4.1
ii gnome-session 46.0-1ubuntu4.1 all GNOME Session Manager - GNOME 3 session
ii gnome-session-bin 46.0-1ubuntu4.1 amd64 GNOME Session Manager - Minimal runtime
ii gnome-session-common 46.0-1ubuntu4.1 all GNOME Session Manager - common files
ii gnome-startup-applications 46.0-1ubuntu4.1 amd64 Startup Applications manager for GNOME
ii ubuntu-session 46.0-1ubuntu4.1 all Ubuntu session with GNOME Shell
ii unity-session 46.0-1ubuntu4.1 all Unity session, previous ubuntu default experience.
```

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Marking this SRU as verification-failed per comments
- #4 (partial failure with applications running) and
- #5 (failure even without applications running).

The partial failure would seem like a regression too,
since the bug description says that the fix / change
acts 'effectively and immediately', not conditionally
on running applications:

> gnome-session-quit should be invoked when the systemd unit shuts down,
> which acts effectively and immediately.

Please revert the tag flip if there are other reasons. Thanks!

tags: added: verification-failed-noble
removed: verification-needed-noble
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Simon,

Just following up on this bug's failed verification (per above).

Could you please clarify the next steps, when you have a chance?
(e.g., an incremental fix to noble-proposed will be uploaded,
or maybe the existing fix in noble-proposed should be removed
if that may not happen soon; or the assessment above is wrong?)

Thanks!

Jeremy Bícha (jbicha)
Changed in gnome-session (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.1 KiB)

This bug was fixed in the package gnome-session - 46.0-7ubuntu1

---------------
gnome-session (46.0-7ubuntu1) oracular; urgency=medium

  * Merge with Debian. Remaining changes:
    - debian/control:
      + Add Build-Depends: dh-sequence-migrations
      + Move xwayland dependency to gnome-session and make gnome-session
        Arch: any
      + Split gnome-startup-applications to a separate binary package so
        that it can be uninstalled without breaking the system
      + Add unity-session
    - debian/rules: Ensure pot file is generated to translate session files
    - Split ubuntu-session out of gnome-session.
    - debian/data: Add old-style systemd user session used by Unity
    - debian/gnome-session-bin.postinst, debian/gnome-session-bin.prerm:
       Moved registering gnome-session binary as a session manager to
       gnome-session-bin package
    - debian/patches/ubuntu/support_autostart_delay.patch:
      + Bugzilla patch to support adding a delay to autostart apps, using
        a "X-GNOME-Autostart-Delay" key in the desktop file
    - debian/patches/ubuntu/ubuntu_sessions.patch:
      + Add ubuntu sessions
    - debian/patches/ubuntu/remove_session_saving_from_gui.patch:
      + Add GNOME_SESSION_SAVE environment variable for people wanting to
        use the save session still, knowing that it can break your system
        if used unwisely
    - debian/patches/ubuntu/add_sessionmigration.patch:
      + launch session-migration if present at the start of the session.
        This sync tool runns different session migration scripts that can be
        provided in various desktop packages.
    - debian/patches/ubuntu/dbus_request_shutdown.patch:
      + Add "RequestShutdown" and "RequestReboot" DBus methods to allow
        other applications to shutdown or reboot the machine via the session
        manager.
    - debian/patches/ubuntu/ignore_gsettings_region.patch:
      + Ignore the "region" gsettings value - users' setting of LC_*
        variables saved in ~/.pam_environment.
    - debian/patches/revert_remove_gnome_session_properties.patch:
      + Don't merge translations into gnome-session-properties.desktop
    - debian/ubuntu-settings-migrate-to-defaults.18.10.1.py:
      + Migrate users using old default ubuntu-settings to current ones
    - debian/xdg_dirs_desktop_session.sh: Install a new script into
      /etc/profile.d to prepend a $DESKTOP_SESSION related directory to
      $XDG_{CONFIG,DATA}_DIRS.
  * Have gnome-session depend on libjxl-gdk-pixbuf
  * Split the Ubuntu on Xorg session to a separate package:
    ubuntu-session-xsession. Have ubuntu-session Recommend that package
  * Drop obsolete Breaks/Replaces
  * Drop Recommends: fonts-inter-variable

gnome-session (46.0-7) unstable; urgency=medium

  * Remove patch to revert portal change now that Debian Testing has
    xdg-desktop-portal-gnome 46

gnome-session (46.0-6) unstable; urgency=medium

  * Depend on fonts-cantarell again (Closes: #1078434)
  * Temporarily keep Recommends: fonts-inter-variable for smooth upgrades
  * Have gnome-session-xsession Provide x-session-manager

gnome-session (46.0-5) unstable; urgency=medium

  * Source-only upload

gno...

Read more...

Changed in gnome-session (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I'm resetting the bug status in oracular. This bug was closed because the oracular upload included the noble SRU but the noble SRU apparently was insufficient to fix the bug.

Changed in gnome-session (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Nickolai Leschov (nleschov) wrote :

I installed and fully updated Ubuntu 24.04.1 LTS on September, 28 and I experience this.

Is there a fix or workaround?

Revision history for this message
Chris Halse Rogers (raof) wrote : Proposed package removed from archive

The version of gnome-session in the proposed pocket of Noble that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

Changed in gnome-session (Ubuntu Noble):
status: Fix Committed → Confirmed
Revision history for this message
vladimir2k9 (vladimir2k9) wrote (last edit ):

I am on Ubuntu 24.10 oracular and have same issue
gnome-session 46.0-8ubuntu1

Revision history for this message
Unity Believer (unity-believer) wrote :

Nickolai Leschov (nleschov) wrote on 2024-10-03:

Is there a fix or workaround?

Yes. Comment out the second to last line in /lib/systemd/user/gnome-session-manager@.service:

ExecStart=/usr/libexec/gnome-session-binary --systemd-service --session=%i

becomes

#ExecStart=/usr/libexec/gnome-session-binary --systemd-service --session=%i

This appears to have worked on three separate machines, two upgrades from Jammy (already running Unity) and one clean install of Numbat (with Unity added in after install).

Note: This does nothing to fix the problem which prevents switching to a second user (using the drop down menu under the upper right on/off icon on the top menubar); the only way to switch to a different user is to log out from whatever user is active and then logon as a separate user. Also, there seems to be no support for logging into a temporary guest account when using Unity.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.