Ubuntu MATE 16.04 sometimes needs long to shut down

I'm affected by this as well: random "Windows-with-a-surprise-update"-like shutdown speeds.
Because the problem is somewhat random and happens on shutdown, I think it's gonna be quite hard to diagnose.

@Etamuk: can you please do the following:

  • Edit your file /etc/default/grub ( sudo nano /etc/default/grub ) and change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with:

GRUB_CMDLINE_LINUX_DEFAULT=""

  • Then run the command: sudo update-grub

Starting next reboot, this will give you more verbose informations about the steps your machine takes during Startup and Shutdown, instead of splashing the Ubuntu MATE logo.

I've noticed a few things that maybe you will be able to confirm:

  • The shut down process doesn't always hang on the same steps. I don't know what steps they are but they must immediately follow the following because I can often see those messages long enough to take notice:

[ OK ] Stopped Raised Network Interfaces.
[ OK ] Stopped D-Bus System Message Bus.
[ OK ] Stopped target User and Group Name Lookups.
[ OK ] Stopped crash report submission daemon.
[ OK ] Stopped CUPS Scheduler.

  • I think there's a way to make the problem happen more frequently but I can't be sure because well, random. Anyway the method I use is to ssh into the machine from another machine and to stay logged in while I start the shutdown. It appears to happen way more often when I do that.

Here are my system specs, note that I'm also using a SSD:

> System:    Host: Edge Kernel: 4.4.0-21-generic x86_64 (64 bit) Console: tty 0
>            Distro: Ubuntu 16.04 xenial
> Machine:   System: Notebook (portable) product: W510LU
>            Mobo: Notebook model: W510LU
>            Bios: American Megatrends v: 5.11 date: 10/21/2015
> CPU:       Quad core Intel Celeron N3150 (-MCP-) cache: 1024 KB 
>            clock speeds: max: 2080 MHz 1: 889 MHz 2: 1118 MHz 3: 1560 MHz
>            4: 1406 MHz
> Graphics:  Card: Intel Device 22b1
>            Display Server: X.org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
>            tty size: 80x24 Advanced Data: N/A out of X
> Audio:     Card Intel Device 2284 driver: snd_hda_intel
>            Sound: Advanced Linux Sound Architecture v: k4.4.0-21-generic
> Network:   Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
>            driver: r8169
>            Card-2: Intel Wireless 7265 driver: iwlwifi
> Drives:    HDD Total Size: 128.0GB (25.7% used)
>            ID-1: /dev/sda model: LDLC size: 128.0GB