Using KDE Plasma with SDDM, if I log out, I'm able to shutdown or reboot from there just fine. However if I skip the logout and click shutdown or reboot from the K menu, there's a delay of 90 seconds as a stop job is running. kwin_x11 seems to be the culprit, or a problem with systemd. Don't know which yet. Reproducible: Always Steps to Reproduce: 1. Click Shutdown or Reboot in the Leave menu. 2. Wait. Actual Results: Have to wait an additional 90 seconds as a stop job is running. Expected Results: Should shut down or reboot quickly. http://pastebin.com/qqs7tpKv
According to the linked thread several processes seem affected and system 228 doesn't seem to expose the problem. Anyway, kwin tries to redirect SIGHUP to QApplication::exit() and if that fails ignores the event (where I'm not so sure whether that's the best resolution, but I also doubt the map fails) so the problem will likely be in QApplication::exit() Maybe it stumbles on a broken X11 connection? Can you gdb into the pending process and dump a backtrace?
actually sddm should kill everything from the session, see also: https://github.com/sddm/sddm/issues/636
That link seems about the epic "systemd broke nohup" concept. Status quo (ante) is that everything in the shell should receive a SIGHUP by the shells termination and quit in return. This somehow seems to fail. Then there'd be explicit SIGTERMs by new and objected logind behavior and only if that fails and as very last resort there should be (after a while) a SIGKILL. If we fail on the SIGHUP, we'll likely fail the SIGTERM as well (same code path via QApplication::exit()) ie. there'd not even be a change by the new logind behavior and ultimately kwin_x11 would get nuked by the SIGKILL (which is not ignorable), but SIGKILL is a failsafe resort and no way a clean way to quit a process (thus the timeouts) tl;dr - kwin should quit on SIGHUP, then forget about the rest of what I said (new loginctl is doing wrong in trying to fix broken clients. We're supposed to exit reliably on sighup. If we're broken, just fix us and do not rely on quirks of the session system)
@Harald: what's the current state on fixing the shutdown+system timeout mess?
Sorry, forgot I filed this. This isn't happening anymore.