Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Reboot/shutdown slow when not logged out.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Hale
Posts: 16
Joined: 2018-06-29 04:12

Reboot/shutdown slow when not logged out.

#1 Post by Hale »

The bug is simple:
When rebooting from logged-in user environment, the shutdown/reboot cycles for long minutes around "...session c3 Debian-gdm", and "...User Manager for UID 115".
But if you log out first, the reboot/shutdown is performed for less than 10 seconds.

Probably, there is a conflict with shotdown sequence, but I have no idea how to correct it in systemd. In the past I was using only webmin in Turnkey Linux, where systemd services are represented in understandable way, above that, letter-labeling was used. Here, I have no idea where to look.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Reboot/shutdown slow when not logged out.

#2 Post by bw123 »

Hale wrote:The bug is simple:
<snip>
In the past I was using only webmin in Turnkey Linux, where systemd services are represented in understandable way, above that, letter-labeling was used. Here, I have no idea where to look.
Debian pkgs install a lot of documentation in /usr/share/doc, there is a wiki, man pages, all kept fairly current, and also a bug tracking system that can be very helpful. They are easy to find with a simple search on the internet.

If you think the bug is in gdm, I would look there, if you think systemd, then look at systemd?
resigned by AI ChatGPT

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reboot/shutdown slow when not logged out.

#3 Post by debiman »

Hale wrote:the shutdown/reboot cycles for long minutes around "...session c3 Debian-gdm", and "...User Manager for UID 115".
i have seen this recently either here or on linuxquestions.org, please search.

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: Reboot/shutdown slow when not logged out.

#4 Post by Hale »

debiman, thanks. I know. I've seen a couple of topics, but no solution, other than workaround of logging out first.
For me, it really looks like the problem which was sometimes happening in pre7 Windows; a ratrace of services with incorrect load/shutdown sequence.
In systemd, there are smarter dependencies option, and alphabetical order in addition, but something is probably wrong. I am not that familiar with linux to fix it on my own. The problem seems frequent to Debian forks.


bw123, thank you so much again for sending me to void in Microsoft style. Offering Google, or simply, "check the power-plug" would be shorter; if ignoring the topic where you can not help is not possible.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reboot/shutdown slow when not logged out.

#5 Post by debiman »

^ and there we go again... :roll:

fwiw, this does not happen on any of my systems. i don't use gnome or gdm.
so, in my eyes, that's much more likely to be the culprit.

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: Reboot/shutdown slow when not logged out.

#6 Post by Hale »

agree. when I tried KDE, I experienced generally keyboard input failing, but boot/shutdown was going smoothly. So well, yes, I think user is not kicked out in time by Gnome (should gdm do this?), when pushing the shutdown button. But I lack the knowledge of the process to check this. And whenever I have time for figuring this out, depends on how long devs of the software essential to me would fix bugs in windows.

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

Re: Reboot/shutdown slow when not logged out.

#7 Post by jibberjabber »

I don't see what the bugs in windows and the amount of time it takes them to fix them has to do with this :?:
If you really have a "bug" and are using Debian, seems like the thing to do is file a bug report, then the developers can work in fixing it.
All though the Debian USERS here are often very knowledgeable and a lot of help, they are not developers, it is in the best interest to everyone involved to report bugs so they can be (maybe) fixed.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reboot/shutdown slow when not logged out.

#8 Post by debiman »

btw, agreed that some linux nerds can be a bit offhand in their replies, but there usually is some merit to it.
in other words, actually digging for documentation helps.
it might seem like a rabbit hole at first (to find out about the actual problem, you have to read about systemd first, then aboutgdm, then about syslogs...), but only the first few times, then one actually learns to find where problems originate.
it's the old adage of teaching someone to fish, instead of giving them a fish.

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: Reboot/shutdown slow when not logged out.

#9 Post by Hale »

well, I tried compiling the kernel a few times in 90s, built a few linux-based routers and samba-based servers. But still can not understand how can it help me in pinpointing the shutdown problem %( something weird. Devs... devs are engineers interested in new tech. Fixing release bugs is the final priority for them, until some manager comply on bad sales. Users on the other hand care about their own skin. Generally.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reboot/shutdown slow when not logged out.

#10 Post by debiman »

"devs are engineers interested in new tech" - wot?
anyhow, i learned C++ in the 90s, but wouldn't be able to write even the simplest program nowadays.
so i don't really see what linux kernels of the 90s have to do with anything...

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: Reboot/shutdown slow when not logged out.

#11 Post by Hale »

You should read the article of (probably) a Microsoft guy, telling how comparatively reliable software is made and any "big" consumer project is made in general (as an engineer, I can tell the same about hardware development). "I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why.". Fixing old things is always a final priority, and generally undesired. The top priority is running for titles: "yesterday IEEE/Intel...<substitute> offered, today we made it"... no matter how bad it works, if it does, it will never be touched again. You think open-source is different? HAH! All the mess in thousands of PC-oriented linux dysfunctional projects comes from this : we will make prettier buttons to teach Microsoft how ugly they are, and let "someone else" fix the code under these buttons, maybe tomorrow, or the next year...probably...
The difference with Microsoft is that MS guys do not know what mad Idea the management can throw the next day, so they hide some useful features inside, in order to turn things 180 degrees any time. But only users can spread the word where to look...
The situation with Linux, is not different, but instead of "spreading the word", gurus here prefer picking unlucky guys with a stick.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Reboot/shutdown slow when not logged out.

#12 Post by kevinthefixer »

If we're all through carping at each other, I may have a useful suggestion, if the system in question has an active Samba filesystem mount. Or NFS, what little I've found on the subject only covered Samba but could apply to any CIFS. Seems the system shutdown scripts call for umounting all filesystems after shutting down the net interfaces, so the script stops there until the umount command gives up and exits, somewhere around 90 seconds or so. On my system I did four things to cure it, don't know if one did or some combination but the problem no longer exists. First I put the script I use to mount the Samba share in /usr/local/sbin and call it from XFCE's "session and startup" dialog. I also ended said script with the line "exit 0" (that's a zero). Seems if that script hasn't terminated it may well be causing "mount" to report that it's still using the share so it can't be umounted. Someone also suggested appending "&&" to the line with the actual mount command but I didn't do that and it doesn't seem to be necessary. Third I installed libpam-systemd, apparently that makes it easier for the system to kill user processes, and fourth I set KillUserProcesses=yes in /etc/systemd/logind.conf. Hint: giving your regular user "staff" permissions facilitates some of this.

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: Reboot/shutdown slow when not logged out.

#13 Post by Hale »

oh, thank you for sharing the knowledge! I can not follow the idea with debugging the unmounting now, but will try this "kill" idea blindly.
"KillUserProcesses=no" seems to be commented in the config, so I guess it is "=yes" by default.
The library is not installed from the box. But there is a description, that it should be:

>Package: libpam-systemd
>This package contains the PAM module which registers user sessions in the systemd control group hierarchy for logind. If in doubt, do install this package.

Will see how much this helps.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Reboot/shutdown slow when not logged out.

#14 Post by kevinthefixer »

I'd be interested to see what, if it's any single one, actually fixed the problem. There is no basis to assume KillUserProcesses=yes is the default, though, and while I can't find my reference immediately it indicated that "no" was default.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reboot/shutdown slow when not logged out.

#15 Post by debiman »

Hale wrote:"KillUserProcesses=no" seems to be commented in the config, so I guess it is "=yes" by default.
as a convention, commented out values in package-owned config files represent the default value, so the default value would be 'no'.

i also tried to set this to yes in /etc/systemd/logind.conf, and it seemed to have the opposite effect: it took even longer to shut down. but it's been 2 weeks, so i don't remember the details anymore.
Hale wrote:bw123, thank you so much again for sending me to void in Microsoft style. Offering Google, or simply, "check the power-plug" would be shorter; if ignoring the topic where you can not help is not possible.
bw123 offered neither google nor microsoft nor checking the power-plug, but something else entirely.
but this reminds me:
who is doing a better job?
PS: also note that T-shirt!

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Reboot/shutdown slow when not logged out.

#16 Post by kevinthefixer »

[quote="debiman"i also tried to set this to yes in /etc/systemd/logind.conf, and it seemed to have the opposite effect: it took even longer to shut down. but it's been 2 weeks, so i don't remember the details anymore.[/quote]
I confess, I didn't go about this very rigorously. Bounced around looking things up, only took rudimentary notes and applied all fixes at once. When that worked I quit trying to fix it. I take it that one was not the magic fix! But again it may well be any combination of two or three.

Post Reply