You are not logged in.

#1 2020-08-15 09:01:17

dani.sands
Member
Registered: 2020-08-15
Posts: 25

System takes a lot of time to shutdown. (Help with debug)

Hi! This is my first post after reading the rules and searching the forums for similar problems.

I installed arch about 1 month ago and it works well, except a couple of days ago I started having problems regarding shutdown.
My system sometimes takes like a solid 2 min to shutdown and I do not know why.
I searched for similar problems and i found the way to debug it (https://wiki.freedesktop.org/www/Softwa … Debugging/) in another post of the forums but their problem didn't have to do anything with mine as It was long ago and about LVM (I am not using it).
I have the file output but It is going way over my head, I don't know how to even start to look for timeouts. I'm sure the problem is there but I cant find it.
If someone could help me It will be awesome.

The output is: Old link

Thanks!!

Last edited by dani.sands (2020-08-19 08:02:23)

Offline

#2 2020-08-15 15:01:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: System takes a lot of time to shutdown. (Help with debug)

Welcome to the forums. 

Does this happen every time?  If so, please boot your system, then shut it down;  restart and post the output of journalctl -b-1 --no-pager
Are you booting to the console? or are you booting to a Display Manager (sddm, gdm) ?
What Desktop Environment/Window Manger do you use (sway, KDE, Gnome, i3)?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2020-08-15 15:44:41

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

--Does this happen every time?
Seems like sometimes takes more time than others. This time looks like only took like 10 seconds but for a shutdown from a just booted system I think is still too much time, other times tooks like 4 times longer.

--output of journalctl -b-1 --no-pager
I'm booting at my KDE login screen as normal. I'm using KDE with sddm and nvidia propietary drivers.

Last edited by dani.sands (2020-08-19 08:02:44)

Offline

#4 2020-08-15 16:07:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: System takes a lot of time to shutdown. (Help with debug)

That log only shows about half a minute between start up and shutdown.

That is some pretty agressive logging yikes  I'd go back to normal levels, and the next time a shutdown hangs for 90 or 120 seconds, see if there is a countdown displayed on screen telling you what it is waiting for.  Anyway, after you see a shutdown delay, reboot and run that journalctl command again and lets take a look.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2020-08-15 16:21:43

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

Sorry for the agressive logging!

I can not wait to fix this problem...

Tbh I dont think I saw like 120 seconds of delay.

--if there is a countdown displayed on screen telling you what it is waiting for
The thing is, that the delay happens in KDE. Let me explain : I press the shut down button (the one that pops up in full screen with all the options to reboot, hibernate... ) in KDE and for it to star shutting down, takes a lot. Once KDE "closes" the shutdown is pretty fast.
At the moment I didn't see any "waiting for x process to finish [ *** ]". I fact in KDE sometimes takes so long to shutdown/close that i can open Firefox and go to any web and then it shutdowns.

After posting this comment let me see if it takes long and I will take another log.

Thanks!

Offline

#6 2020-08-15 16:26:58

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

New behavior!
KDE closed relatively fast and the pc waited on a blinking cursor for a long time.
Here is the log:

I was using the PC to watch some videos if that helps.

Last edited by dani.sands (2020-08-19 08:02:58)

Offline

#7 2020-08-15 16:27:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: System takes a lot of time to shutdown. (Help with debug)

Okay, so we are not really talking about a kernel shutdown problem as much as waiting for the Desktop Environment to exit.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#8 2020-08-15 16:35:50

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

Well 50/50 that last log is from the last time when the DE "closed" (i don't know if that is the proper term) and i just waited on a blinking cursor as shown here: https://imgur.com/a/tHa0E8Q for a couple of mins.

Other times it was the other way around so there is something odd with the shutdown process somewhere.

Offline

#9 2020-08-15 23:28:15

cupid_stunt
Member
Registered: 2020-08-15
Posts: 21

Re: System takes a lot of time to shutdown. (Help with debug)

What's the behavior if you use the command

shutdown -h now

?

Offline

#10 2020-08-15 23:34:39

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

cupid_stunt wrote:

What's the behavior if you use the command

shutdown -h now

?

It gives me a proper and super quick shutdown.

Last edited by dani.sands (2020-08-15 23:35:23)

Offline

#11 2020-08-16 00:10:31

cupid_stunt
Member
Registered: 2020-08-15
Posts: 21

Re: System takes a lot of time to shutdown. (Help with debug)

dani.sands wrote:
cupid_stunt wrote:

What's the behavior if you use the command

shutdown -h now

?

It gives me a proper and super quick shutdown.

Then it most likely is a KDE issue.

Offline

#12 2020-08-16 09:03:47

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

cupid_stunt wrote:
dani.sands wrote:
cupid_stunt wrote:

What's the behavior if you use the command

shutdown -h now

?

It gives me a proper and super quick shutdown.

Then it most likely is a KDE issue.

And how can I fix it?

Offline

#13 2020-08-16 13:35:59

cupid_stunt
Member
Registered: 2020-08-15
Posts: 21

Re: System takes a lot of time to shutdown. (Help with debug)

You could start to search for KDE logs, shutdown logs in particular (if they are separate).
There must be some widget/daemon/service gizmo that ignores KDE's signals to pack it up and go home, or takes too long to do so, because "quality code".
Search for suspicious keywords like "forcing", "waiting", "timeout".
You could also post it here.

Offline

#14 2020-08-16 13:48:13

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

cupid_stunt wrote:

You could start to search for KDE logs, shutdown logs in particular (if they are separate).
There must be some widget/daemon/service gizmo that ignores KDE's signals to pack it up and go home, or takes too long to do so, because "quality code".
Search for suspicious keywords like "forcing", "waiting", "timeout".
You could also post it here.

Any special way to get those logs?

Offline

#15 2020-08-16 14:15:47

cupid_stunt
Member
Registered: 2020-08-15
Posts: 21

Re: System takes a lot of time to shutdown. (Help with debug)

It's a long shot, but take a look at the thread in the link below. If you have the file, save it somewhere first before attempting what's  suggested there.
https://forum.kde.org/viewtopic.php?f=67&t=120706


Also, this was found after a quick search:
https://www.google.com/search?client=fi … tdown+logs

Offline

#16 2020-08-16 14:26:06

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

cupid_stunt wrote:

It's a long shot, but take a look at the thread in the link below. If you have the file, save it somewhere first before attempting what's  suggested there.
https://forum.kde.org/viewtopic.php?f=67&t=120706


Also, this was found after a quick search:
https://www.google.com/search?client=fi … tdown+logs

For some reason I don't even have a .kde folder on my home directory I only have a .kde4 (?)
I searched google and all that I could find was taking logs with journalctl -f | grep --line-buffered kde

Also my problem is not that I can not shutdown like in the url, is that it takes a lot to do it.

Offline

#17 2020-08-17 08:06:50

Dante777
Member
Registered: 2016-07-12
Posts: 38
Website

Re: System takes a lot of time to shutdown. (Help with debug)

dani.sands wrote:
cupid_stunt wrote:

It's a long shot, but take a look at the thread in the link below. If you have the file, save it somewhere first before attempting what's  suggested there.
https://forum.kde.org/viewtopic.php?f=67&t=120706


Also, this was found after a quick search:
https://www.google.com/search?client=fi … tdown+logs

For some reason I don't even have a .kde folder on my home directory I only have a .kde4 (?)
I searched google and all that I could find was taking logs with journalctl -f | grep --line-buffered kde

Also my problem is not that I can not shutdown like in the url, is that it takes a lot to do it.

Maybe your system needs more entropy.
You could install "rng-tools", activate it with "sudo systemctl enable rngd", reboot and see how it goes.
Plasma needs extra entropy.

Offline

#18 2020-08-18 00:06:23

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

Dante777 wrote:
dani.sands wrote:
cupid_stunt wrote:

It's a long shot, but take a look at the thread in the link below. If you have the file, save it somewhere first before attempting what's  suggested there.
https://forum.kde.org/viewtopic.php?f=67&t=120706


Also, this was found after a quick search:
https://www.google.com/search?client=fi … tdown+logs

For some reason I don't even have a .kde folder on my home directory I only have a .kde4 (?)
I searched google and all that I could find was taking logs with journalctl -f | grep --line-buffered kde

Also my problem is not that I can not shutdown like in the url, is that it takes a lot to do it.

Maybe your system needs more entropy.
You could install "rng-tools", activate it with "sudo systemctl enable rngd", reboot and see how it goes.
Plasma needs extra entropy.

I just did that and it seems like is the same as before, but I have to test it a bit more.

Offline

#19 2020-08-18 09:45:26

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

Dante777 wrote:
dani.sands wrote:
cupid_stunt wrote:

It's a long shot, but take a look at the thread in the link below. If you have the file, save it somewhere first before attempting what's  suggested there.
https://forum.kde.org/viewtopic.php?f=67&t=120706


Also, this was found after a quick search:
https://www.google.com/search?client=fi … tdown+logs

For some reason I don't even have a .kde folder on my home directory I only have a .kde4 (?)
I searched google and all that I could find was taking logs with journalctl -f | grep --line-buffered kde

Also my problem is not that I can not shutdown like in the url, is that it takes a lot to do it.

Maybe your system needs more entropy.
You could install "rng-tools", activate it with "sudo systemctl enable rngd", reboot and see how it goes.
Plasma needs extra entropy.

I tested a bit more and that didn't make any difference. sad

Offline

#20 2020-08-18 14:00:11

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: System takes a lot of time to shutdown. (Help with debug)

Have you tried creating a new user and see if it has the same effects? If it does, then your problem is global configuration in KDE, if not then it's some user setting.
This just cuts in half your hunt for the problem.
@Dante777 I'm not sure if entropy is needed for plasma shutdown but I might be wrong. It is of course needed for booting.

Offline

#21 2020-08-18 14:30:19

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

d_fajardo wrote:

Have you tried creating a new user and see if it has the same effects? If it does, then your problem is global configuration in KDE, if not then it's some user setting.
This just cuts in half your hunt for the problem.
@Dante777 I'm not sure if entropy is needed for plasma shutdown but I might be wrong. It is of course needed for booting.

Well I just tried it and seems like is like you said a problem with the user. I created a new one and it shutdown almost instantly, even with a couple of apps open.
Now, what I can do to hunt down the problem? I'm not sure that kde has a lot of debug options. Also I don't remember touching nothing critical.

Offline

#22 2020-08-18 17:56:52

cupid_stunt
Member
Registered: 2020-08-15
Posts: 21

Re: System takes a lot of time to shutdown. (Help with debug)

I am 99% sure the problem can be found in the home folder since it's the only thing that varies between users.
You can start by doing a comparison of the settings file in your home vs. the ones in the new user's home. You could use Meld and do a folder comparison between the two home-s. Don't forget to include the .dot files (hidden files).

Last edited by cupid_stunt (2020-08-18 17:57:56)

Offline

#23 2020-08-18 18:04:43

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

cupid_stunt wrote:

I am 99% sure the problem can be found in the home folder since it's the only thing that varies between users.
You can start by doing a comparison of the settings file in your home vs. the ones in the new user's home. You could use Meld and do a folder comparison between the two home-s. Don't forget to include the .dot files (hidden files).

I don't think that that is the most efficient way to look for settings, I need a good way to debug the kde processes before shutdown.

Offline

#24 2020-08-18 20:26:56

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

Re: System takes a lot of time to shutdown. (Help with debug)

Can you switch to a VT during this? Log into your user from the VT and dump

systemctl status

and I agree with ewaller, most issues can be tracked down at normal log levels there's so much noise here that it's hard to really check singular points. Can you post a journal log with the issue from a normal log level?

FWIW regarding configs you will have a ~/.config/{kde.org,plasma-workspace,plasmashellrc} or so. But I'm not convinced it's a KDE issue just yet. Do you have a networking share mounted or so?

Offline

#25 2020-08-18 21:01:44

dani.sands
Member
Registered: 2020-08-15
Posts: 25

Re: System takes a lot of time to shutdown. (Help with debug)

V1del wrote:

Can you switch to a VT during this? Log into your user from the VT and dump

systemctl status

and I agree with ewaller, most issues can be tracked down at normal log levels there's so much noise here that it's hard to really check singular points. Can you post a journal log with the issue from a normal log level?

FWIW regarding configs you will have a ~/.config/{kde.org,plasma-workspace,plasmashellrc} or so. But I'm not convinced it's a KDE issue just yet. Do you have a networking share mounted or so?

VT? I assume that you mean a virtual terminal, like the you access from CTRL+ALT+F_. I in that case I don't need to do that because although the session manager closes all my windows in that time I can open new ones.
I started a new konsole instance and saved the log from running 

systemctl status

.

https://pastebin.com/0gBNi58P

https://pastebin.com/mAqdTtND

My next reply will be the jounal log.

Offline

Board footer

Powered by FluxBB