When I shutdown my system, about half of the time I get the “A stop job is running” message. Looking though the logs it seems the process that’s refusing to exit cleanly is kwin_x11 and systemd is having to SIGKILL it. I already reduced the kill time setting in systemd so it’s not that big of a bother, but it seems odd that kwin is what’s holding things up. Is it possible it some user process that a child of the kwin process? Looking at htop, it doesn’t look like kwin has any children so I don’t think it’s that.
That has happened to me at almost every shutdown/reboot a few months ago, and I couldn’t figure out either what caused this exact behavior. As a workaround, I made a systemd service that sends a SIGKILL to kwin_x11 immediately at shutdown, It works for me every time I turn off my computer, so you should try doing the instructions below. All steps require sudo for obvious reasons.
Create a script named
/usr/lib/systemd/system-shutdownwith an editor of your choice:
#!/bin/sh # Kill KWin immediately to prevent stalled shutdowns/reboots pkill -KILL kwin_x11
Note that I don’t use
killallhere unlike most users here because it never works for me even when I type the full name of any process.
Make the script executable, i.e.
chmod +x kill_kwin.shutdown.
Create a service file in
/etc/systemd/system(I use the name
kill_kwin.service, but you can name it whatever you want any as long as it ends with
[Unit] Description=Kill KWin at shutdown/reboot [Service] Type=oneshot ExecStart=/bin/true ExecStop=/bin/sh /usr/lib/systemd/system-shutdown/kill_kwin.shutdown RemainAfterExit=true [Install] WantedBy=multi-user.target
As you can see here, while the service does run at startup, it actually waits for the next shutdown or reboot to do the actual work. That’s why the script is specified in the
Activate the systemd service with
systemctl enable --now kill_kwin.service. The script will run at the next and consecutive shutdown or reboot.
I hope that this helps, and welcome to the official Manjaro Forum!
Thank you for your workaround.