Artix Linux Forum

Init systems => OpenRC => Topic started by: MaxLPM on 25 January 2025, 20:42:26

Title: Explanation for the "nm-dispatcher: Caught signal 15, shutting down..." message
Post by: MaxLPM on 25 January 2025, 20:42:26
I'm writing this post just because I've been curious why this message appears in the first place and because I couldn't find any promising explanations on the web.

So, if you use OpenRC with NetworkManager then you've probably noticed this during shutdown:
Code: [Select]
nm-dispatcher: req:2 'down' [wlan0], "/etc/NetworkManager/dispatcher.d/10-openrc-status": complete: proccess failed with Script '/etc/NetworkManager/dispatcher.d/10-openrc-status' exited with status 1
nm-dispatcher: Caught signal 15, shutting down...
The message has been around for 13 years (https://forums.gentoo.org/viewtopic-p-7057396.html), but there doesn't seem to be any solutions for it. So, after digging through docs and scripts for a few hours, I came to the following conclusion:

This message isn't the result of the NetworkManager service stopping, but rather dbus. After the NetworkManager service gets the stop command, the program itself exits, but then a new process appears called nm-dispatcher, which is used to execute scripts after NetworkManager shuts down (well, it can do more, but that's the behaviour in this situation). The important thing is that nm-dispatcher runs for about 5 seconds afterwards and depends on dbus (just like NetworkManager itself). If the dbus service also stops in this time frame, nm-dispatcher gets the signal to exit, which is what happens during shutdown and why this message is logged: it's technically an "error". But it's harmless since the system is already powering off.

AFAIK, there really isn't a way to "solve" this other than getting a service to stop between NetworkManager and dbus in order to give nm-dispatcher enough time to gracefully exit. Or just setting a lower log level.

Anyway, I hope this post helps someone who will be looking for this message in the future :P