Bug 590946

Summary: Desktop doesn't hibernate or suspend
Product: Red Hat Enterprise Linux 6 Reporter: Cia Watson <cia.watson>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: arozansk, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-01 10:26:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cia Watson 2010-05-11 03:36:21 UTC
Description of problem:
On shutdown menu of desktop installation, there's no option to suspend or hibernate. Using Power Management under screensaver to suspend system when inactive results in message that the system failed to hibernate and another message that it failed to suspend.

This is a desktop and not a laptop computer.

Version-Release number of selected component (if applicable):
kernel-2.6.32-19.el6.i686


How reproducible:
see below.

Steps to Reproduce:
1. Click on Power Management option under >system > preferences > screensaver
2. Select option to Put computer to sleep when inactive for (30 minutes)
3. Go away and return to find that while the screen blanked, there are 2 error messages. 
  
Actual results:
2 error messages displayed when return to computer and unblank screen: 
First one says: Power manager: sleep problem. your computer failed to hibernate. check the help file for common problems. Clicking on 'visit help page' brings up a non-existent web page.

The 2nd error message is identical to the first, except it says the computer failed to suspend, instead of hibernate.

Expected results:
Computer shuts down / hibernates / suspends after specified period of time.

Additional info:

Comment 2 RHEL Program Management 2010-05-11 04:38:38 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Matthew Garrett 2010-05-17 15:59:16 UTC
What does /sys/power/state contain on this machine?

Comment 4 Cia Watson 2010-05-21 03:31:01 UTC
Sorry I didn't check my gmail for a couple days. /sys/power/state contains:

standby  
[only] on RHEL v6 beta.

On Fedora 13 where hibernate works perfectly, it contains:
standby disk

Comment 5 RHEL Program Management 2010-07-15 14:28:12 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 6 Matthew Garrett 2010-09-28 16:07:14 UTC
Do you still see this with the current kernel?

Comment 7 Cia Watson 2010-09-30 01:17:26 UTC
Short answer, yes I do still see this with the current kernel-2.6.32-44.2.el6.i686.

The long answer is that there is an option to select hibernate when I shut down, but hibernate stopped working on Fedora (where it used to work) after I installed opensolaris with a zfs filesystem on the partition next to my swap partition.

Given the theory that having a zfs partition made hibernate stop working, I created a swap file, rather than using the swap partition; for the rhelv6 beta2 install, and added it to my fstab and from the output in top it appears to be active. When I select hibernate it appears to attempt to work (the desktop disappears and the hard disk spins a bit) but then the desktop reappears again and it never hibernates. It looks like it wrote something to the swap, output from top:
Swap:  4095992k total,     7836k used,  4088156k free,    62112k cached

Whereas there was previously 0k used of the swap. 

Here's other output if you want it:

cat /sys/power/state
standby disk

devkit-power --dump
Daemon:
  daemon-version:  014
  can-suspend:     no
  can-hibernate    yes
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:   no

Comment 8 Matthew Garrett 2010-09-30 02:25:12 UTC
Suspend to swapfile isn't supported.

Comment 9 Cia Watson 2010-09-30 15:16:02 UTC
Ok, if suspend to swapfile isn't supported I commented that line in fstab and uncommented /dev/sda2 as swap and did a swapoff and swapon /dev/sda2 and attempted the hibernate. It powered off ok, but it didn't resume to the desktop it just booted up as normal.

Comment 10 Matthew Garrett 2010-10-26 13:39:17 UTC
It's up to dracut to trigger the resume.

Comment 11 Harald Hoyer 2010-10-26 13:51:54 UTC
(In reply to comment #9)
> Ok, if suspend to swapfile isn't supported I commented that line in fstab and
> uncommented /dev/sda2 as swap and did a swapoff and swapon /dev/sda2 and
> attempted the hibernate. It powered off ok, but it didn't resume to the desktop
> it just booted up as normal.

what's the output of:

# blkid -p -o udev /dev/sda2
# fdisk -l /dev/sda

??

Comment 12 Cia Watson 2010-10-26 15:51:42 UTC
blkid -p -o udev /dev/sda2
ID_FS_LABEL=SWAP-sda2
ID_FS_LABEL_ENC=SWAP-sda2
ID_FS_UUID=8ecb1b4e-47d7-4a63-a328-bbd2c44f695a
ID_FS_UUID_ENC=8ecb1b4e-47d7-4a63-a328-bbd2c44f695a
ID_FS_VERSION=2
ID_FS_TYPE=swap
ID_FS_USAGE=other
ID_PART_TABLE_TYPE=dos

fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000767ea

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6375    51200000   83  Linux
/dev/sda2            6375        6885     4096000   82  Linux swap / Solaris
/dev/sda3   *        6886       25121   146480670   bf  Solaris
/dev/sda4           25122       60802   286601240    5  Extended
/dev/sda5           25122       31496    51200000   83  Linux
/dev/sda6           31497       34683    25599546   83  Linux
/dev/sda7           34684       43801    73240303+  83  Linux

And fwiw, rhel v6 beta2 is on /dev/sda5.

Comment 13 Harald Hoyer 2010-10-27 09:11:22 UTC
Does it help, if you put "resume=LABEL=SWAP-sda2" on the kernel command line?

Comment 14 Cia Watson 2010-11-01 00:43:59 UTC
Short answer:  No, and yes.

Longer answer: with the partitioning scheme shown above, it didn't resume even after adding the resume= statement on the kernel line in the menu.lst file. As I wasn't really using OpenSolaris (sda3) anymore, and still suspecting that the Solaris (ZFS) filesystem was part of the problem, I made copies of important stuff then deleted the partition. It now looks like:

fdisk -l /dev/sda

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6375    51200000   83  Linux
/dev/sda2            6375        6885     4096000   82  Linux swap / Solaris
/dev/sda4           25122       60802   286601240    5  Extended
/dev/sda5           25122       31496    51200000   83  Linux
/dev/sda6   *       31497       34683    25599546   83  Linux
/dev/sda7           34684       43801    73240303+  83  Linux

And now hibernate works just fine, with and without the resume= statement. I don't know if the proximity of the swap & Solaris partitions are what kept it from working or not. But now it's working, so feel free to close this bug report.

Comment 15 Harald Hoyer 2011-02-01 10:26:34 UTC
seems like the boot flag did the trick...