I have been able to reproduce those missing signals most reliably within
a systemd user session (for the system session it works most of the

Steps to reproduce missing dbus signals with Ubuntu 16.10 Desktop:

Create a ~/.config/systemd/user/terminal.service with this content:

Description=example unit to open a terminal

SuccessExitStatus=0 15


Open two terminals. In the first one execute the attached
test_systemd_signals.py (which looks for PropertiesChanged Signals):

$ python test_systemd_signals.py

To see all dbus messages during the test you can run "dbus-monitor
--session" in another terminal.

In a second terminal start/stop the systemd unit:
$ systemctl --user daemon-reload
$ systemctl --user start terminal.service
$ systemctl --user stop terminal.service

With the current systemd package 231-9git1 the test script only shows two 
status changes (PropertiesChanged signals) sent by systemd:
ActiveState: active SubState: running
ActiveState: deactivating SubState: stop-sigterm

With the patched systemd package the test script should show the last change of 
the unit status (being set to inactive), too:
ActiveState: active SubState: running
ActiveState: deactivating SubState: stop-sigterm
ActiveState: inactive SubState: dead

Ubuntu 16.04 Desktop does not start a systemd user session by default - I 
created a package (based on https://github.com/joukewitteveen/xlogin) to 
simplify the process:
$ sudo add-apt-repository ppa:seahawk1986-hotmail/xlogin
$ sudo apt-get update
$ sudo apt-get install xlogin openbox

Create a ~/.xinitrc with this content (and make it executable):

exec openbox-session

Then change to a tty console (or use a remote login via ssh):
$ sudo systemctl stop lightdm
$ sudo systemctl start xlogin@user # replace "user" with an existing user name

Now you can open two terminals (a right click on the desktop opens the
openbox menu) and follow the steps for Ubuntu 16.10 above.

** Attachment added: "test_systemd_signals.py"

You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.

  Regression: systemd does not send all queued DBus Signals when a unit
  gets inactive

Status in systemd package in Ubuntu:
  In Progress
Status in systemd source package in Xenial:
Status in systemd source package in Yakkety:
  In Progress
Status in systemd source package in z-series:
  Fix Committed

Bug description:
  Since the penultimate systemd package update in september
  (229-4ubuntu8) systemd does not send the remaining queued DBus signals
  (e.g. PropertiesChanged) when a unit's state changes to inactive.

  Sending those signals has been working since the release of Ubuntu
  16.04 and it is quite unfortunate for my use case this got broken
  while fixing another bug.

  Adding this upstream change to the package restores the old
  functionality (a patch for the current systemd package (systemd
  229-4ubuntu10) for xenial is attached):

  $ lsb_release -rd
  Description:    Ubuntu 16.04.1 LTS
  Release:        16.04
  package version: systemd 229-4ubuntu10

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to