Yet another slow shutdown/reboot issue

Hi, i am experiencing a slow shutdown/reboot issue on a fresh endeavour os installation.

This is the output of sudo journalctl -b -1 -e --no-pager
http://ix.io/3Tq2

The delay seems to be approximately here:

mar 25 10:33:14 octane audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 25 10:33:14 octane audit: BPF prog-id=0 op=UNLOAD
mar 25 10:33:14 octane audit: BPF prog-id=0 op=UNLOAD
mar 25 10:33:14 octane audit: BPF prog-id=0 op=UNLOAD
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Stopping timed out. Killing.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 1097 (Discord) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 1995 (Discord) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 2108 (renderer_crash_) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 2109 (renderer_crash_) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 1133 (Discord) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Killing process 1138 (utility_crash_u) with signal SIGKILL.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Failed with result 'timeout'.
mar 25 10:34:41 octane systemd[698]: Stopped rofi.
mar 25 10:34:41 octane systemd[698]: app-rofi-07ca8f3c84b54fe48a40071a023cae6c.scope: Consumed 36.766s CPU time.
mar 25 10:34:41 octane systemd[698]: Removed slice User Application Slice.
mar 25 10:34:41 octane systemd[698]: app.slice: Consumed 1min 4.418s CPU time.
mar 25 10:34:41 octane systemd[698]: Reached target Shutdown.
mar 25 10:34:41 octane systemd[698]: Finished Exit the Session.
mar 25 10:34:41 octane systemd[698]: Reached target Exit the Session.
mar 25 10:34:41 octane systemd[699]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8004 service=[systemd-user] terminal=[] user=[arcogabbo] ruser=[<unknown>] rhost=[<unknown>]

Any help is appreciated

if so what is this? nothing installed per default I would bet ?
discord and some rofi app? and systems service/timer/socket involved?
and welcome here at the forum :purple_square:

That’s what i’m trying to understand. I just have installed some apps but i don’t think they are the main problem. Maybe some service that tries to terminate apps on system shutdown/reboot is bugged? What can i do to investigate more?

show pacman log at first :wink:
cat /var/log/pacman.log | eos-sendlog

systemctl list-unit-files | grep enable ?

I do not know what rofi is but the log suggest that it has something to do with your issue.

Is it this tool that you have installed:
https://wiki.archlinux.org/title/Rofi

If so, I would suggest you deactivate/deinstall it and see if it fixes your issue.

but rofi itself is not providing any systemd servicefiles… and discord is not using rofi in addition…
Not sure if this is even rofi could be some stuff with the name app-rofi :wink:

I removed rofi and the log now shows discord. In fact in the logs i posted you can see various applications other than rofi that got SIG KILL after the delay(including discord just after rofi). Maybe the issue has something to do with display manager or desktop environment? By the way i’m using SDDM and KDE plasma 5.24

1 Like

this be 1st place i look . might help you

" https://wiki.archlinux.org/title/Systemd#Shutdown/reboot_takes_terribly_long "

" https://freedesktop.org/wiki/Software/systemd/Debugging/#shutdowncompleteseventually "

you can or can not provide better info?

What for rofi is installed anyway? and what discord package is in use?

Pacman log:
https://clbin.com/ZAtYE

unit files:

cups.path                                                                 enabled         disabled
avahi-daemon.service                                                      enabled         disabled
cups.service                                                              enabled         disabled
getty@.service                                                            enabled         enabled
NetworkManager-dispatcher.service                                         enabled         disabled
NetworkManager-wait-online.service                                        enabled         disabled
NetworkManager.service                                                    enabled         disabled
power-profiles-daemon.service                                             enabled         disabled
sddm.service                                                              enabled         disabled
systemd-boot-update.service                                               disabled        enabled
systemd-homed.service                                                     disabled        enabled
systemd-network-generator.service                                         disabled        enabled
systemd-networkd.service                                                  disabled        enabled
systemd-pstore.service                                                    disabled        enabled
systemd-remount-fs.service                                                enabled-runtime disabled
systemd-resolved.service                                                  disabled        enabled
systemd-timesyncd.service                                                 enabled         enabled
avahi-daemon.socket                                                       enabled         disabled
cups.socket                                                               enabled         disabled
systemd-userdbd.socket                                                    disabled        enabled
machines.target                                                           disabled        enabled
reboot.target                                                             disabled        enabled
remote-cryptsetup.target                                                  disabled        enabled
remote-fs.target                                                          enabled         enabled
fstrim.timer                                                              enabled         disabled

Following the second link i added the kernel parameters, created the script and run grub-mkconfig. The problem was suddenly gone. For further analysis, i removed those kernel parameters and the debug script, launched again grub-mkconfig and the problem is still gone.

As a newbie i assume the solution i needed was regenerating the grub config file? Seems weird to me, but it’s all fixed now. Thanks to all who tried to resolve my problem, i’ll mark as solved.

EDIT 1: Turns out it’s all fixed when no applications are open on the os. Problem still persists then :frowning:

EDIT 2: Here it is the full shutdown log http://ix.io/3TqW

EDIT 3: The issue does not occur when trying $ systemctl reboot or $ systemctl poweroff. However the problem always occurs when rebooting or powering off from plasma UI.

In comparison to what?
Have you logged timing data?
Have you searched the forum? I suppose you did, but I expected data (from systemd-analyze critical-chain or your clock).
Also it seems weird you have a system problem and not post system info (inxi -Faz and add system modifications you have done already, when etc…)

I haven’t done any system modification, just some package installation. Here it is my system info:

System:
  Kernel: 5.16.16-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux
    root=UUID=af319153-4856-4809-8685-90de78eee44e rw rootflags=subvol=@
    resume=UUID=d2519d4a-660f-49c8-93b6-6a0dd5b7b699 loglevel=3 nowatchdog
    nvme_load=YES nvidia-drm.modeset=1 systemd.log_level=debug
    systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0
  Desktop: KDE Plasma 5.24.3 tk: Qt 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: AB350-Gaming v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: AB350-Gaming-CF v: x.x serial: <superuser required>
    UEFI: American Megatrends v: F10 date: 12/01/2017
CPU:
  Info: model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen
    family: 0x17 (23) model-id: 1 stepping: 1 microcode: 0x8001129
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 1685 high: 2769 min/max: 1550/3200 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1726 2: 2769
    3: 1353 4: 1275 5: 1475 6: 1344 7: 1268 8: 1364 9: 1319 10: 1269 11: 2329
    12: 2738 bogomips: 76668
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GM206 [GeForce GTX 960] vendor: ASUSTeK driver: nvidia
    v: 510.54 alternate: nouveau,nvidia_drm pcie: gen: 3 speed: 8 GT/s
    lanes: 16 ports: active: none off: DVI-I-1,HDMI-A-1 empty: DP-1,DP-2,DP-3
    bus-ID: 07:00.0 chip-ID: 10de:1401 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
    loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
    gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3520x1080 s-dpi: 93 s-size: 961x292mm (37.8x11.5")
    s-diag: 1004mm (39.5")
  Monitor-1: DVI-I-0 pos: right res: 1600x900 hz: 60 dpi: 94
    size: 432x240mm (17.0x9.4") diag: 494mm (19.5")
  Monitor-2: HDMI-0 pos: primary,left res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.5x11.5") diag: 598mm (23.5")
  OpenGL: renderer: NVIDIA GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA 510.54
    direct render: Yes
Audio:
  Device-1: NVIDIA GM206 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 07:00.1 chip-ID: 10de:0fba class-ID: 0403
  Device-2: AMD Family 17h HD Audio vendor: Gigabyte driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 09:00.3
    chip-ID: 1022:1457 class-ID: 0403
  Device-3: Logitech G432 Gaming Headset type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-1:2 chip-ID: 046d:0a9c
    class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.16.16-arch1-1 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 2.51 TiB used: 116.65 GiB (4.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Silicon Power
    model: SPCC M.2 PCIe SSD size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: ECFM22.7 temp: 28.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 EVO 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 2B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST2000DM008-2FR102
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 17.17 GiB (3.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 17.17 GiB (3.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 17.17 GiB (3.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 52 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 25%
Info:
  Processes: 312 Uptime: 16m wakeups: 0 Memory: 7.78 GiB
  used: 2.24 GiB (28.9%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 Packages: pacman: 1037 lib: 276 Shell: Zsh v: 5.8.1
  running-in: kitty inxi: 3.3.13

About systemd-analyze, doesn’t it show boot timings? My issue only occurs on shutdown or reboot.

I searched the forum and found only one post similar to mine but the op fixed by accident and couldn’t provide any solution sadly.

https://freedesktop.org/wiki/Software/systemd/Debugging/

Apparently the issue disappeared alone. I will finally mark this post as solved.

do you somehow rebuild grub.cfg in between ?

Not recently.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.