← Back to team overview

lubuntu-desktop team mailing list archive

how to hibernate (may be swap issue?)

 

all this talk about xscreensaver brings to mind my woes with hibernate
(well i'd like to set xscreensaver to hibernate at some point but at
this point, it's useless).

despite following the ubuntu wiki on the subject (swap as it relates to
hibernation):
https://help.ubuntu.com/community/SwapFaq

i have no luck getting it to come back once it is supposedly suspended
to disk. suspend to ram has no problem.

despite that, all of the settings look right:
$ free
             total       used       free     shared    buffers     cached
Mem:       1542976    1315916     227060          0      68804     554636
-/+ buffers/cache:     692476     850500
Swap:      1571836          0    1571836
$ grep -i swap /proc/meminfo
SwapCached:            0 kB
SwapTotal:       1571836 kB
SwapFree:        1571836 kB
$ cat /proc/swaps
Filename                Type        Size    Used    Priority
/dev/dm-0                               partition    1571836    0    -1
$ sudo fdisk -l | grep -i swap
Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
/dev/sda5       192227328   195371007     1571840   82  Linux swap / Solaris
Disk /dev/mapper/cryptswap1: 1609 MB, 1609564160 bytes
$ grep -i swap /etc/fstab
# swap was on /dev/sda5 during installation
#UUID=8b716f68-bfe0-4d4f-8831-8692c8c394df none            swap   
sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
$ cat /etc/initramfs-tools/conf.d/resume
RESUME=/dev/mapper/cryptswap1

nothing seems (to my eye at least) to be amiss with the suspend to disk
process nor the reboot afterwards:
http://paste.ubuntu.com/780779/

my one thought is the presence of dm-crypt. in case it's not obvious
from the above:
$ sudo cryptsetup status /dev/mapper/cryptswap1
/dev/mapper//dev/mapper/cryptswap1 is active:
  cipher:  aes-cbc-essiv:sha256
  keysize: 256 bits
  device:  /dev/sda5
  offset:  0 sectors
  size:    3143680 sectors
  mode:    read/write
$ sudo cryptsetup status /dev/dm-0
/dev/mapper//dev/dm-0 is active:
  cipher:  aes-cbc-essiv:sha256
  keysize: 256 bits
  device:  /dev/sda5
  offset:  0 sectors
  size:    3143680 sectors
  mode:    read/write

note that both point at /dev/sda5, which is, if you look at the output
of fdisk above, the swap in question.

an interesting thing to note is that neither seem to be LUKS devices:
$ sudo cryptsetup luksUUID /dev/mapper/cryptswap1
Device /dev/mapper/cryptswap1 is not a valid LUKS device.
$ sudo cryptsetup luksUUID /dev/dm-0
Device /dev/dm-0 is not a valid LUKS device.

now i don't know enough about dm-crypt or LUKS to say this is something
to be concerned about but it's something i noticed while fiddling around.

it does beg a more fundamental question— why is dm-crypt even there? i
don't remember installing it.

any help would be greatly appreciated.

wxl/walter