Ubuntu MATE 16.04.2 won't shut down after previously waking up from hibernation

Background:

I was having trouble with hibernation, because my swap was on an encrypted logical volume that generated a random key for every session. I then followed a guide on Ubuntu’s website to make it use a fixed key every time. Hibernation started working properly.

The problem:

Although my laptop can hibernate properly now (goes into hibernation, asks me for swap encryption key while wake up and wakes up properly), the problem is that after waking up from hibernation, some time later (doesn’t matter how much time) if I try to shut it down, it won’t shut down.
I have tried the shut down button, restart button, the commands:

sudo shutdown 0
systemctl poweroff -i
poweroff

etc., but no luck. It goes into a halfway shutdown and freezes. It forces me to brute-shutdown, and that’s not the way to go.

See the image below. It is the situation after I have run the command poweroff in the terminal. The screen has frozen and nothing further happens. Same things happens with each of the other commands mentioned above.
[![enter image description here][1]][1]

Note: This is indeed Ubuntu MATE; I have merely tweaked the theme to make it look like the appearance of Unity that I am used to from my previous installation.
[1]: /uploads/default/original/2X/b/b9083399efe7e733674fff32a2ea5e6aea577e9b.jpg

When this problem occurs, do you ever get beyond this frozen screen shown in your image? I am asking because I sometimes experience a related problem.

UM 17.04 sometimes seems to get stuck on the splash screen before finally shutting down. The dots are circling but nothing further happens.

Nope. It stays frozen.
Also, I have disabled the splash screen while booting and powering off (no more quiet splash) but it never reaches that stage in the poweroff process.

And what if you trigger the shutdown from another tty?

I haven’t tried that. I’ll try and post what happens, soon.

1 Like

@orschiro I tried it, and here’s what happens:
When I try to switch to any of the other ttys (non graphical), e.g., tty1, the system just freezes. Weird. Basically, I can’t even switch to another tty from the graphical session. My guess is that the freezing process should be similar to what happens if I try to initiate shutdown, poweroff, or even reboot and pm-hibernate - that’s right, even hibernate won’t work after waking from a previous hibernate.

Here’s a short (1:30) video of the process of booting from a hibernated state and then attempting to shutdown upon completion of resume: https://goo.gl/photos/7qv5TTPhz4xj8kDP6

1 Like

I repeated the whole thing again, this time to capture logs, so separated all processes temporally by minutes. Here’s what was happening (what I was doing) at the respective time:

18:03 Attempt hibernation - successful at 18:04
18:05 Attempt resume - successful, completed at 18:06
18:10 attempt shut down - system frozen. Waiting. 
18:15 nothing happening. Forcefully shutting down using hardware power button.
18:17 begin boot - successful, completed at 18:18 (total time 33.618s)

Here’s the kernel log:
https://pastebin.com/vCeitB81

1 Like

Sounds to me like a hardware issue. Have you already searched for similar problems with your hardware?

Possibly, but hibernation used to work fine on Ubuntu (Unity) 16.04 as well as Ubuntu GNOME 16.04. (don’t ask me why I had installed so many operating systems on my laptop!)

Also, if you mean for me to search similar issues encountered by people with similar laptop or other hardware, I haven’t even come across a similar issue being reported anywhere, let alone same hardware.