[systemd-bugs] [Bug 77416] systemctl poweroff/reboot does not bring down user services respectfully

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat May 24 00:36:39 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=77416

--- Comment #3 from vimregisters at gmail.com ---
(In reply to comment #2)
> The X11 libs kill processes hard if the connection is severed. THis is most
> likely what you experienced, and is out of systemd's hands. If you order
> things properly against X11 however, and make sure that X11 is terminated
> only after chrome then the X11 libs will not see the connectiosn terminated,
> and thus is the correct fix for the issue. Closing hence.

It is kind of strange though. It now mostly works,
but still sometimes fails. I spoke too soon in my
last comment.

There's lots of strangeness going on with my
setup. I'm sure I have things ordered correctly,
and things mostly work, but occasionally things
are as they were before, and there are
occassional startup problems.

I'll do a 'systemctl --user start graphical.target
+some_other_gui_stuff' and X isn't started
correctly, but the GUI stuff are running and
active according to systemctl, which makes no
sense.

But back to the original problem


I've read the systemd documentation and looked
through some unit files in /usr/lib~, so I'm pretty
confident I have the dependency stuff figured out
(enough). 

X has:
Wants=x11.target
Before=x11.target
WantedBy=graphical.target

GUI stuff (including chrome) have:
Requires=x11.target
After=x11.target

So the startup order should be:
X
x11.target
gui stuff

Then at shutdown or deactivation, the Before and
After are reversed, so the units deactivate in
this order:
gui stuff
x11.target
X

The order should be correct, so Chrome shouldn't
be killed by X since X wouldn't even think about
shutting down until Chrome is gone. Is it because
Chrome takes too long to deactivate? Because it
_does_ spend a good while writing a bunch of stuff
to disk. I'm hesitant to add any sleeps or
timeouts to fix my startup/shutdown issues. If
there are any flaws in my Before/After config,
someone please let me know.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140524/32d359a3/attachment-0001.html>


More information about the systemd-bugs mailing list