Hi,

An update on this report, five years later. It describes two distinct
problems, and they belong to two different components.

1. The session not closing when the shutdown is requested from inside the
  Cinnamon session. That part is a cinnamon-session bug, tracked in Debian
  as #987612: csm_manager_quit() calls logind PowerOff() but never quits the   session, and cinnamon-session takes no delay inhibitor of its own, so with
  a long delay inhibitor (unattended-upgrades with InstallOnShutdown and
  InhibitDelayMaxSec=1800) the session stays on screen past its RUNNING
  phase — hence the NotInRunning error you saw. It is reported upstream as
  https://github.com/linuxmint/cinnamon-session/issues/214, and a fix is
  proposed in https://github.com/linuxmint/cinnamon-session/pull/215 (still
  open): the session takes its own delay inhibitor before requesting
  PowerOff and quits when logind announces PrepareForShutdown. I tested that
  patch in a VM: the session now disappears within a couple of seconds and
  the machine powers off when the remaining inhibitors allow it.

2. What you described from the greeter: LightDM does not stop, and it is
  still possible to log in again while the shutdown is pending. That part is
  this bug, and it is confirmed in the code: lightdm has no support for it
  at all. There is no reference to logind's PrepareForShutdown signal, and
  no inhibitor, anywhere in the tree — I checked lightdm 1.33.1, which is
  what unstable currently ships, and src/login1.c only subscribes to
  SeatNew/SeatRemoved and the CanGraphical/ActiveSession properties. So
  lightdm has no way to know a shutdown is in progress, and shows the
  greeter as usual. logind itself does not refuse the new login: I verified
  in a VM that the new session starts and works normally, and the machine
  then powers off under it when the delay expires.


So this bug should stay open for the LightDM side only. It needs an
upstream change; there is no issue or pull request about it on
https://github.com/ubuntu/lightdm, so I've opened
https://github.com/ubuntu/lightdm/issues/470

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to