During shutdown or a reboot, I am presented with the standard 90 second delay. The message is that the system is waiting for nmb to shut down. After the timeout, shutdown proceeds. If I remember to shut down nmb manually before initiating shutdown or reboot, it closes quickly and there is no delay. I have two identical machines with identical settings (as far as I know). Only one machine encounters this problem.
Nmb doesn't shut down cleanly during shutdown or reboot. Causes 90 second delay
So theres 2 things I can think to do.
The first is rather superficial …
We can shorten that wait period to, say, 10 seconds.
printf '[Manager]\nDefaultTimeoutStopSec=10s' | sudo tee -a /etc/systemd/system.conf.d/faster-shutdown.conf
The second would be to add a service file to run some commands before shutdown:
[Unit] Description=Do stuff before shutdown [Service] Type=oneshot RemainAfterExit=true ExecStop=/bin/systemctl stop nmb.service [Install] WantedBy=multi-user.target
(or however you are shutting down nmb and/or other stuff you want to put there)
Then reload and enable it with
systemctl daemon-reload && systemctl enable before-shutdown.service
Of course you arent limited to one or the other … you can do both.
IPv6 may cause the netbios daemon to hang - depending on whether you need the service - you may try disabling IPv6 - see if it makes any difference.
nmb is the Windows netbios broadcast daemon - making it possible for Windows systems to locate your device in the network by hostname.
If you don’t need this you can disable nmb.service.
If you need other systems to be able to locate your system by hostname - several options exist
If you only have a few hosts editing /etc/hosts is simple and effective.
– Network configuration - ArchWiki
Local network hostname resolution
To make your machine accessible in your LAN via its hostname you can:
- edit the
/etc/hostsfile for every device in your LAN, see hosts(5)
- set up a DNS server to resolve your hostname and make the LAN devices use it (e.g. via #DHCP)
- or the easy way: use a Zero-configuration networking service:
- Hostname resolution via Microsoft’s NetBIOS. Provided by Samba on Linux. It only requires the
nmb.service. Computers running Windows, macOS, or Linux with
nmbrunning, will be able to find your machine.
- Hostname resolution via mDNS. Provided by either
nss_mdnswith Avahi (see Avahi#Hostname resolution for setup details) or systemd-resolved. Computers running macOS, or Linux with Avahi or systemd-resolved running, will be able to find your machine. The older Win32 API does not support mDNS, which may prevent some older Windows applications from accessing your device.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.