Can't hibernate in 12.3

When I hibernate it just freezes at a black screen indefinitely. This is a system76 laptop that I’ve run everything from debian wheezy to arch linux on, and hibernate works with no fuss on all of them, whether its older distros that use pm-utils to hibernate, or newer distros like fedora/arch that use systemd to hibernate. I have an active and big enough swap partition to hibernate. Any reason why only suse can’t hibernate for me?

I have a pangolin preformance panp9 and I have to press the power button to wake it, but after a while of pressing and releasing it, it eventually comes out of hibernation. Sometimes it just needs something like the power to be removed or a flash drive to be inserted to give it a jolt of awakening.

after being less impatient I noticed it does hibernate, it just takes forever, over a minute at least, and the whole time the fan is blaring. I noticed suse seems to use s2disk which is probably the main difference from other distros which use plain pm-hibermate or systemctl-hibernate. Is there anyway to disable the extra s2disk stuff? It seems to be doing compression or something that takes forever. My swap partition is big enough to hibernate the whole session with no compression.

EDIT: I can fix the “fan blaring for a full minute” by using the “shutdown” option in the suspend.conf instead of “platform”. still takes a long time to hibernate, but at least it does it quietly.

https://en.opensuse.org/SDB:Suspend_to_disk tells us the process that is undergone:
tell the kernel to create a snapshot of the current system state
read the snapshot data from the kernel and write it to disk
power off the machine
after a basic system boot, before (!) mounting any partitions, resume runs from the initrd
it reads the snapshot data from the disk and writes it to the kernel
it tells the kernel to restore the snapshot
the kernel returns at the place it was before suspend

In my opinion, just edit /var/lib/s2disk.conf and /etc/suspend.conf
EDIT: It looks like you found one of them.

Yeah I’m gonna play around with disabling compression and see if that helps, should be able to figure it out from here :slight_smile:

The magic option was in suspend.conf was: threads = y

With that I was able to put shutdown mode back on platform and leave compression on. difference was totally night and day, at least 4x faster hibernate. hibernate is now working better/faster for me than it has in any distro!


## use threads for suspend? (default n)
## this hugely speeds up encryption and also compression on mulitcore machines
#threads = y

What are those threads here ? So this works on post pentium processor only ?

On 2013-03-19 03:26, bwat47 wrote:
>
> after being less impatient I noticed it does hibernate, it just takes
> forever, over a minute at least, and the whole time the fan is blaring.
> I noticed suse seems to use s2disk which is probably the main difference
> from other distros which use plain pm-hibermate or systemctl-hibernate.
> Is there anyway to disable the extra s2disk stuff? It seems to be doing
> compression or something that takes forever. My swap partition is big
> enough to hibernate the whole session with no compression.

If it were an older version, I would say that pm-hibernate calls s2disk
in the process. Now with systemd I don’t what the process is.

About compression, the setting was at “/etc/suspend.conf”:


## compression will often speed up suspend and resume (default y)
#compress = n

I don’t know if the file is used now; I have the feeling it is ignored.

I have seen problems in the past with very slow hibernation because the
kernel was saving thousands of very small chunks of memory to disk. That
was one particular problem I hit with this computer and 11.4, but I do
not have that problem on another computer and the same version.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

suspend.conf definitely still seems to be used. this is a clean install of the latest opensuse 12.3. I had thought that I had read that suse 12.3 would use systemd to suspend/hibernate now, but looking at my pm-utils log its definitely still using pm-hibernate and s2disk for hibernate. And when I make changes to suspend.conf it definitely made a very noticeable difference (in addition to using threads=y which very noticeably sped up my hibernate, I used splash=n which got rid of a splash screen error I was getting on hibernate, and now I’m seeing details about compression progress when I hibernate and resume, so its definitely respecting the conf file.)

Here’s my pm-suspend.log:

Initial commandline parameters: 
Tue Mar 19 02:03:00 EDT 2013: Running hooks for hibernate.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
hibernate initiated: Tue Mar 19 02:03:00 EDT 2013

Linux brandon-lemu4.site 3.7.10-1.1-desktop #1 SMP PREEMPT Thu Feb 28 15:06:29 UTC 2013 (82d3f21) x86_64 x86_64 x86_64 GNU/Linux
kernel command line: 'BOOT_IMAGE=/boot/vmlinuz-3.7.10-1.1-desktop root=UUID=5066ce1f-969f-48a4-a640-0507f35bfa6d resume=/dev/disk/by-uuid/d9737bbd-5e80-4e9a-b99d-2c193e9e1b97 splash=silent quiet showopts i915.i915_enable_fbc=0'
Module                  Size  Used by
fuse                   87139  3 
af_packet              39587  4 
bnep                   19702  2 
bluetooth             341895  7 bnep
cpufreq_conservative    13822  0 
cpufreq_userspace      13163  0 
cpufreq_powersave      12619  0 
snd_hda_codec_hdmi     40844  1 
acpi_cpufreq           19572  0 
mperf                  12668  1 acpi_cpufreq
coretemp               13394  0 
kvm_intel             136915  0 
kvm                   475491  1 kvm_intel
snd_hda_codec_via      50853  1 
snd_hda_intel          42034  3 
snd_hda_codec         147417  3 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel
snd_hwdep              13603  1 snd_hda_codec
arc4                   12616  2 
snd_pcm               110154  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
iwldvm                249890  0 
mac80211              598150  1 iwldvm
uvcvideo               84941  0 
videobuf2_core         35910  1 uvcvideo
snd_seq                69780  0 
crc32c_intel           12902  0 
ghash_clmulni_intel    13260  0 
aesni_intel            55441  2 
snd_timer              29371  2 snd_pcm,snd_seq
ablk_helper            13598  1 aesni_intel
cryptd                 16307  3 ghash_clmulni_intel,aesni_intel,ablk_helper
iTCO_wdt               13481  0 
lrw                    13287  1 aesni_intel
aes_x86_64             17256  1 aesni_intel
i2c_i801               22440  0 
mei                    79557  0 
serio_raw              13376  0 
iTCO_vendor_support    13719  1 iTCO_wdt
wmi                    19071  0 
videodev              129333  2 uvcvideo,videobuf2_core
r8169                  67643  0 
sr_mod                 22296  0 
lpc_ich                17062  0 
mfd_core               13436  1 lpc_ich
snd_seq_device         14498  1 snd_seq
iwlwifi               109256  1 iwldvm
xts                    12915  1 aesni_intel
gf128mul               14952  2 lrw,xts
cfg80211              218484  3 iwldvm,mac80211,iwlwifi
snd                    91489  15 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq,snd_timer,snd_seq_device
cdrom                  46688  1 sr_mod
videobuf2_vmalloc      13021  1 uvcvideo
videobuf2_memops       13645  1 videobuf2_vmalloc
joydev                 17378  0 
rfkill                 26530  5 bluetooth,cfg80211
sg                     36525  0 
battery                18769  0 
soundcore              15048  1 snd
ac                     13133  0 
microcode              35785  0 
snd_page_alloc         18711  2 snd_hda_intel,snd_pcm
rts_bpp               386662  0 
autofs4                42771  2 
i915                  605629  4 
drm_kms_helper         50840  1 i915
xhci_hcd              103975  0 
drm                   293115  5 i915,drm_kms_helper
thermal                18712  0 
i2c_algo_bit           13414  1 i915
video                  19401  1 i915
button                 13953  1 i915
processor              44950  1 acpi_cpufreq
thermal_sys            24957  3 thermal,video,processor
scsi_dh_hp_sw          12895  0 
scsi_dh_alua           17162  0 
scsi_dh_rdac           17409  0 
scsi_dh_emc            17259  0 
scsi_dh                14844  4 scsi_dh_hp_sw,scsi_dh_alua,scsi_dh_rdac,scsi_dh_emc

             total       used       free     shared    buffers     cached
Mem:       8085876    1517764    6568112          0      38112     672212
-/+ buffers/cache:     807440    7278436
Swap:      8191996          0    8191996


/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:

/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/02rtcwake hibernate hibernate:
rtcwake alarm not enabled in /etc/pm/config.d/rtcwake.config, doing nothing...

/usr/lib/pm-utils/sleep.d/02rtcwake hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/06autofs hibernate hibernate:
autofs.service - Automounts filesystems on demand
      Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/autofs.service


/usr/lib/pm-utils/sleep.d/06autofs hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/30s2disk-check hibernate hibernate:
INFO: checking for suspend-to-disk prerequisites...
  using userspace suspend method, temp. config file /var/lib/s2disk.conf
  setting resume device to /dev/sda3
  setting image size to 3725971660
  adding these parameters from /etc/suspend.conf:
    splash = n
    shutdown method = platform
    threads = y

/usr/lib/pm-utils/sleep.d/30s2disk-check hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/45pcmcia hibernate hibernate:
ejecting PCMCIA cards...

/usr/lib/pm-utils/sleep.d/45pcmcia hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:

/usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/50rcnetwork hibernate hibernate:

/usr/lib/pm-utils/sleep.d/50rcnetwork hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager hibernate hibernate:
Having NetworkManager put all interaces to sleep...Failed.

/usr/lib/pm-utils/sleep.d/55NetworkManager hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:

/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75ndiswrapper hibernate hibernate:

/usr/lib/pm-utils/sleep.d/75ndiswrapper hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/80acpi-fan hibernate hibernate:

/usr/lib/pm-utils/sleep.d/80acpi-fan hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/80videobios hibernate hibernate:

/usr/lib/pm-utils/sleep.d/80videobios hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:

/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:

/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:

/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95packagekit hibernate hibernate:

/usr/lib/pm-utils/sleep.d/95packagekit hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99Zgrub hibernate hibernate:
INFO: running prepare-grub
  Skipping grub entry #2, because it has the noresume option
  Skipping grub entry #3, because it has no root= option
  running kernel is grub menu entry 0 (vmlinuz-3.7.10-1.1-desktop)
  preparing boot-loader: selecting entry 0, kernel /boot/3.7.10-1.1-desktop
  grub-once:   saving original /boot/grub2/grubenv
  running '/usr/sbin/grub2-once 0'
    time needed for sync: 0.2 seconds, time needed for grub: 0.1 seconds.

/usr/lib/pm-utils/sleep.d/99Zgrub hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99info hibernate hibernate:

/usr/lib/pm-utils/sleep.d/99info hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:

/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
Tue Mar 19 02:03:01 EDT 2013: performing hibernate
INFO: using built-in quirks database from HAL.
INFO: S2RAM_OPTS from HAL quirks: ' '.

On 2013-03-19 05:36, bwat47 wrote:
>
> The magic option was in suspend.conf was: threads = y
>
> With that I was able to put shutdown mode back on platform and leave
> compression on. difference was totally night and day, at least 4x faster
> hibernate. hibernate is now working better/faster for me than it has in
> any distro!

Wow! :slight_smile:

I tried that option time ago: it crashed the machine. That’s why it is
disabled by default, because they can not guarantee it works for most
people.

If you look carefully at the logs, you will notice that there is a point
where all cpu nodes are disabled save the first one. Apparently the
activating of the swapped image has to be done with only one cpu running.

Ah, a last note: do not edit “/var/lib/s2disk.conf” yourself, it is
autogenerated.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

seems to work fine these days at least (at least on this machine), I’ve tested hibernation quite a few times since enabling it and its worked perfectly 100% of the time :slight_smile:

i had to disable the “early writeout” to make hibernate (suspend to disk) work again on 12.3 after update from tumbleweed

On 2013-03-23 16:36, tomtomme wrote:
>
> i had to disable the “early writeout” to make hibernate (suspend to
> disk) work again on 12.3 after update from tumbleweed

Where is that setting? I don’t remember ever seeing it. :-?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Where is that setting? I don’t remember ever seeing it. :-?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Check out /etc/suspend.conf. By default, it’s commented out

## start writing out the image early, before buffers are full.
## will most of the time speed up overall writing time (default y)
#early writeout = n
#

On 2013-03-24 05:26, deano ferrari wrote:
>
>>
>> Where is that setting? I don’t remember ever seeing it. :-?

> Check out /etc/suspend.conf. By default, it’s commented out

You are right, it is there. :-o

I did not notice it before.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I have never had to touch the default settings, so haven’t paid much attention to that file.

On 2013-03-24 20:36, deano ferrari wrote:
> I have never had to touch the default settings, so haven’t paid much
> attention to that file.

I always disable the splash setting. And I may increase loglevel. Once I
changed “shutdown method”.

Hibernation is flaky… sometimes it works, sometimes it doesn’t. And
the things we can do are limited.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I’ve always found hibernation/thawing to be a slow process anyway, (comparable to my normal boot/shutdown time). So, I can’t see any advantage over simply saving the desktop session and booting normally.

I do use suspend frequently though.

On 2013-03-24 21:16, deano ferrari wrote:
> I’ve always found hibernation/thawing to be a slow process anyway,
> (comparable to my normal boot/shutdown time). So, I can’t see any
> advantage over simply saving the desktop session and booting normally.
>
> I do use suspend frequently though.

Ah, but my experience is the contrary!

My desktop has several services running, it can takes two minutes to
boot. Then I have to log in, and start all the applications that I use,
which are a lot. If I was working on, say, libreoffice, I get back to
the same place opened. It can take me a full five minutes or more when
I halt/reboot.

Even in my laptop I find hibernation to disk faster than halting and
booting.

Suspending to ram I use if it works… in my laptop, it doesn’t, I had
problems with the mouse touchpad not working on restore (11.4). I think
it works fine with 12.3. Suspend to ram crashes my desktop.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)