Make slow shutdown faster
In Ubuntu 16.04 shutting down can take ages.
To speed up the shutdown proces you shoud stop processes in the network-manager.
Step 1:
Open your Terminal window and enter the below command.
gksudo gedit /etc/init/network-manager.conf
Once the configuration file is opened, copy and paste the below code, below the existing ‘stop on stopping dbus’, as shown in the below screenshot.
kill timeout 1
Then, save your changes, and close the configuration file.
Step 2:
I do not think the below step is necessary, but you can do the same to the ‘modem-manager’, just in case. For that, enter the below command.
gksudo gedit /etc/init/modemmanager.conf
Then look for the existing ‘stop on stopped network-manage’ text line, and simply paste the below code just below it.
kill timeout 1
Now, save your changes and close the configuration file. That’s it!.
____________
Update:
I actually had to completely get rid of ‘modem-manager’, and finally, it has fixed all of my issues. So, if the above steps haven’t helped you as well, then try the following.
Instead of renmoving modemmanager you could also:
Comment out this line works too in /etc/init/modemmanager.conf :
#start on starting network-manager
stop on stopped network-manager
without having to remove modemmanager daemon.
If that doesn't work, you could remover the modemmanager by useing this command.
sudo apt-get autoremove modemmanager
sudo rm /etc/init/modemmanager.conf
If you run into problems after that (say your mobile broadband modem stopped working), then you can re-install it using the below command.
sudo apt-get install modemmanager
____________
Now try shutting down the computer , and if it was any of those services that were causing the slowdown, then hopefully, it will be fixed.