Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow shutdown problems in kde plasma with sddm #1476

Closed
ghost opened this issue Nov 23, 2021 · 49 comments · Fixed by hyprwm/hyprland-wiki#307
Closed

Slow shutdown problems in kde plasma with sddm #1476

ghost opened this issue Nov 23, 2021 · 49 comments · Fixed by hyprwm/hyprland-wiki#307

Comments

@ghost
Copy link

ghost commented Nov 23, 2021

Whenever I try to shutdown my pc I get a message like -
"Starting version 249.5-3-arch
/dev/sda3: clean, 458192/30228480 files, 32189479/120907009 blocks "
and it basically takes my pc 2 minutes to shutdown.
People already made a lot of bug request regarding this -
https://bugs.kde.org/show_bug.cgi?id=445449
https://bbs.archlinux.org/viewtopic.php?pid=2002140#p2002140
https://bugs.kde.org/show_bug.cgi?id=445385

Any clue ?

@aleixpol
Copy link
Contributor

There's measures in #1460 that should mitigate this issue.

Also in Plasma Workspace we added f377696bff39e35ae0f7ae6104d8732b3856744e exactly for that.

Could you try enabling systemd boot for Plasma and see if it addresses the problem for you?
https://invent.kde.org/plasma/plasma-workspace/-/wikis/Plasma-and-the-systemd-boot

@ghost
Copy link
Author

ghost commented Nov 23, 2021

There's measures in #1460 that should mitigate this issue.

Oh thats nice

Also in Plasma Workspace we added f377696bff39e35ae0f7ae6104d8732b3856744e exactly for that.

Could you try enabling systemd boot for Plasma and see if it addresses the problem for you? https://invent.kde.org/plasma/plasma-workspace/-/wikis/Plasma-and-the-systemd-boot

Can u tell me how to enable systemd boot? I am a noob when it comes to linux. 😅

@aleixpol
Copy link
Contributor

I wouldn't want to be responsible for your system, let me comment in the bug reports you mentioned.

@ghost
Copy link
Author

ghost commented Nov 25, 2021

I wouldn't want to be responsible for your system, let me comment in the bug reports you mentioned.

Today I faced the slow shutdown problem again and this is my shutdown log (journalctl) can u see what went wrong ?
Here is the log -
http://ix.io/3G3o

@ghost
Copy link
Author

ghost commented Nov 25, 2021

This lines seems sus ngl -
`Nov 25 13:29:08 rounak systemd[1]: sddm.service: Consumed 15.785s CPU time.

Nov 25 13:30:37 rounak systemd[1]: session-2.scope: Stopping timed out. Killing.

Nov 25 13:30:37 rounak systemd[1]: session-2.scope: Killing process 557 (kwin_x11) with signal SIGKILL.

Nov 25 13:30:37 rounak systemd[1]: session-2.scope: Killing process 1055 (QSGRenderThread) with signal SIGKILL.

Nov 25 13:30:37 rounak systemd[1]: session-2.scope: Failed with result 'timeout'.`

@ghost
Copy link
Author

ghost commented Nov 25, 2021

People having the same issue here I think it is a sddm issue or a kwin issue - https://bbs.archlinux.org/viewtopic.php?id=259577

@aleixpol
Copy link
Contributor

https://bugs.kde.org/show_bug.cgi?id=445449 < same bug in KDE

@zzag
Copy link

zzag commented Jan 18, 2022

FTR, I can reproduce this issue with x11 greeter but not wayland greeter. https://bugs.kde.org/show_bug.cgi?id=445449#c23

With X11 greeter, Xorg terminates and SDDM decides to restart it, at which point the shutdown hangs.

@Pyrrhusn
Copy link

Just started having the same issue today, because I switched to Wayland. Screen turns black and backlight doesn't when initiating shutdown/reboot, only after a couple of minutes it completely does. Doesn't happen on X11 session, shutdown/reboot is quick.

@p4vook
Copy link

p4vook commented Feb 10, 2022

Having the same issue on Gentoo https://bugs.gentoo.org/833059

@k1gen
Copy link

k1gen commented Mar 13, 2022

Started having exact same issue yesterday on Arch with KDE Plasma on Wayland

@RokeJulianLockhart
Copy link

This appears to have been remediated for Fedora Rawhide.

@ghost
Copy link

ghost commented Mar 14, 2022

Having the same issue on Debian Sid.

@GithubUser5462
Copy link

FTR, I can reproduce this issue with x11 greeter but not wayland greeter. https://bugs.kde.org/show_bug.cgi?id=445449#c23

With X11 greeter, Xorg terminates and SDDM decides to restart it, at which point the shutdown hangs.

sudo pacman -Syu --needed weston

sudo nano /etc/sddm.conf

[General]
DisplayServer=wayland

[Wayland]
CompositorCommand=weston --shell=fullscreen-shell.so
EnableHiDPI=true

This fixed the issue for me, thanks.

@RokeJulianLockhart
Copy link

"Arch Linux" should probably be redacted from the title, because this affects Fedora.

@XEmpty
Copy link

XEmpty commented Mar 25, 2022

FTR, I can reproduce this issue with x11 greeter but not wayland greeter. https://bugs.kde.org/show_bug.cgi?id=445449#c23
With X11 greeter, Xorg terminates and SDDM decides to restart it, at which point the shutdown hangs.

sudo pacman -Syu --needed weston

sudo nano /etc/sddm.conf

[General]
DisplayServer=wayland

[Wayland]
CompositorCommand=weston --shell=fullscreen-shell.so
EnableHiDPI=true

This fixed the issue for me, thanks.

doesn't work on Wayland session. Problem is on Kwin + Wayland.

@Logical-sh
Copy link

I can also confirm, using kwin and wayland, I tried with and without the configuration change and either way it times out, but logging out first makes reboot within like a second.

@tyrumus
Copy link

tyrumus commented Mar 28, 2022

Having the same problem with my Wayland sessions with Sway. SDDM fails to properly stop when I trigger a shutdown while a Wayland session is running, but if I log out and return to SDDM's login screen, then shutdown/reboot works without error.

I enabled systemd debugging as described here and saw this in the log when I triggered a reboot (systemctl reboot) from inside of a Sway session:

[  606.871766] audit: type=1131 audit(1646776510.270:153): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sddm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Just trying to say this issue is not specific to KDE.

@bimmlerd
Copy link

bimmlerd commented Apr 6, 2022

Also affected by this. Have noticed that switching ttys while sddm is blocking the shutdown process is a workaround. Specifically, I hit Ctrl+Alt+F3 and then Ctrl+Alt+F2, which causes the sddm job to stop successfully.

@RubenKelevra

This comment was marked as resolved.

@KeanuGh
Copy link

KeanuGh commented Apr 7, 2022

I have noticed another workaround is to log out of your kde session before shutting down. There is never a hang when logging out first.

@cyb3rd4d
Copy link

cyb3rd4d commented Apr 15, 2022

I tried to install SDDM from the develop branch and I don't reproduce the bug anymore since then.
If you use Archlinux or a derived distro, you can intall the package sddm-git from the AUR.

@ghost ghost changed the title Slow shutdown problems in arch linux with sddm Slow shutdown problems in kde plasma with sddm May 1, 2022
@ghost
Copy link
Author

ghost commented May 17, 2022

Ok so it is not due to sddm I tried plasma with different login manager like light dm and everytime plasma hangs when shutting down. So I think it is a problem with kwin. I made a new bug report in bugs.kde.org - https://bugs.kde.org/show_bug.cgi?id=453928

@GithubUser5462
Copy link

GithubUser5462 commented May 17, 2022

Well, a kwin developer posted a pull request to fix the issue here #1515 so i think that they already know what is going on.

Hopefully they can find some time to update it and fix the issue.

@ghost
Copy link
Author

ghost commented May 17, 2022

Well, a kwin developer posted a pull request to fix the issue here #1515 so i think that they already know what is going on.

Hopefully they can find some time to update it and fix the issue.

That pull request is open since february. I mean no response. I already asked people in arch forums and they think that there is something wrong with kwin -
https://bbs.archlinux.org/viewtopic.php?id=271102 ( my post )
https://bbs.archlinux.org/viewtopic.php?id=269310
https://bbs.archlinux.org/viewtopic.php?id=269549
https://bbs.archlinux.org/viewtopic.php?id=270759
https://bbs.archlinux.org/viewtopic.php?id=254577

Bruh.

Look at my logs I am using lightdm but still I am facing the same issue - http://0x0.st/oaiV.txt

I think I will use xinitrc (startx script) .

@ghost
Copy link
Author

ghost commented May 18, 2022

https://bugs.kde.org/show_bug.cgi?id=427373 - Another one

EDIT - Here is the detailed screenshot of the bug I am experiencing - https://imgur.com/a/BWnCXhh
Are you guys having the same problem ?

@Kangie
Copy link
Contributor

Kangie commented Jun 11, 2022

OK, to clarify this once and for all:

In SDDM 0.18.1 (and presumably 0.19.0) there is a shutdown delay (of 30s or whatever your systemd is set to wait to send a SIGKILL). I can replicate this on Gentoo repeatedly with package version 0.18.1 on my system.

If I build the code from 'develop' there is no shutdown delay. I haven't bisected to see where the fix is, but it will be resolved for 0.20.0.

@BBaoVanC
Copy link

OK, to clarify this once and for all:

In SDDM 0.18.1 (and presumably 0.19.0) there is a shutdown delay (of 30s or whatever your systemd is set to wait to send a SIGKILL). I can replicate this on Gentoo repeatedly with package version 0.18.1 on my system.

If I build the code from 'develop' there is no shutdown delay. I haven't bisected to see where the fix is, but it will be resolved for 0.20.0.

Nice, I was using version 0.19.0 from the Arch Linux repos, and the problem is fixed for me after installing sddm-git

@FormBurden
Copy link

I can also confirm that sddm-git (AUR package) fixes the issue. Hopefully the 0.20 will be pushed out for everyone else soon.

@RubenKelevra
Copy link

I'm also affected. I'm using systemd-boot on Arch Linux with 5.17.1 kernel.

Kwin version: 5.24.4 sddm version: 0.19.0 plasma version: 5.24.4

I do start Wayland sessions with sddm.

Here's my log from the shutdown until the system stopped logging:

I have pressed CTRL+ALT+DEL to speed up the kill process to two seconds. Otherwise, I need to wait for 2 minutes or so until the system shuts down.

Fixed for me. Not exactly sure which component/version update fixed it but it doesn't happen anymore.

@ghost
Copy link
Author

ghost commented Jun 15, 2022

I'm also affected. I'm using systemd-boot on Arch Linux with 5.17.1 kernel.
Kwin version: 5.24.4 sddm version: 0.19.0 plasma version: 5.24.4
I do start Wayland sessions with sddm.
Here's my log from the shutdown until the system stopped logging:
I have pressed CTRL+ALT+DEL to speed up the kill process to two seconds. Otherwise, I need to wait for 2 minutes or so until the system shuts down.

Fixed for me. Not exactly sure which component/version update fixed it but it doesn't happen anymore.

How ? I am getting this message when I am shutting down my pc -https://imgur.com/a/v2k3PnD , https://imgur.com/V0l2RAb

It is still taking 2 minutes for it to shut down.

@BBaoVanC
Copy link

I'm also affected. I'm using systemd-boot on Arch Linux with 5.17.1 kernel.
Kwin version: 5.24.4 sddm version: 0.19.0 plasma version: 5.24.4
I do start Wayland sessions with sddm.
Here's my log from the shutdown until the system stopped logging:
I have pressed CTRL+ALT+DEL to speed up the kill process to two seconds. Otherwise, I need to wait for 2 minutes or so until the system shuts down.

Fixed for me. Not exactly sure which component/version update fixed it but it doesn't happen anymore.

How ? I am getting this message when I am shutting down my pc -https://imgur.com/a/v2k3PnD , https://imgur.com/V0l2RAb

It is still taking 2 minutes for it to shut down.

Try installing the latest git version of sddm, it worked for me. Which Linux distro?

@ghost
Copy link
Author

ghost commented Jun 15, 2022

I'm also affected. I'm using systemd-boot on Arch Linux with 5.17.1 kernel.
Kwin version: 5.24.4 sddm version: 0.19.0 plasma version: 5.24.4
I do start Wayland sessions with sddm.
Here's my log from the shutdown until the system stopped logging:
I have pressed CTRL+ALT+DEL to speed up the kill process to two seconds. Otherwise, I need to wait for 2 minutes or so until the system shuts down.

Fixed for me. Not exactly sure which component/version update fixed it but it doesn't happen anymore.

How ? I am getting this message when I am shutting down my pc -https://imgur.com/a/v2k3PnD , https://imgur.com/V0l2RAb
It is still taking 2 minutes for it to shut down.

Try installing the latest git version of sddm, it worked for me. Which Linux distro?

Arch btw

@cyb3rd4d
Copy link

#1476 (comment)

@ghost
Copy link
Author

ghost commented Jun 15, 2022

#1476 (comment)

still having the same problem. I am using NVIDIA drivers and Installed the sddm-git version through AUR.
https://imgur.com/a/kWYNOwP

Thanks for the help btw. I am closing this issue for now because this is not what I really meant. I know it is a kwin bug.

I have already moved to i3 window managers and after using linux for like 4 years I understood the more bloat you add to a de, more bugs you will face. I tried gnome, xfce and faced no bugs but kde is just horrible. I don't know maybe I should blame nvidia and not linux.

@ghost ghost closed this as completed Jun 15, 2022
@Alfredo-Vargas
Copy link

I have a vanilla Arch install with KDE plasma and had the same issue with both Xorg and Wayland. However, reading some sddm related issues on kdde arch wiki gave a hint that it is better to use a rootless sddm install. I used paru to install sddm-git and substitute the previous sddm install. Then I had no longer issues like mentioned here #1476 (comment)

@ghost
Copy link
Author

ghost commented Jun 22, 2022

I have a vanilla Arch install with KDE plasma and had the same issue with both Xorg and Wayland. However, reading some sddm related issues on kdde arch wiki gave a hint that it is better to use a rootless sddm install. I used paru to install sddm-git and substitute the previous sddm install. Then I had no longer issues like mentioned here #1476 (comment)

Are u using nvidia? I am using nvidia

@cyb3rd4d
Copy link

AMD for me.

@ghost
Copy link
Author

ghost commented Jun 22, 2022

AMD for me.

AMD and Intel are great for Linux but I use nvidia. Fuck you nvidia

@Luc45
Copy link

Luc45 commented Oct 14, 2022

I had this issue a while back, I lowered the timeouts and it worked for a while, but after recent updates the issue came back. It seems that after recent updates, systemd configs overrides should be set under "user" rather than "system", for example:

$ cat /etc/systemd/user.conf.d/99-stop-fast.conf

[Manager]
DefaultTimeoutStopSec=5s

To find out what's hanging during your shutdown, run journalctl -b -1, press Page Down to go to the last line, then go up watching the event times on the right, until you see an event that has a big time difference between one another. In my case plasma-kded.service was hanging for almost 90s.

Source of the solution: https://bugs.kde.org/show_bug.cgi?id=456713

@arcolinuxz
Copy link

arcolinuxz commented Dec 18, 2022

I can confirm for ArchLinux/ArcoLinux that sddm-git is working for us and does NOT have a slow shutdown with Hyprland
sddm-git 0.19.0.170.g3e48649-1 (Sun Dec 18 08:26:14 2022)

Alternative solutions:

  • Pressing CTRL ALT F1
  • Logout to sddm and then reboot or shutdown

@maxbernyk
Copy link

maxbernyk commented Dec 25, 2022

+1
archlinux
ctrl+alt+f1 somehow releases the break.
but ctrl+alt+f3 is showing the same message ("Running stopping job...") from the shutdown process.
logging out from kde session before shutting down/restarting also helps.

One more solution:
Switch from Wayland to X11.
I'm sure there are settings/configs for that, but also can be done on the login screen. I had to choose another login screen (Elrarun) in the KDE settings, because of the one I was using (Breeze) did not have that choice. After changing to X11 once, it becomes default and it's ok to switch back to any other login screen.

@raffaem
Copy link

raffaem commented Jan 2, 2023

I can confirm for ArchLinux/ArcoLinux that sddm-git is working for us and does NOT have a slow shutdown with Hyprland sddm-git 0.19.0.170.g3e48649-1 (Sun Dec 18 08:26:14 2022)

Alternative solutions:

* Pressing CTRL ALT F1

* Logout to sddm and then reboot or shutdown

I too uses Hyprland and installing sddm-git from the AUR fixes it.

Although it's unclear which commits fixed it.

Probably this?

@soaresrodrigo
Copy link

sddm-git is working for me too. Thanks!

@Firestar-Reimu
Copy link

Has this been fixed in sddm 0.20?

@Pointedstick
Copy link
Collaborator

Yes.

fufexan pushed a commit to hyprwm/hyprland-wiki that referenced this issue Aug 19, 2023
SDDM >= 0.20.0 has fixed sddm/sddm#1476 and
it's no longer necessary to install the lastest development version.
fufexan pushed a commit to hyprwm/hyprland-wiki that referenced this issue Dec 12, 2023
SDDM >= 0.20.0 has fixed sddm/sddm#1476 and
it's no longer necessary to install the lastest development version.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet