Slow shutdown 12.3

It doesn’t matter how I do it, from the menu, or using shutdown now/shutdown -h now/shutdown -h -P now/systemctl poweroff, sometimes it powers off immediately, but usually it takes 2+ minutes to shut down. It displays the splash screen most times. If I close the splash screen (esc), all I see is the startup output (last line says ’ OK ] Reached Target Graphical Interface.’). Sometimes after waiting a few seconds, I can get it to shut off by hitting ctrl-alt-backspace, then it outputs something about trouble stopping the sound device and shuts down.
One time I waited 30 minutes before I just hard shut it off. I’ve hard shut it off after 30 seconds or so sometimes, and about half the time I can hear the head park on my drive, other times I don’t.

Looked through /var/log/messages and there isn’t anything interesting at shutdown time. I’m not sure what else to look at.

This is a fairly new Dell Latitude (only about 6 months old). I don’t remember the model. I had similar issues on 12.2, but it eventually went away (I think after a kernel update). I’m using gnome-shell.

Any suggestions? Thanks.

are the results the same?

with cmd

sudo poweroff

This might happen if one of the extensions is leaking memory. Try disabling the extensions if you have them. It would also help if you exit the tray icons before shutting down.

sudo poweroff does work
Disabling all the sys tray icons also allowed me to shutdown. It also made logins faster.
I didn’t have any extensions installed. I had to disable all my sys tray icons for it to work. I tried narrowing down which one, but any of them caused it to hang. I had google chrome, hp status service, and dropbox running.
I’d like to at least get dropbox back.
Anyone know what could be causing that?

I did face this issue in 12.2 where the tray icons played very badly with the system and shutdown were painful. I had to exit them all manually before shutting down. But it was worth the trouble.

Run this before shutdown. You can get process names from gnome-system-monitor.
command launcher(Alt+F2)==> killall<space><process name><space><process name> .

They are not obviously integrating well with the desktop. On finding the culprit it should be possible to raise a bug report.

if setting up a new user account clears the problem for that user,
its suggested the current user account be deleted and then setup again,
the drawback with this is that the desktop reverts to the default and has to be
tweaked again

Ah, good idea. I’ll give that a try.

I was having this problem.

It would take 90secs or more to shutdown.

I’ve just removed the Lock/Leave widget from near the KDE clock (you might need to Unlock widgets first) and now it shuts down in ~10secs.

If you’re on the desktop you can click the “Search and Launch” thing at the top right of the screen and then select either “Lock” or “Leave” from the menu that appears.

So it looks like there’s an issue with the Lock/Leave widget somehow.

Hope that helps.

The other user is believe is using GNOME. If he/she is also using KDE then your suggestions might be useful.

My mistake. It was faster to shutdown the first time after removing the Lock/Leave widget but then returned to taking ~90secs again.

I’ve since tried renaming the “.kde” folder as just “kde” so that a new one will get recreated. Again, it was faster to shutdown the first time but then has been slow shutting down again since.

I assume this means the issue isn’t with kde if this failed to correct it for me and the user above is having the same issue using gnome desktop.

What’s the size of file /var/log/journal/<32bit#>/system.journal?

suggest a read of https://forums.opensuse.org/english/…od-laptop.html

system.journal file is currently 4.6Mb.

If I read it correct the attached link suggest looking at a log file for any errors being recorded. Can you offer any guidance as to which log file to check, I wasn’t sure.

Thanks

@amnesia7

the implication was that the file system.journal would get large if it was collecting lots of error messages

this was found not to be case here

the journal records system calls, its a compressed file, and seems to take about 0,3 second to read and update per MB

it can be read with the cmd systemd-journalctl, but root privileges are needed to see the full contents

this cannot account for the 90 seconds being experience on your system

some log files are in /var/log/ directory

another file is in the /home/<user name> directory, a hidden file, .xsession-errors

the normal off time here is about 10 seconds on all machines, so have no further comments

best of luck

My problem seems to be with acpid service not stopping.

If I run systemctl stop acpid.service in a konsole as root before shutting down it works fine.

I don’t want to disable acpid but can anyone offer any guidance as to why this might be happening, whether a fix is in the pipeline, or if it is possible to create a script that I can automatically run somehow when I shutdown the laptop?

Thanks

@amnesia7

one simple method,

put the commands in a file, make it executable and place it in the directory

/home/<user_name>/.kde4/shutdown/

the commands in the file will then be executed immediately before the shutdown of kde

hth

But systemctl command posted by the @op required root permissions. Should he/she do visudo scripting - How can I have a PHP script run a shell script as root? - Stack Overflow

@vazhavandan

the op did not mention a root terminal was used or root privileges needed for the cmd

so the topic was rightly or wrongly ignored

cheers

I do not have an answer but I have the same problem. I ran journalctl --since 2013-3-31>/tmp/journal . ( Change 3-31 to latest date to keep the output manageable) . In my journal file I get :

Apr 15 19:14:27 linux-s33i.site systemd[1]: Stopped CUPS Printing Service.
Apr 15 19:15:54 linux-s33i.site systemd[1]: acpid.service stopping timed out. Killing.
Apr 15 19:15:54 linux-s33i.site systemd[1]: acpid.service: main process exited, code=killed, status=9/KILL
Apr 15 19:15:54 linux-s33i.site systemd[1]: Stopped ACPI Event Daemon.
Apr 15 19:15:54 linux-s33i.site systemd[1]: Unit acpid.service entered failed state

It shows a long delay between CUPS and the timeout

I too had this problem and the ‘shutdown’ process was stuck while downing ACPI services. So, I just created a shell script (File: /sbin/shutdown.sh) with the following content and made it executable.

/usr/bin/systemctl stop acpid.service
/sbin/shutdown -h -P now


In KDE, I set the shutdown command to shutdown.sh (Go to Configure Desktop / System Administration / Login Screen / Shutdown (Tab) and change the command for halt to /sbib/shutdown.sh)

Just uninstall the package “acpid” or disable it with “sudo systemctl disable acpid.service”.
You shouldn’t need it anyway. It’s causing problems because systemd took over at least some of its functionaliy…