[ClosedUnsolved] Encryption+Hibernate/suspend2disk possible?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

[ClosedUnsolved] Encryption+Hibernate/suspend2disk possible?

Postby jjjjj on Fri Jun 20, 2014 4:27 pm

After having spent four days trying to get hibernate (or, more precisely resume from hibernate) to work with an encrypted disk, I'm at my wits' end. Google gives me tons of people with similar problems, but none of the proposed solutions work for me. So my main questions are:

1. Is it possible at all to have LVM (encrypted or unencrypted) and suspend to/resume from disk work together?
2. How exactly do you troubleshoot hibernate/resume issues?

Here's my problem in more detail: I installed Mint 17 x64 Cinnamon on my machine (Asus P8Z77-V, i7-3770K, 16GB RAM, GTX 750 Ti) and chose encryption and LVM during the installation procedure. This creates an encrypted LVM with two logical volumes (root and swap) inside. Other than that, I left everything on default settings except for automatic login, because for some reason the graphics drivers in Mint show a blank screen where the login window should be. After reboot, I upgraded all packages and installed the nvidia-337 driver.

Suspend to disk seems to work fine, but when I try resuming, the problems begin. There are three possible outcomes which appear randomly:
a) everything works fine; the machine resumes from hibernate
b) after typing in the encryption passphrase, the machine reboots
c) after entering the passphrase, the machine stalls with flashing lights on the keyboard indicating kernel panic.
Well, I say "randomly", but it's a very nasty kind of randomness. Not tossing-a-coin random, but with very long runs. Sometimes it works 15 times in a row, but crashes on the 16th time (or vice versa). This makes troubleshooting incredibly tedious.

A failure to resume leaves no traces in the log files (at least I don't see any). pm-suspend.log shows a series of "success" or "not applicable" followed by "performing hibernate". syslog says something about anacron (which I guess is called just before hibernating) and the next thing it shows is the reboot process after the crash, nothing in between. I might have missed something, so if it helps, I can post those logs here (or others if you tell me which ones).

My first assumption was that something goes wrong with the decryption of the swap and indeed on a vanilla installation of Mint, hibernate/resume works fine (not true, see my third edit below). However, funny enough, the same problems occur when I install the system on a non-encrypted LVM. I also tried uswsusp and tuxonice both of which display more information. According to them, the decryption works fine, the swap partition is mounted correctly (I checked the UUID), and its contents are read. After that, I get the same crash or stall or (sometimes) successful resume.

To narrow the issue down, I stripped my PC of most of its non-vital hardware, including the graphics card, all but one disk, and all USB devices safe for the mouse and an old PS/2 keyboard I managed to find. The big problem is the sporadic and random nature of the failure. I had the impression that I got less of case c (the one with the kernel panic) after removing the SD card reader. Also, I experienced much fewer crashed when I didn't have the Nvidia card installed (I still got some though, at least with encryption turned on, so far none with only LVM). However, these observations are anecdotic rather than hard facts, because of the above-mentioned randomness and the fact that I can only do a finite number of tries in any given time.
I could go on for hours about what other things I tried (varying the time between hibernate and resume, unplugging the PC's power or leaving it connected, uttering magic spells during POST etc.). The results were alway equally nonspecific.

Right now I'm utterly out of ideas what to try next (not to mention extremely frustrated - I feel like I've read half the internet trying to find a solution). Any hints from you guys would be really appreciated. I should point out that while I do have an IT background, I'm not too experienced with Linux. So, if there's any vital information missing, please tell me.


Edit 1: Ok, so meanwhile I tried some more things. First, I installed kernel 3.15 (having read that something about hibernation was changed). It still crashed on resume (2 out of 15 times, which may or may not be an inprovement). Second, I installed Mint in non-UEFI mode. The only thing this changed is that instead of rebooting after decrypting the RAM image, it just hangs with a blinking cursor in the upper left of the screen.

Edit 2: Another unsuccessful attempt: Disabling "Fast Boot" in BIOS doesn't help either.

Edit 3: Turns out, it doesn't work either when I'm not using LVM. I just didn't try often enough. In the meantime, I have done much more testing and it seems that while having the Nvidia card installed highly increases the number of resume fails (from about 1 in 10 to 1 in 2), they also happen without the card and regardless of how I install the OS (LVM, encrypted LVM or no LVM at all). By the way, the absence of any log entries regarding the resume process is not like I thought due to the disk not being available due to encryption. Apparently there's just no logging being done before the system is completely resumed.
I also tried to have the system unload all sorts of modules before hibernation and reloading them after resume. Changes nothing.
Last edited by jjjjj on Wed Jun 25, 2014 11:07 am, edited 1 time in total.
jjjjj
Level 1
Level 1
 
Posts: 2
Joined: Tue Jun 17, 2014 3:38 pm

Linux Mint is funded by ads and donations.
 

Re: Encryption + Hibernate/suspend2disk possible?

Postby jjjjj on Wed Jun 25, 2014 11:06 am

Well, never mind, I'm going back to Windows.

I tried on several other machines and hibernate just won't work. Plus there's other kinds of instability. It seems to me that something's fundamentally broken with this OS.
jjjjj
Level 1
Level 1
 
Posts: 2
Joined: Tue Jun 17, 2014 3:38 pm

Re: [ClosedUnsolved] Encryption+Hibernate/suspend2disk possi

Postby Gammadeus on Sun Jul 13, 2014 4:53 pm

Hi, jjjjj !

Don't give up, man !
I have the same problem, but I don't want to know the meaning of the word impossibilitiy.
If I pick up any useful information from others, I will share with you, I promis.

Reagards: Gammadeus.
Gammadeus
Level 1
Level 1
 
Posts: 2
Joined: Sun Jul 13, 2014 4:30 pm

Re: [ClosedUnsolved] Encryption+Hibernate/suspend2disk possi

Postby Gammadeus on Mon Jul 14, 2014 6:25 am

So, maybe it is not the right solution to our problem, but I founded a webpage wich maybe helps us.

You wrote that you changed the kernel to the 3.15. Did you use the Pf-kernel at kernel-freshening ?
(Sorry if my English is rough, but it is not my native language.)
Gammadeus
Level 1
Level 1
 
Posts: 2
Joined: Sun Jul 13, 2014 4:30 pm


Return to Installation & Boot

Who is online

Users browsing this forum: Derek_S, misGnomer and 16 guests