update 2015 05 16
It seems that, dbus-deamon has received a poweroff meesage then it fork the
systemd-shim to shutdown the system, here's the backtrace for systemd-shim . we
can see that ,dbus-daemon --system --fork leverage systemd-shim to perform the
poweroff.
however, who sends the poweroff
from
suspend-to-memory. Here's my script:
# cat /sbin/shutdown
#!/bin/sh
pstree -a /home/chenyu/shutdown_trace.log
and here's the backtrace when system is executing my 'shutdown', after
resumming, we can see that, systemd-shim invokes 'sh -c /sbin/poweroff':
init
|-ModemManager
| `-2
** Description changed:
Environment:
Ubuntu18.04 (fresh install)
lightdm
gnome-flashback
domain user with PBIS joined domain
root@ubuntu1804-2:/var/log/lightdm# lsb_release -rd
Description:Ubuntu 18.04 LTS
Release:18.04
root@ubuntu1804-2:/var/log/lightdm# dpkg
Public bug reported:
Environment:
Ubuntu18.04 (fresh install)
lightdm
gnome-flashback
domain user with PBIS joined domain
root@ubuntu1804-2:/var/log/lightdm# lsb_release -rd
Description:Ubuntu 18.04 LTS
Release:18.04
root@ubuntu1804-2:/var/log/lightdm# dpkg -s lightdm
Package:
Public bug reported:
Affected version
ubuntu1804.4/20.04
Bug summary
Click Lock menu (especially click lock button very soon after login), the
screen is locked as expected. But in this case, there is no
org.gnome.ScreenSaver related dbus generated, and less way to report screen is
locked.