Bug 597595

Summary: System fails to hibernate
Product: [openSUSE] openSUSE 11.3 Reporter: Carlos Robinson <carlos.e.r>
Component: BasesystemAssignee: Rafael Wysocki <rjw>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: seife
Version: Milestone 5   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Screen shot of crashed machine when lid closes mentioned in previous comment

Description Carlos Robinson 2010-04-18 02:14:06 UTC
This is a compaq presario CQ61-330SS (SMOLT profile
<http://www.smolts.org/client/show/pub_2c303e01-12a6-44f6-8128-f8df1d7ce080>)

oS is 11.3 M5 i586 as x64 has been reported to be broken and not installable.

System hibernates to disk fine in 11.2, but fails completely and silenty (using pm-hibernate) in 11.3.M5



/var/log/pm-suspend.log contains this:

/usr/lib/pm-utils/sleep.d/99Zgrub hibernate hibernate:INFO: running prepare-grub
  Skipping grub entry #1, because it has the noresume option
  running kernel is grub menu entry 0 (vmlinuz-2.6.34-rc3-3-desktop)
  preparing boot-loader: selecting entry 0, kernel /boot/2.6.34-rc3-3-desktop
  grub-once:   running '/usr/sbin/grubonce 0'
Using entry #0: Desktop -- openSUSE 11.3 - 2.6.34-rc3-3
    time needed for sync: 0.9 seconds, time needed for grub: 0.0 seconds.
success.
/usr/lib/pm-utils/sleep.d/99info hibernate hibernate:not applicable.
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate:success.
Sun Apr 18 03:56:15 CEST 2010: performing hibernate
s2disk: Could not use the resume device (try swapon -a). Reason: No such device
Sun Apr 18 03:56:15 CEST 2010: Awake.
Sun Apr 18 03:56:15 CEST 2010: Running hooks for thaw
/usr/lib/pm-utils/sleep.d/99video thaw hibernate:success.


output of swapon -s:

Minas-Anor:~ # swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda5                               partition       6289412 0       -1
Minas-Anor:~ # 


message log contains this look at the ioctl line:

Apr 18 03:55:58 Minas-Anor console-kit-daemon[2215]: WARNING: Unable to open directory /etc/ConsoleKit/run-seat.d: Error opening directory '/etc/ConsoleKit/run-seat.d': No such file or directory
Apr 18 03:56:00 Minas-Anor console-kit-daemon[2215]: WARNING: Unable to open directory /etc/ConsoleKit/run-seat.d: Error opening directory '/etc/ConsoleKit/run-seat.d': No such file or directory
Apr 18 03:56:05 Minas-Anor console-kit-daemon[2215]: WARNING: Unable to open directory /etc/ConsoleKit/run-seat.d: Error opening directory '/etc/ConsoleKit/run-seat.d': No such file or directory
Apr 18 03:56:15 Minas-Anor kernel: [  701.832040] PM: Marking nosave pages: 0000000000002000 - 0000000000010000
Apr 18 03:56:15 Minas-Anor kernel: [  701.832044] PM: Marking nosave pages: 000000000009e000 - 0000000000100000
Apr 18 03:56:15 Minas-Anor kernel: [  701.832048] PM: Basic memory bitmaps created
Apr 18 03:56:15 Minas-Anor kernel: [  701.832073] snapshot_ioctl: ioctl '4004330a' is deprecated and will be removed soon, update your suspend-to-disk utilities
Apr 18 03:56:15 Minas-Anor kernel: [  701.856816] PM: Basic memory bitmaps freed
Apr 18 03:56:20 Minas-Anor console-kit-daemon[2215]: WARNING: Unable to open directory /etc/ConsoleKit/run-seat.d: Error opening directory '/etc/ConsoleKit/run-seat.d': No such file or directory


I also tried suspend to ram, it chrashes (locks hard) the machine.
Comment 1 Michal Vyskocil 2010-04-21 12:50:05 UTC
Is s2disk working?
Comment 2 Michal Vyskocil 2010-04-21 12:51:55 UTC
and also what's in your /var/lib/s2disk.conf
Comment 3 Carlos Robinson 2010-04-21 19:30:10 UTC
(In reply to comment #1)
> Is s2disk working?

No.

Minas-Anor:~ # s2disk 
s2disk: Could not stat the resume device file. Reason: No such file or directory
Minas-Anor:~ # cat  /var/lib/s2disk.conf
resume device = /dev/sda5
image size = 1842658099
# parameters taken from /etc/suspend.conf:
splash = n
Minas-Anor:~ # file -s /dev/sda5
/dev/sda5: Linux/i386 swap file (new style) 1 (4K pages) size 1572353 pages Label Swap
Minas-Anor:~ #
Comment 4 Michal Vyskocil 2010-04-22 10:17:34 UTC
please try s2disk --config /var/lib/s2disk.conf, this is what is called from pm-utils
Comment 5 Carlos Robinson 2010-04-22 18:59:31 UTC
(In reply to comment #4)
> please try s2disk --config /var/lib/s2disk.conf, this is what is called from
> pm-utils

Same thing, does not work:

Minas-Anor:~ # s2disk --config /var/lib/s2disk.conf
s2disk: Could not use the resume device (try swapon -a). Reason: No such device
Minas-Anor:~ # swapon -s
Filename				Type		Size	Used	Priority
/dev/sda5                               partition	6289412	0	-1
Minas-Anor:~ # swapon -a
Minas-Anor:~ # swapon -s
Filename				Type		Size	Used	Priority
/dev/sda5                               partition	6289412	0	-1
Minas-Anor:~ # s2disk --config /var/lib/s2disk.conf
s2disk: Could not use the resume device (try swapon -a). Reason: No such device
Minas-Anor:~ # 
Minas-Anor:~ # cat /var/lib/s2disk.conf
resume device = /dev/sda5
image size = 1842658099
# parameters taken from /etc/suspend.conf:
splash = n
Minas-Anor:~ # 


I believe this was already in the text of the original report. Now please notice these messages in the log about the ioctl call being deprecated and update the utilities, could be related to this problem:   :-?

Apr 22 20:50:05 Minas-Anor kernel: [  476.228897] PM: Marking nosave pages: 0000000000002000 - 0000000000010000
Apr 22 20:50:05 Minas-Anor kernel: [  476.228902] PM: Marking nosave pages: 000000000009e000 - 0000000000100000
Apr 22 20:50:05 Minas-Anor kernel: [  476.228910] PM: Basic memory bitmaps created
Apr 22 20:50:05 Minas-Anor kernel: [  476.228936] snapshot_ioctl: ioctl '4004330a' is deprecated and will be removed soon, update your suspend-to-disk utilities
Apr 22 20:50:05 Minas-Anor kernel: [  476.254503] PM: Basic memory bitmaps freed
Apr 22 20:50:51 Minas-Anor kernel: [  522.142398] PM: Marking nosave pages: 0000000000002000 - 0000000000010000
Apr 22 20:50:51 Minas-Anor kernel: [  522.142401] PM: Marking nosave pages: 000000000009e000 - 0000000000100000
Apr 22 20:50:51 Minas-Anor kernel: [  522.142406] PM: Basic memory bitmaps created
Apr 22 20:50:51 Minas-Anor kernel: [  522.142424] snapshot_ioctl: ioctl '4004330a' is deprecated and will be removed soon, update your suspend-to-disk utilities
Apr 22 20:50:51 Minas-Anor kernel: [  522.167200] PM: Basic memory bitmaps freed
Comment 6 Michal Vyskocil 2010-04-23 07:54:01 UTC
Yes, sorry, I just wanted to be sure that a problem is not in pm-utils. Reassigning to the suspend maintainer.
Comment 7 Holger Macht 2010-04-29 10:48:06 UTC
Can you regenerate your swap partition? Something like

 $ swapoff -a
 $ mkswap /dev/sda5          #replace with your swap partition
 $ swapon -a

Any change?
Comment 8 Carlos Robinson 2010-04-29 15:40:25 UTC
(In reply to comment #7)
> Can you regenerate your swap partition? Something like
> 
>  $ swapoff -a
>  $ mkswap /dev/sda5          #replace with your swap partition
>  $ swapon -a
> 
> Any change?


I will try that in a few hours. Meanwhile, you should know that that machine has 11.2 on another partition, and it hibernates sucesfully using the same swap partition, several times a day. I very much doubt the partition is bad.


I also intend to download and install M6 x64 and install it, over the current factory partition, that currently has M5 -32 bit, this weekend. If you want me to run more tests in the 32 bit install you will have to speak up before Friday evening ;-)
Comment 9 Carlos Robinson 2010-04-29 19:08:42 UTC
(In reply to comment #7)
> Can you regenerate your swap partition? Something like
> 
>  $ swapoff -a
>  $ mkswap /dev/sda5          #replace with your swap partition
>  $ swapon -a
> 
> Any change?

No, as I expected.

Minas-Anor:~ # swapon -s
Filename				Type		Size	Used	Priority
/dev/sda5                               partition	6289412	0	-1
Minas-Anor:~ # swapoff /dev/sda5
Minas-Anor:~ # mkswap /dev/sda5
Setting up swapspace version 1, size = 6289412 KiB
no label, UUID=8b85d412-1c6c-44b4-ba1f-3ffbe9f3e1e5
Minas-Anor:~ # swapon -a
swapon: cannot find the device for LABEL=Swap
Minas-Anor:~ # mkswap --help
Usage: mkswap [-c] [-pPAGESZ] [-L label] [-U UUID] /dev/name [blocks]
Minas-Anor:~ # mkswap -L Swap /dev/sda5
Setting up swapspace version 1, size = 6289412 KiB
LABEL=Swap, UUID=675034b5-72ee-4db7-b8a4-d3cb197f9aad
Minas-Anor:~ # swapon -a
Minas-Anor:~ # s2disk 
s2disk: Could not stat the resume device file. Reason: No such file or directory
Minas-Anor:~ # 
Minas-Anor:~ # s2disk --config /var/lib/s2disk.conf
s2disk: Could not use the resume device (try swapon -a). Reason: No such device
Minas-Anor:~ #
Comment 10 Carlos Robinson 2010-04-29 19:42:40 UTC
I have just discovered, to my dismay, when posted in the factory mail list, that since at least last July support in the kernel for Intel graphics chipset has been broken and affects hibernation (and many more things). This is known and has been reported. 

I posted the SMOLT link in #0, and it is shown there that the laptop has an Intel chipset. It has a GM45.


That means, that unless you can confirm that my chipset is not affected, that 11.3 is totally useless for me in this machine. I can not continue testing in this situation.

  :-((
Comment 11 Holger Macht 2010-04-29 20:10:30 UTC
As a workaround for you to get hibernation to work, you could try to set /usr/lib/pm-utils/defaults:SLEEP_MODULE="kernel".
Comment 12 Carlos Robinson 2010-04-30 06:54:28 UTC
(In reply to comment #11)
> As a workaround for you to get hibernation to work, you could try to set
> /usr/lib/pm-utils/defaults:SLEEP_MODULE="kernel".

Same thing, no change. s2disk fails with same message, and closing the lid in gnome crashes (locks) the machine, with text mode messages (I will attempt to attach a photo in a moment).

If I close the lid while in text mode machine does not suspend to ram, it simply powers off the backlight, it seems (power led remains on, wifi led blinks).
Comment 13 Carlos Robinson 2010-04-30 07:09:38 UTC
Created attachment 358025 [details]
Screen shot of crashed machine when lid closes mentioned in previous comment
Comment 14 Holger Macht 2010-04-30 07:46:20 UTC
Rafael, any idea why the swap partition is considered broken?

Carlos, if you like, please report a separate bug for the LID close issue.
Comment 15 Carlos Robinson 2010-04-30 16:43:59 UTC
(In reply to comment #14)
> Rafael, any idea why the swap partition is considered broken?

In case it matters, fstab uses labels for swap (and grub, afaik). But error messages refers to std. device name.

Can anything be done to increase verbosity of logs? Kernel log is already at 7.


> Carlos, if you like, please report a separate bug for the LID close issue.

Done.

Bug 601462 - Laptop locks solid on close lid event
Comment 16 Rafael Wysocki 2010-04-30 20:01:46 UTC
That may be the problem fixed by this mainline commit:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d88d4050dcaf09e417aaa9a5024dd9449ef71b2e

It should be present in 2.6.32.y now, but I'm not sure about 2.6.31.y.
Comment 17 Holger Macht 2010-05-01 10:27:21 UTC
This bug is about openSUSE 11.3, which has 2.6.34-rc*.
Comment 18 Rafael Wysocki 2010-05-03 15:13:09 UTC
Commit d88d4050dcaf09e417aaa9a5024dd9449ef71b2e was merged between -rc4 and -rc5.

Carlos, what's the latest kernel you tested?
Comment 19 Carlos Robinson 2010-05-03 16:42:57 UTC
The one in milestone 6. Let me see... vmlinuz-2.6.34-rc3-3-desktop

I have about finished downloading the M6 x64 DVD (Build0577), I intend to install that over the current M5 install, to change arch (32 -> 64), unless you object (ie, unless you want me to run some tests).
Comment 20 Carlos Robinson 2010-05-14 07:37:14 UTC
(In reply to comment #19)
> The one in milestone 6. Let me see... vmlinuz-2.6.34-rc3-3-desktop

Oops. I should have said "M5", not "6".

> I have about finished downloading the M6 x64 DVD (Build0577), I intend to
> install that over the current M5 install, to change arch (32 -> 64), unless you
> object (ie, unless you want me to run some tests).

M6-x64 hibernates fine, it seems.
Comment 21 Carlos Robinson 2010-05-14 09:20:39 UTC
(In reply to comment #20)

> M6-x64 hibernates fine, it seems.

Just to mention that X display jumped from F7 to F8 after hbernation. F7 showed some suspend text
Comment 22 Rafael Wysocki 2010-05-14 21:45:11 UTC
(In reply to comment #21)
> (In reply to comment #20)
> 
> > M6-x64 hibernates fine, it seems.
> 
> Just to mention that X display jumped from F7 to F8 after hbernation. F7 showed
> some suspend text

That's probably because s2disk opens a new VT for printing its and the kernel's messages.  I'm not seeing this on my x86-64 test boxes, though.

Apart from this inconvenience, does it work correctly after resume?
Comment 23 Carlos Robinson 2010-10-04 19:44:47 UTC
Sorry, I forgot to follow up on this.

I have just run "zypper dup" on that test partition, so now it contains 11.3 GM, kernel 2.6.34.7-0.3-desktop.

It suspends (to ram) fine.

Hibernate (to disk) from the log-out menu of gnome... restores fine,, to VT-7, as it should. An ssh session to that machine, survived (ia wifi!)

Vt-8 has some text:

  s2disk: Snapshotting system
  s2disk: returned to userspace


The gnome "Power management" applet does not have any option to suspend or hibernate, as on previous editions.
Comment 24 Rafael Wysocki 2010-10-05 22:38:58 UTC
Well, it sounds like it works as expected as far as the kernel is concerned.

Is that correct?
Comment 25 Carlos Robinson 2010-10-05 23:35:01 UTC
Yes, it works.
It is a test partition, I don't use it often. As far as I can see, it works fine (in this respect).

I think you can close it as solved. Thanks.
Comment 26 Rafael Wysocki 2010-10-06 19:54:35 UTC
Great, closing.