Page 1 of 1

box can sleep but not hibernate (and could do both on natty)

Posted: Sun Aug 21, 2011 10:36 pm
by TomRoche
box can sleep but not hibernate (and could do both on natty)

Mostly my new LMDE box just works, except for a few annoyances. One is, it can sleep but not hibernate. Unfortunately lack of hibernation is a real problem for me, since my battery capacity is low and declining :-( The lack annoys all the more because the box hibernated successfully under Natty, so I'm pretty sure it's not a hardware problem. How to fix? FWIW

Code: Select all

me@it:~$ inxi -SMCI
System:    Host: it Kernel: 2.6.39-2-amd64 x86_64 (64 bit) Desktop Gnome 2.30.2 Distro: Linux Mint Debian Edition
Machine:   Mobo: System76 model: Pangolin Performance version: panp5 Bios: Phoenix version: 1.02.22 date: 04/06/2009
CPU:       Dual core Intel Core2 Duo CPU T6500 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4_1 ssse3)
           Clock Speeds: 1: 1200.00 MHz 2: 1200.00 MHz
Info:      Processes: 145 Uptime: 20 min Memory: 820.4/3933.9MB Client: Shell inxi: 1.7.23

me@it:~$ sudo blkid | fgrep 'swap'
/dev/sda3: UUID="0f0b27ab-50e2-44e8-a7d1-7af8242b0471" TYPE="swap"

me@it:~$ cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=0f0b27ab-50e2-44e8-a7d1-7af8242b0471

me@it:~$ sudo fgrep -ie 'swap' /etc/fstab
# /dev/sda3     swap    swap    sw      0       0
UUID=0f0b27ab-50e2-44e8-a7d1-7af8242b0471       swap    swap    sw      0       0

me@it:~$ sudo parted -l print
Model: ATA ST9250410AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  501MB   500MB   primary   ext4            boot
 2      501MB   20.5GB  20.0GB  primary   ext4
 3      20.5GB  29.5GB  9001MB  primary   linux-swap(v1)
 4      29.5GB  250GB   221GB   extended
 5      29.5GB  250GB   221GB   logical   ext4

me@it:~$ free
             total       used       free     shared    buffers     cached
Mem:       4028296    1204800    2823496          0      67068     311876
-/+ buffers/cache:     825856    3202440
Swap:      8790012          0    8790012
So it looks to me like I'm doing everything right:
  1. I have sizeof(swap) > 2*sizeof(RAM)
  2. the swap line in /etc/fstab looks correct
  3. /etc/fstab and /etc/initramfs-tools/conf.d/resume know the swap partition's UUID
But:
  1. suspend via Fn-F4: resumes normally
  2. suspend via Log Out Button: resumes normally
  3. suspend via `sudo pm-suspend`: resumes normally
  4. hibernate via `sudo pm-hibernate`: it shuts down (and more slowly than via `shutdown -PH now`), and then resumes like a cold boot :-(
What is wrong? Hibernation worked in natty ...

Re: box can sleep but not hibernate (and could do both on na

Posted: Mon Aug 22, 2011 1:32 am
by Dr.m0x
Whoa posted before reading properly.
Please ignore.

Re: box can sleep but not hibernate (and could do both on na

Posted: Fri Aug 26, 2011 1:23 pm
by secipolla
I don't know if it's the same thing, but what if you run

Code: Select all

$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate

Re: box can sleep but not hibernate (and could do both on na

Posted: Fri Aug 26, 2011 2:15 pm
by TomRoche
secipolla wrote:

Code: Select all

$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate
Unfortunately, same as
TomRoche wrote:hibernate via `sudo pm-hibernate`: it shuts down (and more slowly than via `shutdown -PH now`), and then resumes like a cold boot :-(
It seems like the box is trying to hibernate (I get the flashing cursor @ upper left, and the process is much slower than shutdown/halt), but it's either not writing before shutdown, or not restoring on poweron. Unfortunately I don't know how to debug this: suggestions appreciated. Again, what's most infuriating about this is, it hibernated in natty! So either something failed in the hardware in the past week or so, or it's a configuration problem.