Shutting down slow for no apparent reason

When shutting down my System, it sometimes appears that it takes a long time.
It takes its usual second till it goes to into the cli view where it displays /dev/sda2: clean xxxx/xxxx… and then just hangs. Previously it would display “watchdog did not stop” for a brief second but i managed to disable watchdog and nmi-watchdog using another post on this forum (can’t find it anymore) yet it didnt help tho it doesn’t display the “watchdog did not stop” message anymore
I have also read it could be related to swap page being slow to clear itself but mine is on an nvme ssd so that is not the case.
Now, i looked through the journalctl boot logs and found that it hang for about 1min30s on trying to activate rtkit-daemon.service. this is the output of running: journalctl --boot=-1 -r:

Mär 31 22:29:30 rafael-manj sddm[529]: Setting default cursor
Mär 31 22:29:30 rafael-manj dbus-daemon[492]: [system] Activation via systemd failed for unit 'rtkit-daemon.service': Refusing activation, D-Bus is shutting down.
Mär 31 22:29:30 rafael-manj dbus-daemon[492]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.193' (uid=1000 pid=827 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo")

I am using manjaro kde on kernel version 5.15.28-1. I am up to date on all my packages as well.

Thank you in advance.

Just use markdown we don’t need a image.

oh ok will do. how far am i supposed to give information from the logs? how many lines back and forth from the problem?

On my (xfce) Arch (VM) and Manjaro, rtkit is required by pulseaudio. The rtkit-daemon.service is listed as disabled and vendor preset=disabled as well, but it is active and running on both with no issues. It is not required by pipewire. Have you switched to pipewire recently? If you have, you may want to check if rttkit is required elsewhere and if not, you can remove it.

I didnt fiddle with audio but both pipewire and pipewire-media-session as well as pulseaudio and its complementary packages are installed by default

you suggest i remove one of them?

What does your inxi output look like? i don’t know what the kde edition defaults are.
pipewire-media-session depends on pipewire, so I am guessing that is the default on kde edition???
On an Endeavour xfce (VM) that has pipewire for audio I have the following (pulse )installed:

pacman -Q | grep pulse                                                   
libpulse 15.0-4
pipewire-pulse 1:0.3.49-1
xfce4-pulseaudio-plugin 0.4.3-2


~ >>> pacman -Q | grep pavucontrol                                         
pavucontrol 1:5.0-1

The EndeavourOS machine runs pipewire OOTB and looks like this for sound:

 Sound Server-1: ALSA v: k5.17.1-arch1-1 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.49 running: yes

just the default? or do you need other output from it as well?

CPU: 8-core Intel Core i7-9700F (-MCP-) speed/min/max: 800/800/4700 MHz
Kernel: 5.15.28-1-MANJARO x86_64 Up: 4h 9m Mem: 4373.9/32042.9 MiB (13.7%)
Storage: 3.87 TiB (18.9% used) Procs: 250 Shell: Zsh inxi: 3.3.14

installed pulse-audio applications:

pacman -Q | grep pulse
lib32-libpulse 15.0-2
libpulse 15.0-4
manjaro-pulse 20220217-2
pulseaudio 15.0-4
pulseaudio-alsa 1:1.2.6-3
pulseaudio-bluetooth 15.0-4
pulseaudio-ctl 1.70-1
pulseaudio-jack 15.0-4
pulseaudio-lirc 15.0-4
pulseaudio-qt 1.3-1
pulseaudio-rtp 15.0-4
pulseaudio-zeroconf 15.0-4

for grepping pavucontrol it returns no output

also for just good measure for pipewire:

pacman -Q | grep pipewire                                                                                                                                                          
gst-plugin-pipewire 1:0.3.48-1
pipewire 1:0.3.48-1
pipewire-media-session 1:0.4.1-1

Edit: i think i am stupid for sending the standard inxi output so here is the inxi -A output as well lol:

inxi -A                                                                                                                                                                             ✔ 
  Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
  Device-2: NVIDIA GA104 High Definition Audio driver: snd_hda_intel
  Device-3: Generalplus USB Audio Device type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k5.15.28-1-MANJARO running: yes
  Sound Server-2: PulseAudio v: 15.0 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes

This post in Arch forum might be helpful. I have decided to leave well enough alone and stick with pulseaudio on my Manjaro xfce installs. Whatever you do, it might be a good idea to back your system up via whatever means, clonezilla, timeshift etc. before you attempt anything.

pavucontrol might be replaced with plasma-pa in kde

Thank you very much, but before i attempt this so we are on the same page, you think i should ditch pulseaudio? and just use pipewire for the time being? i also think you could maybe force kill it with a script that runs on shutdown as workaround. dunno if that would be adequate as well.

Update: removing pulseaudio would break dependency with plasma-pa as well as pulseaudio-qt with KDE connect (which i dont use so i could uninstall it) :confused:

pamac remove manjaro-pulse pulseaudio pulseaudio-alsa pulseaudio-bluetooth pulseaudio-ctl pulseaudio-jack pulseaudio-lirc pulseaudio-qt pulseaudio-rtp pulseaudio-zeroconf
Abhängigkeiten werden überprüft...
Fehler: Vorgang konnte nicht erfolgreich vorbereitet werden:
Kann Abhängigkeiten nicht erfüllen:
- removing pulseaudio-qt breaks dependency 'pulseaudio-qt' required by kdeconnect
- removing pulseaudio breaks dependency 'pulseaudio' required by plasma-pa

you should be able to install pavucontrol with pipewire as that is how it is on my EndeavourOS VM OOTB

Ty. I will test for a day or two now and let you know if its fixed! :+1:

I had same problem here and was a service (NXServer, NoMachine):

To see what service is causing the problem:

1- Before boot, edit grub option, to show all outputs when start, restart or shutdown

2- Remove the option quiet of grub

3- CTRL + X, to start system

After enter on system, reboot and you will see exactly what service is hanging.

thank you very much, i will try this tomorrow.

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