Stop job closing sessions and multiple sessions running

See

Your naming is wrong.

Mount units must be named after the mount point directories they control. Example: the mount point /home/lennart must be configured in a unit file home-lennart.mount . For details about the escaping logic used to convert a file system path to a unit name, see systemd.unit(5) .

That means you need to name your mount unit file in this way:
home-alastair-NFS_from_ibmserv_134_alastair.mount

Where=/home/alastair/NFS_from_ibmserv_134_alastair

This should read Description=nfs mount for nfsfiles.

A working automount has the following:

erlangen:~ # systemctl status Backup.automount 
● Backup.automount
     Loaded: loaded (/etc/fstab; generated)
     Active: active (waiting) since Sat 2023-11-25 16:03:46 CET; 2 days ago
   Triggers: ● Backup.mount
      Where: /Backup
       Docs: man:fstab(5)
             man:systemd-fstab-generator(8)

Nov 26 03:11:13 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 21953 (bash)
Nov 27 00:00:00 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 14784 (readlink)
Nov 27 07:06:44 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 24429 (btrfs)
Nov 27 07:09:01 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 24763 (KIO::WorkerThre)
Nov 27 07:24:02 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 25291 (KIO::WorkerThre)
Nov 27 07:34:09 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 25737 (KIO::WorkerThre)
Nov 27 07:58:07 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 26153 (KIO::WorkerThre)
Nov 27 17:11:58 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 27019 (readlink)
Nov 27 18:00:24 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 29840 (readlink)
Nov 27 19:00:13 erlangen systemd[1]: Backup.automount: Got automount request for /Backup, triggered by 3659 (readlink)
erlangen:~ # systemctl status Backup.mount 
○ Backup.mount - /Backup
     Loaded: loaded (/etc/fstab; generated)
     Active: inactive (dead) since Mon 2023-11-27 19:00:34 CET; 32min ago
   Duration: 20.918s
TriggeredBy: ● Backup.automount
      Where: /Backup
       What: /dev/disk/by-uuid/8a723ba5-c46f-45df-b708-0cf9c541da27
       Docs: man:fstab(5)
             man:systemd-fstab-generator(8)
        CPU: 59ms

Nov 27 19:00:13 erlangen systemd[1]: Mounting /Backup...
Nov 27 19:00:13 erlangen systemd[1]: Mounted /Backup.
Nov 27 19:00:34 erlangen systemd[1]: Unmounting /Backup...
Nov 27 19:00:34 erlangen systemd[1]: Backup.mount: Deactivated successfully.
Nov 27 19:00:34 erlangen systemd[1]: Unmounted /Backup.
erlangen:~ # 

The spaces around the equal sign are a common error, but don’t matter in case of Description. Mountpoints and unit names need to match.

Removing the blanks around the equal sign will not solve Alastair’s problem…see comment above and documentation…

As you have shown in your own example, the mount unit file name needs to match the mount point. That is why it is working for you.

Believe it or not I am trying here but still no joy.
Here is what I have now:-

alastair@HP-Z640-1:~> systemctl cat home-alastair-NFS_from_ibmserv_134_alastair.automount
# /etc/systemd/system/home-alastair-NFS_from_ibmserv_134_alastair.automount
[Unit]
Description=nfs automount for 134 /home/alastair

[Automount]
Where=/home/alastair/NFS_from_ibmserv_134_alastair
TimeoutIdleSec=10

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> systemctl cat home-alastair-NFS_from_ibmserv_134_alastair.mount
# /etc/systemd/system/home-alastair-NFS_from_ibmserv_134_alastair.mount
[Unit]
Description=nfs mount for 134 /home/alastair

[Mount]
What=192.168.169.134:/home/alastair
Where=/home/alastair/NFS_from_ibmserv_134_alastair
Type=nfs4
Options=rw,noauto
TimeoutSec=5

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

What I have not followed and may not be relevant but what is the [Install] in both .mount and .automount files?

You need to enable and start the automount unit.

Hi Karl,
Not sure about enable but could not start automount. I now have result:-

alastair@HP-Z640-1:~> journalctl -xe
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
Nov 27 19:37:24 HP-Z640-1 plasmashell[2214]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x5632958e4fa0) >
Nov 27 19:39:10 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:auth): pam_kwallet5: pam_sm_authenticate
Nov 27 19:39:10 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:auth): pam_kwallet5: Refusing to do anything for the root >
Nov 27 19:39:15 HP-Z640-1 sudo[5028]: alastair : TTY=pts/1 ; PWD=/home/alastair ; USER=root ; COMMAND=/usr/bin/sys>
Nov 27 19:39:15 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
Nov 27 19:39:15 HP-Z640-1 sudo[5028]: pam_unix(sudo:session): session opened for user root(uid=0) by alastair(uid=>
Nov 27 19:39:15 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_open_session
Nov 27 19:39:15 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:session): pam_kwallet5: not a graphical session, skipping.>
Nov 27 19:39:16 HP-Z640-1 sudo[5028]: pam_unix(sudo:session): session closed for user root
Nov 27 19:39:16 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_close_session
Nov 27 19:39:16 HP-Z640-1 sudo[5028]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
Nov 27 19:39:35 HP-Z640-1 plasmashell[2214]: qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.Scr>
Nov 27 19:39:35 HP-Z640-1 plasmashell[2214]: file:///usr/share/plasma/plasmoids/org.kde.plasma.kicker/contents/ui/>
Nov 27 19:39:35 HP-Z640-1 plasmashell[2214]: libpng warning: iCCP: known incorrect sRGB profile
Nov 27 19:39:35 HP-Z640-1 plasmashell[2214]: libpng warning: known incorrect sRGB profile
Nov 27 19:39:35 HP-Z640-1 plasmashell[2214]: libpng warning: profile matches sRGB but writing iCCP instead
Nov 27 19:39:37 HP-Z640-1 systemd[1987]: Started Konsole - Terminal.
░░ Subject: A start job for unit UNIT has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit UNIT has finished successfully.
░░ 
░░ The job identifier is 352.
Nov 27 19:40:19 HP-Z640-1 sudo[5208]: alastair : TTY=pts/1 ; PWD=/home/alastair ; USER=root ; COMMAND=/usr/bin/sys>
Nov 27 19:40:19 HP-Z640-1 sudo[5208]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
Nov 27 19:40:19 HP-Z640-1 sudo[5208]: pam_unix(sudo:session): session opened for user root(uid=0) by alastair(uid=>
Nov 27 19:40:19 HP-Z640-1 sudo[5208]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_open_session
Nov 27 19:40:19 HP-Z640-1 sudo[5208]: pam_kwallet5(sudo:session): pam_kwallet5: not a graphical session, skipping.>
Nov 27 19:40:20 HP-Z640-1 sudo[5208]: pam_unix(sudo:session): session closed for user root
Nov 27 19:40:20 HP-Z640-1 sudo[5208]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_close_session
Nov 27 19:40:20 HP-Z640-1 sudo[5208]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: alastair : TTY=pts/1 ; PWD=/home/alastair ; USER=root ; COMMAND=/usr/bin/sys>
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_unix(sudo:session): session opened for user root(uid=0) by alastair(uid=>
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_open_session
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_kwallet5(sudo:session): pam_kwallet5: not a graphical session, skipping.>
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_unix(sudo:session): session closed for user root
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_close_session
Nov 27 19:40:27 HP-Z640-1 sudo[5243]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
lines 1487-1526/1526 (END)

You created a system unit. You should run these commands as root:

systemctl enable --now home-alastair-NFS_from_ibmserv_134_alastair.automount
journalctl -b -u 'home-alastair-NFS_from_ibmserv_134_alastair*'
alastair@HP-Z640-1:~> sudo journalctl -b -u 'home-alastair-NFS_from_ibmserv_134_alastair*'
[sudo] password for root: 
Nov 27 19:40:19 HP-Z640-1 systemd[1]: Mounting nfs mount for 134 /home/alastair...
Nov 27 19:40:20 HP-Z640-1 systemd[1]: Mounted nfs mount for 134 /home/alastair.
Nov 27 19:40:27 HP-Z640-1 systemd[1]: home-alastair-NFS_from_ibmserv_134_alastair.automount: Path /home/alastair/N>
Nov 27 19:40:27 HP-Z640-1 systemd[1]: Failed to set up automount nfs automount for 134 /home/alastair.
alastair@HP-Z640-1:~> 

I have something new now which seems correct but why I have no idea:-

alastair@HP-Z640-1:~> sudo journalctl -b -u 'home-alastair-NFS_from_ibmserv_134_alastair*'
Nov 27 19:40:19 HP-Z640-1 systemd[1]: Mounting nfs mount for 134 /home/alastair...
Nov 27 19:40:20 HP-Z640-1 systemd[1]: Mounted nfs mount for 134 /home/alastair.
Nov 27 19:40:27 HP-Z640-1 systemd[1]: home-alastair-NFS_from_ibmserv_134_alastair.automount: Path /home/alastair/N>
Nov 27 19:40:27 HP-Z640-1 systemd[1]: Failed to set up automount nfs automount for 134 /home/alastair.
Nov 27 20:35:23 HP-Z640-1 systemd[1]: home-alastair-NFS_from_ibmserv_134_alastair.automount: Path /home/alastair/N>
Nov 27 20:35:23 HP-Z640-1 systemd[1]: Failed to set up automount nfs automount for 134 /home/alastair.
lines 1-6/6 (END)...skipping...
Nov 27 19:40:19 HP-Z640-1 systemd[1]: Mounting nfs mount for 134 /home/alastair...
Nov 27 19:40:20 HP-Z640-1 systemd[1]: Mounted nfs mount for 134 /home/alastair.
Nov 27 19:40:27 HP-Z640-1 systemd[1]: home-alastair-NFS_from_ibmserv_134_alastair.automount: Path /home/alastair/NFS_from_ibmserv_134_alastair is already a mount point, refusing start.
Nov 27 19:40:27 HP-Z640-1 systemd[1]: Failed to set up automount nfs automount for 134 /home/alastair.
Nov 27 20:35:23 HP-Z640-1 systemd[1]: home-alastair-NFS_from_ibmserv_134_alastair.automount: Path /home/alastair/NFS_from_ibmserv_134_alastair is already a mount point, refusing start.
Nov 27 20:35:23 HP-Z640-1 systemd[1]: Failed to set up automount nfs automount for 134 /home/alastair.

However the mount is now working. I have no idea why there was a delay but fingers crossed I should be OK.

I created still another example for clarification applicable to USB-stick:

Units:

erlangen:~ # systemctl cat home-karl-Intenso.mount
# /etc/systemd/system/home-karl-Intenso.mount
[Mount]
What=UUID=5225-9B5A
Where=/home/karl/Intenso
Type=vfat

erlangen:~ # systemctl cat home-karl-Intenso.automount
# /etc/systemd/system/home-karl-Intenso.automount
[Automount]
Where=/home/karl/Intenso

[Install]
WantedBy=multi-user.target
erlangen:~ # 

Enable unit:

erlangen:~ # systemctl enable --now home-karl-Intenso.automount 
Created symlink /etc/systemd/system/multi-user.target.wants/home-karl-Intenso.automount → /etc/systemd/system/home-karl-Intenso.automount.
erlangen:~ # 

Status of units:

erlangen:~ # systemctl status 'home-karl-Intenso*'
● home-karl-Intenso.mount - /home/karl/Intenso
     Loaded: loaded (/etc/systemd/system/home-karl-Intenso.mount; static)
     Active: active (mounted) since Mon 2023-11-27 21:31:30 CET; 1min 57s ago
TriggeredBy: ● home-karl-Intenso.automount
      Where: /home/karl/Intenso
       What: /dev/sdb1
      Tasks: 0 (limit: 4915)
        CPU: 1ms
     CGroup: /system.slice/home-karl-Intenso.mount

Nov 27 21:31:30 erlangen systemd[1]: Mounting /home/karl/Intenso...
Nov 27 21:31:30 erlangen systemd[1]: Mounted /home/karl/Intenso.

● home-karl-Intenso.automount
     Loaded: loaded (/etc/systemd/system/home-karl-Intenso.automount; enabled; preset: disabled)
     Active: active (running) since Mon 2023-11-27 21:29:37 CET; 3min 50s ago
   Triggers: ● home-karl-Intenso.mount
      Where: /home/karl/Intenso

Nov 27 21:29:37 erlangen systemd[1]: Set up automount home-karl-Intenso.automount.
Nov 27 21:31:03 erlangen systemd[1]: home-karl-Intenso.automount: Got automount request for /home/karl/Intenso, triggered by 4220 (bash)
Nov 27 21:31:03 erlangen systemd[1]: home-karl-Intenso.automount: Got automount request for /home/karl/Intenso, triggered by 4220 (bash)
Nov 27 21:31:30 erlangen systemd[1]: home-karl-Intenso.automount: Got automount request for /home/karl/Intenso, triggered by 4220 (bash)
erlangen:~ # 

Journal:

erlangen:~ # journalctl -b -u 'home-karl-Intenso*'
Nov 27 21:31:30 erlangen systemd[1]: home-karl-Intenso.automount: Got automount request for /home/karl/Intenso, triggered by 4220 (bash)
Nov 27 21:31:30 erlangen systemd[1]: Mounting /home/karl/Intenso...
Nov 27 21:31:30 erlangen systemd[1]: Mounted /home/karl/Intenso.
erlangen:~ # 

Hi Karl,
After two reboots, both of which were successful in enabling my NFS mount I think I can sigh with relief on NFS. However when running the two reboots I found I am still getting the 90 second delay before shut down completes, which was the reason for my starting this thread.

Since I do no longer have any problems with NFS now I need to find out what is not shutting down.
On all the previous shut downs since I started this thread all have a delay of 1m 30s count down while Session 3 of User alastair is named as the cause. Would it be possible to find out what Session 3 is?

loginctl lists the active sessions. journalctl -b -1 -u 'session*' -g Session lists sessions of last boot.

On infamous host erlangen automounts are readily stopped during shutdown:

erlangen:~ # journalctl -b -1 -u '*automount' --since 22:27
Nov 27 22:27:37 erlangen systemd[1]: home-karl-Intenso.automount: Got automount request for /home/karl/Intenso, triggered by 4452 (bash)
Nov 27 22:27:59 erlangen systemd[1]: proc-sys-fs-binfmt_misc.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Arbitrary Executable File Formats File System Automount Point.
Nov 27 22:27:59 erlangen systemd[1]: Backup.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Backup.automount.
Nov 27 22:27:59 erlangen systemd[1]: Btrbk.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Btrbk.automount.
Nov 27 22:27:59 erlangen systemd[1]: Crucial.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Crucial.automount.
Nov 27 22:27:59 erlangen systemd[1]: Sandisk.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Sandisk.automount.
Nov 27 22:27:59 erlangen systemd[1]: Seagate.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount Seagate.automount.
Nov 27 22:27:59 erlangen systemd[1]: home_karl_6700k.automount: Deactivated successfully.
Nov 27 22:27:59 erlangen systemd[1]: Unset automount home_karl_6700k.automount.
erlangen:~ # 

Good idea but not much help yet:-

alastair@HP-Z640-1:~> journalctl -b -1 -u 'session*' -g Session
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
-- No entries --
alastair@HP-Z640-1:~> 

How about executing the command as root/via sudo?

Good point. Never sure when to run this as sudo but the command now tells me what seems to reflect my experience:-

alastair@HP-Z640-1:~> sudo journalctl -b -1 -u 'session*' -g Session
[sudo] password for root: 
Nov 27 20:58:51 HP-Z640-1 systemd[1]: Started Session 1 of User sddm.
Nov 27 20:58:57 HP-Z640-1 systemd[1]: Started Session 3 of User alastair.
Nov 27 21:04:47 HP-Z640-1 systemd[1]: Stopping Session 3 of User alastair...
Nov 27 21:06:17 HP-Z640-1 systemd[1]: Stopped Session 3 of User alastair.
alastair@HP-Z640-1:~> 

What I need to know is more about what is running Session 3. It looks to me like one of my autostart commands. I now only have KeePassXC and pCloud. I shall remove these from my autostart folder and see if that pins it down.

I tried removing all autostarts and this didn’t help so still need to find out exactly what is running Session 3. If anybody can help please do.

This is a user prompt: karl@erlangen:~> . If I select a user prompt run the command as user, e.g. karl.

This is a root prompt: erlangen:~ # . If I select a root prompt become root by running su - and run the command in this new shell as user root:

karl@erlangen:~> su -
Passwort: 
erlangen:~ # 

Only few processes run in the current session scope:

karl@erlangen:~> systemd-cgls /user.slice/user-1000.slice/session-4.scope
CGroup /user.slice/user-1000.slice/session-4.scope:
├─ 1489 /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth-06e44d21-5230-4af9-a319-d5069f866d9d --id 1 --start /usr/bin/startplasma-x11 --user karl
├─ 1490 /usr/bin/startplasma-x11
├─ 1560 /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
├─ 1561 /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
└─16430 scdaemon --multi-server
karl@erlangen:~> 

All user processes are found in CGroup /user.slice/user-1000.slice

karl@erlangen:~> 
karl@erlangen:~> systemd-cgls --no-pager /user.slice/user-1000.slice
CGroup /user.slice/user-1000.slice:
├─user@1000.service …
│ ├─session.slice
│ │ ├─xdg-permission-store.service
│ │ │ └─1605 /usr/libexec/xdg-permission-store
│ │ ├─xdg-document-portal.service
│ │ │ ├─1601 /usr/libexec/xdg-document-portal
│ │ │ └─1612 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
│ │ ├─xdg-desktop-portal.service
│ │ │ └─1594 /usr/libexec/xdg-desktop-portal
│ │ ├─plasma-ksmserver.service
│ │ │ └─1630 /usr/bin/ksmserver


...

│ │   ├─2309 /usr/bin/akonadi_notes_agent --identifier akonadi_notes_agent
│ │   ├─2310 /usr/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent
│ │   └─2311 /usr/bin/akonadi_unifiedmailbox_agent --identifier akonadi_unifiedmailbox_agent
│ └─init.scope
│   ├─1207 /usr/lib/systemd/systemd --user
│   └─1216 (sd-pam)
└─session-4.scope
  ├─ 1489 /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth-06e44d21-5230-4af9-a319-d5069f866d9d --id 1 --start /usr/bin/startplasma-x11 --user karl
  ├─ 1490 /usr/bin/startplasma-x11
  ├─ 1560 /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
  ├─ 1561 /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
  └─16430 scdaemon --multi-server
karl@erlangen:~> 

You may check the above list for rogue processes refusing to quit.

This is what I have for session-3:-

HP-Z640-1:~ # systemd-cgls /user.slice/user-1000.slice/session-3.scope
CGroup /user.slice/user-1000.slice/session-3.scope:
├─4460 /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth-42d973a8-5ecc-4933-b00f-611191243bfe --id 1 --start />
├─4476 /usr/bin/kwalletd5 --pam-login 13 14
├─4480 /usr/bin/startplasma-x11
├─4546 /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
├─4547 /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
└─5709 scdaemon --multi-server
lines 1-7/7 (END)

And for user-1000.slice I have:-

HP-Z640-1:~ # systemd-cgls --no-pager /user.slice/user-1000.slice
CGroup /user.slice/user-1000.slice:
├─user@1000.service …
│ ├─session.slice
│ │ ├─xdg-permission-store.service
│ │ │ └─4590 /usr/libexec/xdg-permission-store
│ │ ├─xdg-document-portal.service
│ │ │ ├─4585 /usr/libexec/xdg-document-portal
│ │ │ └─4597 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
│ │ ├─xdg-desktop-portal.service
│ │ │ └─4579 /usr/libexec/xdg-desktop-portal
│ │ ├─plasma-ksmserver.service
│ │ │ └─4616 /usr/bin/ksmserver
│ │ ├─pipewire-pulse.service
│ │ │ └─5114 /usr/bin/pipewire-pulse
│ │ ├─wireplumber.service
│ │ │ └─4963 /usr/bin/wireplumber
│ │ ├─gvfs-daemon.service
│ │ │ ├─4833 /usr/libexec/gvfs/gvfsd
│ │ │ └─4850 /usr/libexec/gvfs/gvfsd-fuse /run/user/1000/gvfs -f
│ │ ├─plasma-kwin_x11.service
│ │ │ └─4619 /usr/bin/kwin_x11 --replace
│ │ ├─plasma-kded.service
│ │ │ ├─4618 /usr/bin/kded5
│ │ │ └─4893 /usr/bin/xsettingsd
│ │ ├─plasma-xdg-desktop-portal-kde.service
│ │ │ └─4737 /usr/libexec/xdg-desktop-portal-kde
│ │ ├─plasma-plasmashell.service
│ │ │ ├─ 4675 /usr/bin/plasmashell --no-respawn
│ │ │ ├─18181 /usr/libexec/kf5/kdesud
│ │ │ ├─18236 /usr/bin/dbus-launch.x11 --autolaunch c3da95f43d994bb4b5664c8dc37a88dd --binary-syntax --close-stder…
│ │ │ ├─18237 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
│ │ │ ├─18239 /usr/libexec/xdg-desktop-portal
│ │ │ ├─18246 /usr/libexec/xdg-document-portal
│ │ │ ├─18251 /usr/libexec/xdg-permission-store
│ │ │ ├─18258 fusermount3 --auto-unmount -- /root/.cache/doc
│ │ │ ├─18264 /usr/libexec/xdg-desktop-portal-kde
│ │ │ ├─18286 /usr/libexec/xdg-desktop-portal-gtk
│ │ │ ├─18291 /usr/libexec/gvfs/gvfsd
│ │ │ └─18297 /usr/libexec/gvfs/gvfsd-fuse /root/.gvfs -f
│ │ ├─at-spi-dbus-bus.service
│ │ │ ├─4923 /usr/libexec/at-spi2/at-spi-bus-launcher
│ │ │ ├─4935 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-ad…
│ │ │ └─4943 /usr/libexec/at-spi2/at-spi2-registryd --use-gnome-session
│ │ ├─pipewire.service
│ │ │ └─4962 /usr/bin/pipewire
│ │ └─dbus.service
│ │   ├─4492 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-…
│ │   └─4979 /usr/bin/jackdbus auto
│ ├─background.slice
│ │ ├─plasma-kactivitymanagerd.service
│ │ │ └─4733 /usr/libexec/kactivitymanagerd
│ │ ├─plasma-polkit-agent.service
│ │ │ └─4735 /usr/libexec/polkit-kde-authentication-agent-1
│ │ ├─plasma-kscreen.service
│ │ │ └─4924 /usr/libexec/kf5/kscreen_backend_launcher
│ │ ├─plasma-xembedsniproxy.service
│ │ │ └─4738 /usr/bin/xembedsniproxy
│ │ ├─plasma-ksystemstats.service
│ │ │ └─4775 /usr/bin/ksystemstats
│ │ ├─plasma-kglobalaccel.service
│ │ │ └─4656 /usr/bin/kglobalaccel5
│ │ ├─plasma-gmenudbusmenuproxy.service
│ │ │ └─4734 /usr/bin/gmenudbusmenuproxy
│ │ ├─plasma-powerdevil.service
│ │ │ └─4736 /usr/libexec/org_kde_powerdevil
│ │ └─kde-baloo.service
│ │   └─4575 /usr/libexec/baloo_file
│ ├─app.slice
│ │ ├─app-firefox-bf6eaf24c24141228872f3940060192c.scope
│ │ │ ├─19396 /usr/lib64/firefox/firefox
│ │ │ ├─19478 /usr/lib64/firefox/firefox -contentproc -parentBuildID 20231116134553 -prefsLen 30777 -prefMapSize 2…
│ │ │ ├─19499 /usr/lib64/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 30918 -prefMapSize 234003…
│ │ │ ├─19535 /usr/lib/mozilla/kmozillahelper
│ │ │ ├─19550 /usr/lib64/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 36243 -prefMapSize 234003…
│ │ │ ├─19597 /usr/lib64/firefox/firefox -contentproc -parentBuildID 20231116134553 -sandboxingKind 0 -prefsLen 36…
│ │ │ ├─19606 /usr/lib64/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 30075 -prefMapSize 234003…
│ │ │ ├─19611 /usr/lib64/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 30181 -prefMapSize 234003…
│ │ │ ├─19639 /usr/lib64/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 30173 -prefMapSize 234003…
│ │ │ ├─19668 keepassxc-proxy /home/alastair/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json …
│ │ │ ├─19672 /home/alastair/Downloads/AppImage_Apps/KeepassXC/KeePassXC-2.7.6-x86_64.AppImage /home/alastair/.moz…
│ │ │ ├─19721 /usr/lib64/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 30230 -prefMapSize 234003…
│ │ │ └─19758 /usr/lib64/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 30230 -prefMapSize 234003…
│ │ ├─app-pcloud@autostart.service
│ │ │ ├─4882 /tmp/.mount_pcloudi67VUp/pcloud
│ │ │ ├─4909 /home/alastair/Downloads/AppImage_Apps/pCloud/pcloud
│ │ │ ├─5060 /tmp/.mount_pcloudi67VUp/pcloud --type=zygote --no-sandbox
│ │ │ ├─5309 fusermount -o rw,nosuid,nodev,auto_unmount,fsname=pCloud.fs,nonempty -- /home/alastair/pCloudDrive
│ │ │ └─5538 /tmp/.mount_pcloudi67VUp/pcloud --type=renderer --no-sandbox --disable-gpu-compositing --service-pipe…
│ │ ├─app-org.kde.kleopatra-04450dbcb8154b788818b2e449139db0.scope
│ │ │ └─5586 /usr/bin/kleopatra -session 10af845d87000169799160900000268990051_1701512430_391984
│ │ ├─app-hplip\x2dsystray@autostart.service
│ │ │ ├─4876 /usr/bin/python3 /usr/bin/hp-systray -x
│ │ │ ├─5000 /usr/bin/python3 /usr/bin/hp-systray -x
│ │ │ └─5001 /usr/bin/python3 /usr/bin/hp-systray -x
│ │ ├─app-kaccess@autostart.service
│ │ │ └─4900 /usr/bin/kaccess
│ │ ├─app-geoclue\x2ddemo\x2dagent@autostart.service
│ │ │ └─4897 /usr/libexec/geoclue-2.0/demos/agent
│ │ ├─dconf.service
│ │ │ └─4683 /usr/libexec/dconf-service
│ │ ├─app-org.kde.konsole-69f533fdbe5e4c179910114b95356f82.scope
│ │ │ ├─19855 /usr/bin/konsole
│ │ │ ├─19870 /bin/bash
│ │ │ ├─19892 su -
│ │ │ ├─19895 -bash
│ │ │ └─19989 systemd-cgls --no-pager /user.slice/user-1000.slice
│ │ ├─xdg-desktop-portal-gtk.service
│ │ │ └─4808 /usr/libexec/xdg-desktop-portal-gtk
│ │ ├─app-kmail_view-7748c961535d49d9b9307a336c7637fa.scope
│ │ │ ├─11053 /usr/bin/kmail --view /home/alastair/Computing_and_Network_Files/Programs_and_Apps/Archiving_Emails/…
│ │ │ ├─11090 /usr/libexec/qt5/QtWebEngineProcess --type=zygote --no-zygote-sandbox --disable-in-process-stack-tra…
│ │ │ ├─11091 /usr/libexec/qt5/QtWebEngineProcess --type=zygote --disable-in-process-stack-traces --application-na…
│ │ │ ├─11094 /usr/libexec/qt5/QtWebEngineProcess --type=zygote --disable-in-process-stack-traces --application-na…
│ │ │ └─11110 /usr/libexec/qt5/QtWebEngineProcess --type=renderer --disable-in-process-stack-traces --disable-spee…
│ │ ├─app-KeePassXC\x2d2.7.6\x2dx86_64.AppImage@autostart.service
│ │ │ ├─4871 keepassxc
│ │ │ └─4892 /home/alastair/Downloads/AppImage_Apps/KeepassXC/KeePassXC-2.7.6-x86_64.AppImage
│ │ └─app-org.kde.kalendarac@autostart.service
│ │   ├─4906 /usr/bin/kalendarac
│ │   ├─5084 /usr/bin/akonadi_control
│ │   ├─5121 /usr/bin/akonadiserver
│ │   ├─5131 /usr/sbin/mysqld --defaults-file=/home/alastair/.local/share/akonadi/mysql.conf --datadir=/home/alast…
│ │   ├─5252 /usr/bin/akonadi_akonotes_resource --identifier akonadi_akonotes_resource_0
│ │   ├─5253 /usr/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent
│ │   ├─5255 /usr/bin/akonadi_birthdays_resource --identifier akonadi_birthdays_resource
│ │   ├─5257 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_0
│ │   ├─5258 /usr/bin/akonadi_followupreminder_agent --identifier akonadi_followupreminder_agent
│ │   ├─5259 /usr/bin/akonadi_ical_resource --identifier akonadi_ical_resource_0
│ │   ├─5268 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_0
│ │   ├─5269 /usr/bin/akonadi_indexing_agent --identifier akonadi_indexing_agent
│ │   ├─5270 /usr/bin/akonadi_maildir_resource --identifier akonadi_maildir_resource_0
│ │   ├─5273 /usr/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent
│ │   ├─5277 /usr/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent
│ │   ├─5279 /usr/bin/akonadi_mailmerge_agent --identifier akonadi_mailmerge_agent
│ │   ├─5284 /usr/bin/akonadi_migration_agent --identifier akonadi_migration_agent
│ │   ├─5286 /usr/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent
│ │   ├─5289 /usr/bin/akonadi_notes_agent --identifier akonadi_notes_agent
│ │   ├─5292 /usr/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent
│ │   └─5293 /usr/bin/akonadi_unifiedmailbox_agent --identifier akonadi_unifiedmailbox_agent
│ └─init.scope
│   ├─4463 /usr/lib/systemd/systemd --user
│   └─4464 (sd-pam)
└─session-3.scope
  ├─4460 /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth-42d973a8-5ecc-4933-b00f-611191243bfe --id 1 --start…
  ├─4476 /usr/bin/kwalletd5 --pam-login 13 14
  ├─4480 /usr/bin/startplasma-x11
  ├─4546 /usr/bin/ssh-agent /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
  ├─4547 /usr/bin/gpg-agent --sh --daemon --keep-display /usr/libexec/xinit/xinitrc
  └─5709 scdaemon --multi-server
HP-Z640-1:~ # CGroup /user.slice/user-1000.slice:

I cannot see anything wrong here but perhaps you can point out the problem.

You have several autostart services, which may cause issues. Infamous host erlangen has:

karl@erlangen:~> systemctl --user list-units --all '*@autostart.service'
  UNIT                                                  LOAD   ACTIVE   SUB     DESCRIPTION                                            
  app-at\x2dspi\x2ddbus\x2dbus@autostart.service        loaded inactive dead    AT-SPI D-Bus Bus
  app-geoclue\x2ddemo\x2dagent@autostart.service        loaded active   running Geoclue Demo agent
  app-kaccess@autostart.service                         loaded active   running Accessibility
  app-klipper@autostart.service                         loaded inactive dead    Klipper
  app-konqy_preload@autostart.service                   loaded inactive dead    Konqueror preloading during desktop environment startup
  app-org.kde.kalendarac@autostart.service              loaded inactive dead    Calendar Reminders
  app-xprop\x2dkde\x2dfull\x2dsession@autostart.service loaded inactive dead    Set KDE_FULL_SESSION=1

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
7 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
karl@erlangen:~> 

The above services don’t cause issues here. You may compare your list of services to the above. For troubleshooting temporarily disable the additional services.