You are not logged in.

#1 2022-03-19 07:52:36

Jokarch9374
Member
Registered: 2022-03-19
Posts: 2

Slow shutdown with Kde plasma and Xorg.

Hello !
I am using Arch with KDE and Xorg - I have an nvidia gpu and amd cpu.
2 out of 5 times when I reboot, I get stuck on the black screen saying :

A stopjob is running (45sec/1min 30sec)

After some web searching I found out that is is a problem with the kwin_x11 failing to properly shutdown, as mentioned in this reddit post.
According the op I need to make a script that runs on every shutdown which kills the kwin process before it hangs, hence letting the system shutdown normally.

My question is that is this workaround a viable solution AND will this cause ANY problems in my system ??

Here is the summary:

we need a script that kills the kwin process at /usr/lib/systemd/system-shutdown.
cd /usr/lib/systemd/system-shutdown > sudo touch kill_kwin.shutdown

Put these lines in the script.
#!/bin/sh

# Kill KWin immediately to prevent stalled shutdowns/reboots
pkill -KILL kwin_x11

Make the script executable.
chmod +x kill_kwin.shutdown

Create a systemd service at /etc/systemd/system
/etc/systemd/system > sudo touch kill_kwin.service

Put these lines in the file.
[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

Then enable the service.
sudo systemctl enable kill_kwin.service

Last edited by Jokarch9374 (2022-03-19 07:54:44)

Offline

#2 2022-03-19 09:40:29

robinOP
Member
From: San Francisco, US
Registered: 2022-01-20
Posts: 12
Website

Re: Slow shutdown with Kde plasma and Xorg.

"/etc/systemd/system.conf has a line

#DefaultTimeoutStopSec=90s

which can be uncommented and changed."

Offline

#3 2022-03-19 09:45:51

robinOP
Member
From: San Francisco, US
Registered: 2022-01-20
Posts: 12
Website

Re: Slow shutdown with Kde plasma and Xorg.

I just read the comments below in the given reddit post, probably these steps are good to apply but i don't think your issue related with it, because even I don't have a KDE, I was getting this alert message on my shutdown screen. It's just disappeared after a while.

Offline

#4 2022-03-19 10:10:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: Slow shutdown with Kde plasma and Xorg.

It shouldn't inherently be necessary and it would be better to find the actual cause but there's nothing that would be able to get damaged by this, kwin_x11 as a process is fairly self contained and this won't hurt anything else.

FWIW as a another test, assuming you are using SDDM to launch your session, without this script and during a "hang" does it help and shutdown immediately if you press Ctrl+Alt+F1 ?

Last edited by V1del (2022-03-19 10:13:22)

Offline

#5 2022-03-19 13:35:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,701

Online

Board footer

Powered by FluxBB