Hibernating causes data loss

Bug #1012726 reported by Jessie Morris
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kubuntu-settings (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

What happens:

Every time my laptop attempts to hibernate on my Lenovo W510, I lose data. I am using home partition encryption (pretty sure this is the cause).

100% of the time, one of the files that becomes unreadable is ~/.kde/share/config/plasma-desktop-appletsrc, however my wallet file and other files have also become broken. The error I get when this happens is

"~/.kde/share/config/plasma-desktop-appletsrc: Input/output error"

I get that error when I try to do anything but rm -rf the broken file.

If I do an ls -l on the file, the output is as follows:

"-rw------- 1 jessie jessie 0 Jun 12 23:38 /home/jessie/.kde/share/config/plasma-desktop-appletsrc"

Notice the file size is 0. The modified date is almost exactly when my laptop last attempted to hibernate.

This happens EVERY time I try to hibernate.

This causes me to lose data, I hate that.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cryptsetup 2:1.4.1-2ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Wed Jun 13 09:09:23 2012
EcryptfsInUse: Yes
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120228.1)
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
crypttab:
 # <target name> <source device> <key file> <options>
 cryptswap1 /dev/sda7 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

Revision history for this message
Jessie Morris (jessieamorris) wrote :
affects: ubuntu → cryptsetup (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

Your /etc/crypttab shows that you have random crypted swap configured. It is impossible to resume from hibernate from a random-encrypted swap device because, by definition, the key is not stored anywhere that it can be used for resuming from a cold boot. This is one of many reasons why hibernate is disabled on Ubuntu by default. If Kubuntu is giving you the option to hibernate, that's a bug in the Kubuntu GUI.

If you want to be able to hibernate, you will need to reconfigure your encrypted swap to use a fixed key instead of a random one. This will require you to enter a passphrase at boot (and at resume from hibernate). Use of unencrypted swap with encrypted home directories is strongly discouraged as insecure.

affects: cryptsetup (Ubuntu) → kubuntu-meta (Ubuntu)
Revision history for this message
Jessie Morris (jessieamorris) wrote :

Steve,

That makes sense. I can understand why it would fail to hibernate. I honestly never try to hibernate manually, but KDE tries to do it when my battery gets low. I have recently disabled this and hope to not lose any more data.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

To fix this, the default power policy for low battery needs to be changed to not be "hibernate".

affects: kubuntu-meta (Ubuntu) → kubuntu-default-settings (Ubuntu)
Changed in kubuntu-default-settings (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jessie Morris (jessieamorris) wrote :

I've changed the behavior on my machine from hibernate to shut down and I am still getting data loss. This fix is not correct or there is something else at play here.

affects: kubuntu-default-settings (Ubuntu) → kubuntu-settings (Ubuntu)
Revision history for this message
Harald Sitter (apachelogger) wrote :

Not a settings bug.

Changed in kubuntu-settings (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.