12.2 won't hibernate.

Hello, I’m using opensuse 12.2 ( 3.4.11-2.16-desktop ) with GNOME 3.4.2.

When I try to hibernate with the option on gnome, my laptop goes black an then the login appears and go back to the desktop like noothing happened.

So I Try to do it on the terminal.


  # s2disk  s2disk: Could not stat the resume device file. Reason: No such file or directory

So I checed if my swap is right:


  # cat /proc/swaps Filename                                Type            Size    Used    Priority /dev/sda1                               partition       3040252 19332   -1

then I checked my grub


title Desktop -- openSUSE 12.2 - 3.4.11-2.16     root (hd0,1)     kernel /boot/vmlinuz-3.4.11-2.16-desktop root=/dev/disk/by-uuid/ceecc34b-5ca1-40a7-aad1-ba08af1c6734 resume=/dev/sda1 splash=silent quiet  video=1366x768 showopts vga=0x317     initrd /boot/initrd-3.4.11-2.16-desktop

And my s2disk.cnf


  # cat  /var/lib/s2disk.conf resume device = /dev/sda1 image size = 1293882163 # parameters taken from /etc/suspend.conf:

all looks fine. Don’t know that to do next to figure out how to solve this.

Sorry about my english.

Thanks!

On 2012-12-26 14:36, maniat1k wrote:

> Sorry about my english.

Your English is all right, but your code sections are wrapped. Check
your procedure:

View this
thread for instructions

Also, verify the actual kernel command line with this:


grep "Command line:" /var/log/messages | tail


Cheers / Saludos,

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

This is elaborate form of

cat /proc/cmdline

:stuck_out_tongue:

Could you show

cat /sys/power/resume

On 2012-12-26 17:06, arvidjaar wrote:
> This is elaborate form of
> Code:
> --------------------
> cat /proc/cmdline
> --------------------
> :stuck_out_tongue:

Ah, yes, it is :slight_smile:


Cheers / Saludos,

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

I never used hibernate on my Linux machine. After seeing this thread i hibernated and revived machine twice.
Worked flawlessly on Mantis/openSUSE 12.2/ 64 bit/ GNOME 3.4.2/Kernel 3.4.11-2.16 even on a 27.4 GB hardisk.
Things cannot be better.

@vazhavandan really really hate your comment lol!

anyway, here some extra info. thanks in advance.


~> cat /sys/power/resume
8:1

an this:


~> cat /proc/cmdline
root=/dev/disk/by-uuid/ceecc34b-5ca1-40a7-aad1-ba08af1c6734 resume=/dev/sda1 splash=silent quiet  video=1366x768 vga=0x317

On 2012-12-27 11:16, maniat1k wrote:

> Code:
> --------------------
>
> ~> cat /proc/cmdline
> root=/dev/disk/by-uuid/ceecc34b-5ca1-40a7-aad1-ba08af1c6734 resume=/dev/sda1 splash=silent quiet video=1366x768 vga=0x317
>
> --------------------

The only thing I do not like is that I would prefer sda1 replaced by
some uuid or id. Verify that partition is a swap partition (file -s
/dev/sda1), perhaps recreate it.

Is it big enough?


Cheers / Saludos,

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

you are right… will change it by uuid. But to me that no reason not to work… right?:sarcastic:

Don’t know what is enough… what do you thing? :\


# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xe430e430

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     6082559     3040256   82  Linux swap / Solaris
/dev/sda2   *     6082560    89841663    41879552   83  Linux
/dev/sda3        89841664   625141759   267650048   83  Linux


thanks again… :slight_smile:

On 2012-12-27 12:16, maniat1k wrote:

>
> you are right… will change it by uuid. But to me that no reason not
> to work… right?:sarcastic:

No, it should not be a reason, unless sda changes to sdb - which on some
systems can happen.

> robin_listas;2513693 Wrote:
>>
>> Is it big enough?
>
> Don’t know what is enough… what do you thing? :\

There is no straight answer. If your memory is ample enough (ie, you do
not use swap) then half the size of ram might work with compression, but
make it at least the size of ram. 1.2 times ram to be on the safe side.
If your system uses swap, the free size of swap should be at least as
big as ram or a bit more.

For instance, if your ram is 500M I would make swap about 4 GiB at
least. If it is 4GiB I would make it 6. Disk is cheap.


Cheers / Saludos,

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

3040256 block = 1.449707031 gigabyte according to Data Storage Conversion - FREE Unit Converter
Pretty small if you ask me

OK I changed the swap but still I does not work:

cat /proc/swaps Filename Type Size Used Priority /dev/sda1 partition 8259580 68 -1

s2disk s2disk: Could not stat the resume device file. Reason: No such file or directory

anyway searching aound do this in my terminal:

echo disk > /sys/power/state

This actually work, don’t know what to do next.

Ok I am new to this but have some observations. Do we know that s2disk and “echo disk > /sys/power/state” are all using the same program or config scripts? I also think that there must be some problem finding the resume file as the program itself states. Have you changed over your fstab and the pm-suspend and s2disk.conf to reflect the disk you are using via uuid? OpenSUSE by default itself uses some other device detection which is similar but not the same as uuid for block devices.

pm-suspend.log show everything ok when I do


pm-hibernate

but the reallity is that nothing happends, my machine crashes.
this is what my log show me.


Jan  9 08:39:01 acer kernel:     4.904512] PM: Hibernation image partition 8:1 present
Jan  9 08:39:01 acer kernel:     4.904523] PM: Looking for hibernation image.
Jan  9 08:39:01 acer kernel:     4.905057] PM: Image not found (code -22)
Jan  9 08:39:01 acer kernel:     4.905064] PM: Hibernation image not present or could not be loaded.
Jan  9 08:39:01 acer kernel:     4.905116] registered taskstats version 1
Jan  9 08:39:01 acer kernel:     4.906066]   Magic number: 13:284:628
Jan  9 08:39:01 acer kernel:     4.906271] rtc_cmos 00:05: setting system clock to 2013-01-09 10:37:02 UTC (1357727822)

but the reallity is that nothing happends, my machine crashes.

What, your machine crashes or nothing happens? From the logs you posted, It still seems to me a problem with finding the disks. Unless you have the same statements in fstab, pm-suspend.conf, s2disk.conf and also Grub, this will not work.
This is especially important if you have done any swaping of disks or re-partition or even some bios can change around the disk to confuse the system. The great thing about uuid is it relies on something when the partition gets formatted so it is always the same no matter where you move the disk or how much you re-partition. Of course, if you format the partition and put a mirror backup back on there, then even this would not work.

notice that have very diferent statements (I using UUID, ID, and sda1) that very horrible… will fix all to UUID…

I have a similar problem (well, not sure).

I get:

Trying manual resume from /dev/disk/by-id/ata-TOSHIBA_MQ01ABD050_828TT6A9T-part2
resume device /dev/disk/by-id/ata-TOSHIBA_MQ01ABD050_828TT6A9T-part2 not found (ignoring)

Suspend to disk seems to work, I see the percentages on the monitor and the drive is busy. After that, the computer powers off.
Everything as expected.

Then, it’s booting normally instead of resuming.
I have the above message in boot.log. And yes, the device it can’t find is the swap partition.

from fstab

/dev/disk/by-id/ata-TOSHIBA_MQ01ABD050_828TT6A9T-part2 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_MQ01ABD050_828TT6A9T-part3 /                    ext4       acl,user_xattr        1 1

Any idea what I could do?

Thank you.

On 2013-01-10 23:56, theo222 wrote:

> Then, it’s booting normally instead of resuming.
> I have the above message in boot.log. And yes, the device it can’t find
> is the swap partition.
>
> from fstab

No, the relevant part when booting is not fstab, but the kernel line in
grub. I have, for example, this: “resume=/dev/disk/by-label/Swap”.
That’s the part you should check.


Cheers/Saludos
Carlos E. R.

Thanks, this looks like:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE 12.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ffea3f18-1595-47b9-89b0-37913d32f5a1' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos3'
    if  x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd1,msdos3'  ffea3f18-1595-47b9-89b0-37913d32f5a1
    else
      search --no-floppy --fs-uuid --set=root ffea3f18-1595-47b9-89b0-37913d32f5a1
    fi
    echo    'Linux 3.4.11-2.16-default wird geladen …'
    linux    /boot/vmlinuz-3.4.11-2.16-default root=UUID=ffea3f18-1595-47b9-89b0-37913d32f5a1  ** resume=/dev/disk/by-id/ata-TOSHIBA_MQ01ABD050_828TT6A9T-part2** splash=verbose quiet showopts vga=0x31b
    echo    'Initiale Ramdisk wird geladen …'
    initrd    /boot/initrd-3.4.11-2.16-default
}

Does that address point to your swap?