Not shutting down! Why?

This was not a problem… Until recently.
So probably my fault.

Action to replicate:
From the KDE Desktop, App Launcher | Leave | Shutdown | Confirm. Screen clears, mouse pointer remains and is responsive.
From this point no further activity detected…

If I then open a new terminal (CTL+ALT+F1) log in as root and run

# shutdown now

it shuts down in under a second.

Is there a log file for actions during shut down? Any other advice to diagnose what I have done would be welcome.

Regards, Martin

What when you choose “logout” from that same menu? Does it log out (giving you the login screen), or is it the same as on shutdown?

Good question…

Yes, it behaves in the same way as Shutdown - blank screen with mouse pointer that responds. But no other activity that I can detect.

Regards, M

So it looks like the logout does not work (and as a consequence the shutdown does not follow it). Hm.

shutdown from KDE and wait for 2 minutes, does this work?

No. Last night I left it for several hours… Pressed the Power switch to Shutdown.

Regards, M.

Problem is specific to one user. The others are okay.

I guess I now need to find out what is not closing for that user?

Is the shutdown process logged so that I can try and follow that trail?

Regards, M.

Sure it is:

**erlangen:~ #** journalctl -b -1 _PID=12554 -g stop 
-- Journal begins at Tue 2021-08-31 10:35:31 CEST, ends at Tue 2021-09-21 12:15:19 CEST. -- 
Sep 20 00:12:27 erlangen systemd[12554]: Stopped Sound Service. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping /usr/bin/korgac... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping KMail - E-Mail-Programm... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped target Main User Target. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping Accessibility services bus... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping D-Bus User Message Bus... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping User preferences database... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping Virtual filesystem service... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping Virtual filesystem metadata service... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping Sound Service... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopping Save jAlbum Project Files... 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped Virtual filesystem metadata service. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped User preferences database. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped Save jAlbum Project Files. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped D-Bus User Message Bus. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped Accessibility services bus. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped Sound Service. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped Virtual filesystem service. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped target Basic System. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped target Paths. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped target Sockets. 
Sep 20 00:12:29 erlangen systemd[12554]: Stopped target Timers. 
Sep 20 00:12:30 erlangen systemd[12554]: Stopped KMail - E-Mail-Programm. 
Sep 20 00:12:30 erlangen systemd[12554]: Stopped /usr/bin/korgac. 
**erlangen:~ #**

I do not know about the logging. But you can of course also check if the user has still programs running when (s)he shuts down).

First of course simply from what one can see on the screen for open programs, but a

ps -ef | grep '^<username>'

(replace <username> of course) could show something.

IMO he needs something to log his logout. He does not reach shutdown.

That did the trick! Thank you…

I’m embarrassed to say: That that showed me a Logout Script that I had forgotten about. Dho…

Many thanks to all, M.

You are welcome.

Sorry for being to terse. pid is the id of the user instance of systemd, which logs everything:

[FONT=monospace]**erlangen:~ #** journalctl -b 0 _PID=1217
[/FONT]Sep 20 00:14:33 erlangen systemd[1217]: **pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=<unknown>] user=[karl] ruser=<unknown>] rhost=<unknown>]**
Sep 20 00:14:33 erlangen systemd[1217]: pam_unix(systemd-user:session): session opened for user karl(uid=1000) by (uid=0) 
Sep 20 00:14:33 erlangen systemd[1217]: Queued start job for default target Main User Target. 
Sep 20 00:14:33 erlangen systemd[1217]: Created slice User Application Slice. 
Sep 20 00:14:33 erlangen systemd[1217]: Reached target Paths. 
Sep 20 00:14:33 erlangen systemd[1217]: Reached target Timers. 
Sep 20 00:14:33 erlangen systemd[1217]: Starting D-Bus User Message Bus Socket... 
Sep 20 00:14:33 erlangen systemd[1217]: Listening on Multimedia System. 
Sep 20 00:14:33 erlangen systemd[1217]: Listening on Sound System. 
Sep 20 00:14:33 erlangen systemd[1217]: Listening on D-Bus User Message Bus Socket. 
Sep 20 00:14:33 erlangen systemd[1217]: Reached target Sockets. 
Sep 20 00:14:33 erlangen systemd[1217]: Reached target Basic System. 
Sep 20 00:14:33 erlangen systemd[1217]: Started Save jAlbum Project Files. 
Sep 20 00:14:33 erlangen systemd[1217]: Reached target Main User Target. 
Sep 20 00:14:33 erlangen systemd[1217]: Startup finished in 134ms. 
Sep 20 00:14:33 erlangen systemd[1217]: Started D-Bus User Message Bus. 
Sep 20 00:14:34 erlangen systemd[1217]: Reloading. 
Sep 20 00:14:34 erlangen systemd[1217]: Created slice User Background Tasks Slice. 
Sep 20 00:14:34 erlangen systemd[1217]: Starting KDE Global Shortcuts Server... 
Sep 20 00:14:34 erlangen systemd[1217]: Started KDE Global Shortcuts Server. 
Sep 20 00:14:34 erlangen systemd[1217]: Starting User preferences database... 
Sep 20 00:14:34 erlangen systemd[1217]: Started User preferences database. 
Sep 20 00:14:34 erlangen systemd[1217]: Starting KActivityManager Activity manager Service... 
Sep 20 00:14:34 erlangen systemd[1217]: Created slice User Core Session Slice. 
Sep 20 00:14:34 erlangen systemd[1217]: Starting Sound Service... 
Sep 20 00:14:34 erlangen systemd[1217]: Started KActivityManager Activity manager Service. 
Sep 20 00:14:34 erlangen systemd[1217]: Started /usr/bin/korgac. 
Sep 20 00:14:35 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 20 00:14:35 erlangen systemd[1217]: Started Terminal - Super User Mode. 
Sep 20 00:14:35 erlangen systemd[1217]: Started Sound Service. 
Sep 20 00:14:35 erlangen systemd[1217]: Started Firefox - Web Browser. 
Sep 20 00:14:35 erlangen systemd[1217]: Starting Virtual filesystem service... 
Sep 20 00:14:35 erlangen systemd[1217]: Started Virtual filesystem service. 
Sep 20 00:14:36 erlangen systemd[1217]: Starting Accessibility services bus... 
Sep 20 00:14:36 erlangen systemd[1217]: Started Accessibility services bus. 
Sep 20 08:48:30 erlangen systemd[1217]: Started Infozentrum - Infozentrum. 
Sep 20 08:48:38 erlangen systemd[1217]: **app-org.kde.kinfocenter-fe816d42d6604879a460b0a05387300d.scope: Consumed 1.782s CPU time.**
Sep 20 14:28:52 erlangen systemd[1217]: Started Firefox - Web Browser. 
Sep 20 22:56:52 erlangen systemd[1217]: Started Firefox - Web Browser. 
Sep 21 06:38:09 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 21 07:30:29 erlangen systemd[1217]: Started Telegym. 
Sep 21 09:56:39 erlangen systemd[1217]: Starting KRunner... 
Sep 21 09:56:39 erlangen systemd[1217]: Started KRunner. 
Sep 21 09:56:48 erlangen systemd[1217]: Starting KRunner provider for baloo file indexer... 
Sep 21 09:56:48 erlangen systemd[1217]: plasma-baloorunner.service: Skipped due to 'exec-condition'. 
Sep 21 09:56:48 erlangen systemd[1217]: Condition check resulted in KRunner provider for baloo file indexer being skipped. 
Sep 21 12:23:49 erlangen systemd[1217]: Started jAlbum - Make web photo albums with thumbnail pages and slide shows. 
Sep 21 12:24:30 erlangen systemd[1217]: **app-jalbum-66b564cba54140c18e497589abe06be1.scope: Consumed 25.251s CPU time.**
Sep 21 12:25:43 erlangen systemd[1217]: **app-telegym-de5bd0262789407f81cbaab0bea4463e.scope: Consumed 12min 814ms CPU time.**
Sep 21 12:29:13 erlangen systemd[1217]: Started jAlbum - Make web photo albums with thumbnail pages and slide shows. 
Sep 21 12:34:58 erlangen systemd[1217]: **app-jalbum-c8760d9bbf284116acbdd5ba3ac82a8c.scope: Consumed 1min 27.170s CPU time.**
Sep 21 18:49:33 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 21 19:02:51 erlangen systemd[1217]: Started Infozentrum - Infozentrum. 
Sep 21 19:03:34 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 21 20:04:43 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 22 06:02:32 erlangen systemd[1217]: Started Firefox - Web Browser. 
Sep 22 07:24:48 erlangen systemd[1217]: Started /usr/share/digikam/utils/digikam-camera. 
Sep 22 07:37:22 erlangen systemd[1217]: Started jAlbum - Make web photo albums with thumbnail pages and slide shows. 
[FONT=monospace]Sep 22 07:44:24 erlangen systemd[1217]: Starting Virtual filesystem metadata service... 
Sep 22 07:44:24 erlangen systemd[1217]: Started Virtual filesystem metadata service. 
Sep 22 07:54:47 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 22 07:55:36 erlangen systemd[1217]: Started KMail - E-Mail-Programm. 
Sep 22 08:41:40 erlangen systemd[1217]: Started Infozentrum - Infozentrum. 
Sep 22 08:43:26 erlangen systemd[1217]: **app-org.kde.kinfocenter-a03cca0f935244518e5478c2445ddb2e.scope: Consumed 12.417s CPU time.**
Sep 22 08:57:28 erlangen systemd[1217]: **app-jalbum-f072df8c9339474a9ad171f12ee80af6.scope: Consumed 16min 44.549s CPU time.**
Sep 22 08:57:29 erlangen systemd[1217]: Started jAlbum - Make web photo albums with thumbnail pages and slide shows. 
Sep 22 08:57:35 erlangen systemd[1217]: **app-jalbum-686f939b23354cbeb4b11c24d6201269.scope: Consumed 18.954s CPU time.**
Sep 22 09:00:07 erlangen systemd[1217]: Started jAlbum - Make web photo albums with thumbnail pages and slide shows. 
Sep 22 09:48:24 erlangen systemd[1217]: **app-jalbum-b28eb19b7b774797a386555b1f2e3ca1.scope: Consumed 2min 54.471s CPU time.**
Sep 22 09:53:55 erlangen systemd[1217]: Started Firefox - Web Browser. [/FONT]