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
Bugs, which is subscribed to Ubuntu.

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

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to