elementary shutdown kills opened applications

Bug #1355711 reported by PerfectCarl
This bug affects 57 people
Affects Status Importance Assigned to Milestone
elementary OS

Bug Description

elementary *shuts down so hard* that the applications don't have time to gracefully exit (Firefox proposes to restore sessions when it's reopened and gnome settings are not saved - for elementary apps and others) ?

Same issue with Chrome and other apps.

Note: the reboot dialog doesn't even have time to properly animate out

tags: added: freya
tags: added: luna
Revision history for this message
Timo Reimerdes (timorei) wrote :

It gets anoying with libreoffice if you get the macro system popping up telling you about something failing during restore.

Changed in elementaryos:
status: New → Confirmed
Revision history for this message
PerfectCarl (name-is-carl) wrote :

According to preliminary investigations :
  - the issue is certainly related to gnome-session [1] and is said to be fixed in ubuntu

Looking at gnome-session changelog [2], it seems that the following reports *have nothing to do* with the issue at hand:
   - Fix a crash on session end (#709221) [3]
  - gsm-manager: Don't abort when all clients exit (#710480) [4]

[1] : https://launchpad.net/gnome-session
[2] : http://bazaar.launchpad.net/~vcs-imports/gnome-session/master/view/head:/NEWS
[3] : https://bugzilla.gnome.org/show_bug.cgi?id=709221
[4] : https://bugzilla.gnome.org/show_bug.cgi?id=710480

Revision history for this message
ProsjektX (prosjektx) wrote :

This is a very serious bug and should definitely be looked into before beta2. This can cause users data-loss and other issues. If users have unsaved files open they will we force close and any changes lost.

This bug does not only apply when using shutdown from the menu, but also e.g. reboot, and also if using the commandline shutdown.

Doesn't everybody see this issue..?!

Revision history for this message
Darrell Swafford (darelster) wrote :

Also annoying in Chrome.

Revision history for this message
PerfectCarl (name-is-carl) wrote :

I tried to build gnome-session from trunk

bzr branch lp:gnome-session
sudo apt-get install libgnome-desktop-3-dev

and it failed with :

Requested 'gnome-desktop-3.0 >= 3.9.91' but version of gnome-desktop-3.0 is 3.8.4

Cody Garver (codygarver)
Changed in elementaryos:
milestone: none → freya-rc1
importance: Undecided → High
Revision history for this message
PerfectCarl (name-is-carl) wrote :

After some digging it seems that gnome-session that we ship is the same as the one that is shipped with trusty and vivid.
Same base version, same debian patches.

I'm starting to think that this may not be the cause of the issue.
It occurred to me that we might want to write a simple cli app that would log the signal it receives when the session is closed.
If things are going well, it should receive SIGTERM signal and close itself.

If the cli app receives the SIGKILL signal then something is going wrong.

That experience could be redone with a gtk app.

Tom pointed out that it may be related to a systemd service.
After all
On freya, ps -aux | grep systemd returns :

root 349 0.0 0.0 51728 1976 ? Ss 09:47 0:00 /lib/systemd/systemd-udevd --daemon
root 863 0.0 0.0 43452 1852 ? Ss 09:47 0:00 /lib/systemd/systemd-logind
cran 13392 0.0 0.0 14284 932 pts/7 S+ 15:59 0:00 grep --color=auto systemd

Revision history for this message
Nolan Shah (nolanshah212) wrote :

Tom is right, gnome-session does uses systemd-logon's poweroff.

If you want to see the chain of events in gnome-session:
1. http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/gnome-session/utopic/view/head:/gnome-session/gsm-systemd.c at line 446
2. http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/systemd/utopic/view/head:/src/login/logind-dbus.c at line 2132

Revision history for this message
PerfectCarl (name-is-carl) wrote :

Just taking some notes about login here

apt-cache policy libsystemd-login0 returns

  Installed: 204-5ubuntu20.9
  Candidate: 204-5ubuntu20.9
  Version table:
 *** 204-5ubuntu20.9 0
        500 http://fr.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     204-5ubuntu20 0
        500 http://fr.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Sources for it are here: https://launchpad.net/ubuntu/+source/systemd/204-5ubuntu20.9

Note: source for vivid is located here:

Revision history for this message
PerfectCarl (name-is-carl) wrote :
Revision history for this message
PerfectCarl (name-is-carl) wrote :

The list of patches that landed in vivid version is long.

Here are for reference the ones with logind in the title:


Revision history for this message
PerfectCarl (name-is-carl) wrote :
Changed in elementaryos:
milestone: freya-rc1 → loki-beta1
ProsjektX (prosjektx)
summary: - elementary shutdown kills opened applications
+ elementary shutdown kills opened applications [$15]
Changed in elementaryos:
milestone: loki-beta1 → none
Revision history for this message
Maxim Taranov (png2378) wrote : Re: elementary shutdown kills opened applications [$30]
summary: - elementary shutdown kills opened applications [$15]
+ elementary shutdown kills opened applications [$30]
tags: added: bounty
Revision history for this message
Ciaran McAleer (ciaran39) wrote :

I removed the $30 you can re add it if you want but I think your problem is solved

summary: - elementary shutdown kills opened applications [$30]
+ elementary shutdown kills opened applications
Revision history for this message
Cameron (cameronp) wrote :

I'm still getting this in loki... was it supposedly fixed?

tags: added: loki
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.