Complete hibernation failure in 12.3

Hi,

I’m testing openSUSE 12.3 XFCE in a spare disk on my main computer. Almost everything works, but
there is something crucial that does not: hibernation.

Machine is

CPU: Core™2 Quad CPU Q9550 @ 2.83GHz
Memory Size: 8 GB
gfcard: nVidia G96 [GeForce 9500 GT]
driver: nouveau, drm.

AFAIK, either called from the xfce menu or from commandline in text mode (pm-hibernate), it appears
to go through the motions, but fails miserably to restore. In fact, I believe nothing is saved to
the swap, because pm-hibernate happens in 3 seconds.

My work partition takes about half a minute to hibernate.

I see in “/var/log/pm-suspend.log” that the hooks are run, except one. “/etc/pm/sleep.d/99at” runs,
but not “/etc/pm/sleep.d/05cosas”, no mention on the log. But that is a minor issue.

In my messages log, a normal halt/boot sequence goes like this:


> 2013-06-02T19:02:24.844337+02:00 rescate1 sshd[3693]: Received signal 15; terminating.
> 2013-06-02T19:02:24.844665+02:00 rescate1 systemd[1]: Stopped /etc/init.d/boot.local Compatibility.
> 2013-06-02T19:02:24.844946+02:00 rescate1 systemd[1]: Stopping Login Prompts.
> 2013-06-02T19:02:24.845574+02:00 rescate1 rsyslogd: [origin software="rsyslogd" swVersion="7.2.7" x-pid="1069" x-info="http://www.rsyslo
> g.com"] exiting on signal 15.
> 2013-06-02 19:02:24+02:00 - Halting the system now  =========================================== uptime:  19:02pm  up   0:08,  0 users,  load average: 0.09, 0.10, 0.07
> 2013-06-02 19:04:17+02:00 - Booting the system now  ================================================================================  Linux rescate1.site 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux
> 2013-06-02T19:04:17.282712+02:00 rescate1 rsyslogd: [origin software="rsyslogd" swVersion="7.2.7" x-pid="844" x-info="http://www.rsyslog.com"] start
> 2013-06-02T19:04:17.282935+02:00 rescate1 kernel:     0.000000] Initializing cgroup subsys cpuset
> 2013-06-02T19:04:17.282939+02:00 rescate1 kernel:     0.000000] Initializing cgroup subsys cpu


However, when I attempt to hibernate, I see this:


> 2013-06-02T20:00:01.639396+02:00 rescate1 /USR/SBIN/CRON[6191]: pam_unix(crond:session): session closed for user root
> 2013-06-02T20:02:24.794186+02:00 rescate1 systemd[1]: Starting Sleep.
> 2013-06-02T20:02:24.804959+02:00 rescate1 systemd[1]: Reached target Sleep.
> 2013-06-02T20:02:24.805326+02:00 rescate1 systemd[1]: Starting Hibernate...
> 2013-06-02T20:02:24.834189+02:00 rescate1 systemd-sleep[6270]: Hibernating system...
> 2013-06-02T20:02:24.962914+02:00 rescate1 network[6325]: redirecting to "systemctl --signal=9 kill network.service"
> 2013-06-02T20:02:27.702751+02:00 rescate1 kernel:  3145.119158] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff]
> 2013-06-02T20:02:27.702768+02:00 rescate1 kernel:  3145.119164] PM: Marking nosave pages: [mem 0xbff90000-0xffffffff]
> 2013-06-02T20:02:27.703647+02:00 rescate1 kernel:  3145.120341] PM: Basic memory bitmaps created
> 2013-06-02 20:03:42+02:00 - Booting the system now  ================================================================================  Li
> nux rescate1.site 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux
> 2013-06-02T20:03:42.526203+02:00 rescate1 rsyslogd: [origin software="rsyslogd" swVersion="7.2.7" x-pid="911" x-info="http://www.rsyslog
> .com"] start
> 2013-06-02T20:03:42.526221+02:00 rescate1 systemd[1]: Started Collect Read-Ahead Data.
> 2013-06-02T20:03:42.526296+02:00 rescate1 systemd[1]: Started Replay Read-Ahead Data.
> 2013-06-02T20:03:42.526298+02:00 rescate1 kernel:     0.000000] Initializing cgroup subsys cpuset
> 2013-06-02T20:03:42.526301+02:00 rescate1 systemd[1]: Starting Load Kernel Modules...


It does a normal boot after hibernate, not a restore.

The kernel line used is:


> 2013-06-02T20:03:42.526307+02:00 rescate1 kernel:     0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.7.10-1.11-desktop root=UUID=3f875e95-5323-4527-88bd-39bce605e6e9 resume=/dev/disk/by-label/aux_swap showopts splash=verbose console=tty1 loglevel=3

The partitions are correct:


> cer@rescate1:~> l /dev/disk/by-uuid/3f875e95-5323-4527-88bd-39bce605e6e9
> lrwxrwxrwx 1 root root 10 Jun  2 20:03 /dev/disk/by-uuid/3f875e95-5323-4527-88bd-39bce605e6e9 -> ../../sda1
> cer@rescate1:~> l /dev/disk/by-label/aux_swap
> lrwxrwxrwx 1 root root 10 Jun  2 20:03 /dev/disk/by-label/aux_swap -> ../../sda2
> cer@rescate1:~> su
> Password:
> rescate1:/home/cer # file -s /dev/sda1
> /dev/sda1: x86 boot sector, code offset 0x63
> rescate1:/home/cer # file -s /dev/sda2
> /dev/sda2: Linux/i386 swap file (new style), version 1 (4K pages), size 1048575 pages, LABEL=aux_swap, UUID=dcc14c11-aa74-4ac9-955f-efd34a8cdb10
> rescate1:/home/cer # exit
> cer@rescate1:~>
>
> cer@rescate1:~> cat /etc/fstab
> LABEL=aux_extrasys      /               ext4            acl,user_xattr          1 1
> LABEL=aux_swap          swap            swap            defaults                0 0
>
>         #/dev/mapper/cr_ata-ST2000DM001-1CH164_W1E4056F-part3   /data/aux       xfs     nofail                0 2
> /dev/mapper/cr_Aux_01   /data/aux       xfs             nofail                  1 6
>
> proc                 /proc                proc       defaults              0 0
> sysfs                /sys                 sysfs      noauto                0 0
> debugfs              /sys/kernel/debug    debugfs    noauto                0 0
> usbfs                /proc/bus/usb        usbfs      noauto                0 0
> devpts               /dev/pts             devpts     mode=0620,gid=5       0 0


....


> rescate1:~ # swapon --summary
> Filename                                Type            Size    Used    Priority
> /dev/sda2                               partition       4194300 0       -1



Mmm… swap is smaller than RAM. Should not be a problem, but it might be… :-?


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-02 20:30, Carlos E. R. wrote:

> Mmm… swap is smaller than RAM. Should not be a problem, but it might be… :-?

No, after changing to a big swap, problem remains the same.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-02 21:26, Carlos E. R. wrote:
> On 2013-06-02 20:30, Carlos E. R. wrote:
>
>> Mmm… swap is smaller than RAM. Should not be a problem, but it might
>> be… :-?
>
> No, after changing to a big swap, problem remains the same.

No ideas? Anybody?


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

You are probably getting no replies because you normally are solving problems harder than this one and no one wants to say anything. :wink:

You would need at least 8GB swap partition to hibernate, do you have that now or is it the 4GB as listed in your original post? You need swap size = or greater than RAM size for hibernation to work.

Have you checked the /var/log/pm-suspend.log for clues?

I would expect that in case of too small swap space system bails out and returns to normal. It was not my experience. Hibernation failed, but system became totally unusable and had to be power cycled.

suspend(hibernation)/resume problems are among the worst to debug.

I totally agree, I finally gave up with hibernation on my main pc here after some time with no results. I had problems where the eth0 would not come back to life and other things that I could never solve.

On 2013-06-03 20:06, anika200 wrote:
>
> You are probably getting no replies because you normally are solving
> problems harder than this one and no one wants to say anything. :wink:

Sigh… :slight_smile:

> You would need at least 8GB swap partition to hibernate, do you have
> that now or is it the 4GB as listed in your original post? You need
> swap size = or greater than RAM size for hibernation to work.

Yes, it is 10 GB now.

> Have you checked the /var/log/pm-suspend.log for clues?

Nothing there, the problem occurs later.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-03 20:56, anika200 wrote:
>
> arvidjaar;2562363 Wrote:
>>
>> suspend(hibernation)/resume problems are among the worst to debug.
>
> I totally agree, I finally gave up with hibernation on my main pc here
> after some time with no results. I had problems where the eth0 would not
> come back to life and other things that I could never solve.

It has been working reliably for me since I started using it about 10 years ago. Sometimes it worked
better, sometimes worse.

11.4 had problems, it crashed every 2nd or 3rd hibernation on this machine. On my laptop it crashed
differently, but it did. Interestingly, the laptop problem was solved the last week 11.4 went EOL,
and now it is working perfectly with 11.4 evergreen.

The desktop problem forced me to update to 12.1 with systemv, where it is still working reliably.
I’m testing 12.3 to upgrade to it, but no hibernation means I have to remain with 12.1, no upgrade
possible.

This is, I’m afraid, systemd to blame. Previously all this was handled by pm utils, now I don’t know
the mechanism. There is no config file, /etc/suspend.conf is missing, I can not adjust anything!

This machine has a serial port, I could tell the kernel to dump messages.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On 2013-06-02 20:30, Carlos E. R. wrote:
> Hi,
>
> I’m testing openSUSE 12.3 XFCE in a spare disk on my main computer. Almost everything works, but
> there is something crucial that does not: hibernation.

Problem solved.

The suspend package had been automatically and inadvertently removed when intentionally uninstalling
plymouth. Reinstalling suspend (and libply2, libply-splash-core2, and libply-boot-client2 as
dependencies) solved the problem, and hibernating is functioning.

Special thanks to Patrick Shanahan for the key info, to Cristian Rodríguez for some useful
information, and also indirectly to Malte Gell, because a post of him gave me ideas. All in the
factory mail list.


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

Not really.

I normally don’t hibernate. But I did test hibernation, and it didn’t work.

In my case, that was because I am using encrypted swap. However, I did have “initrd” in the last column of the “/etc/crypttab” entry, and decryption was being handled by the “initrd”. However, the order seemed wrong. It was telling the kernel where to find the resume data before it had asked for a crypto key. It is probably a bug in the “initrd” setup. I’m pretty sure that I have tested that in an earlier release. And perhaps it might have worked if I had not uninstalled “plymouth”.

Well, sorry, my ramblings won’t help with your problem. But you are not the only one for whom hibernation is not working.

On 2013-06-06 04:46, nrickert wrote:
>
> robin_listas;2562219 Wrote:
>> No ideas? Anybody?
>
> Not really.
>
> I normally don’t hibernate. But I did test hibernation, and it didn’t
> work.
>
> In my case, that was because I am using encrypted swap. However, I did
> have “initrd” in the last column of the “/etc/crypttab” entry, and
> decryption was being handled by the “initrd”. However, the order seemed
> wrong. It was telling the kernel where to find the resume data before
> it had asked for a crypto key. It is probably a bug in the “initrd”
> setup. I’m pretty sure that I have tested that in an earlier release.
> And perhaps it might have worked if I had not uninstalled “plymouth”.

You can create a test setup under vmplayer or vbox and try it there.

>
> Well, sorry, my ramblings won’t help with your problem. But you are
> not the only one for whom hibernation is not working.

Hey, look again, I posted how I got it solved :slight_smile:

(and plymouth is not installed, just some libraries)


Cheers / Saludos,

Carlos E. R.
(from oS 12.3 “Dartmouth” GM (rescate 1))

On Mon, 03 Jun 2013 20:20:42 GMT, “Carlos E. R.”
<robin_listas@no-mx.forums.opensuse.org> wrote:

>On 2013-06-03 20:56, anika200 wrote:
>>
>> arvidjaar;2562363 Wrote:
>>>
>>> suspend(hibernation)/resume problems are among the worst to debug.
>>
>> I totally agree, I finally gave up with hibernation on my main pc here
>> after some time with no results. I had problems where the eth0 would not
>> come back to life and other things that I could never solve.
>
>It has been working reliably for me since I started using it about 10 years ago. Sometimes it worked
>better, sometimes worse.
>
>11.4 had problems, it crashed every 2nd or 3rd hibernation on this machine. On my laptop it crashed
>differently, but it did. Interestingly, the laptop problem was solved the last week 11.4 went EOL,
>and now it is working perfectly with 11.4 evergreen.
>
>The desktop problem forced me to update to 12.1 with systemv, where it is still working reliably.
>I’m testing 12.3 to upgrade to it, but no hibernation means I have to remain with 12.1, no upgrade
>possible.
>
>This is, I’m afraid, systemd to blame. Previously all this was handled by pm utils, now I don’t know
>the mechanism. There is no config file, /etc/suspend.conf is missing, I can not adjust anything!
>
>
>This machine has a serial port, I could tell the kernel to dump messages.

So you can really understand why i locked up on 11.1 waiting for KDE4 to
settle down. Guess what, i still prefer KDE3. guess i will only be
moving up to 12.1 mostly.

?-)

On 2013-06-09 10:59, josephkk wrote:
> On Mon, 03 Jun 2013 20:20:42 GMT, “Carlos E. R.” <> wrote:

> So you can really understand why i locked up on 11.1 waiting for KDE4 to
> settle down. Guess what, i still prefer KDE3. guess i will only be
> moving up to 12.1 mostly.
>
> ?-)

Didn’t you see the post where I said the issue was solved
satisfactorily? I’m using 12.3 now :slight_smile:

It was not systemd failure at all, just an spurious and misleading
message printed.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)