I can't hibernate with 12.3 - efi boot

Hi,

    Maybe someone can point me to a solution to my problem.
    Hibernation is very needed for me. I just installed openSuse     12.3 in my Lenovo P400 under efi boot, in fact I am using grub2-efi as a boot loader.
    At the sequence Kickoff launcher --> leave --> hibernate     button, I get just a logout screen.
    Lowering the lid puts the computer at suspend2ram, as is     configured at energy saving settings.

    I looked around in the internet and the closest I got was to     look at /boot/grub2-eif (which is linked to /boot/grub2) in which I     have the file "grub.cfg", in which I have the line

"
linuxefi /boot/vmlinuz-3.7.10-1.1-desktop     root=UUID=495a2d4d-48f5-40bc-b5ec-48bedb269fa3 ro  showopts apm=off     noresume edd=off powersaved=off nohz=off highres=off     processor.max_cstate=1 nomodeset x11failsafe
 "

    I am not sure whether the "noresume" term in this line might be     the culprit for me not to be able to hibernate. Is it OK to change     this file? What to?

    Advice welcome.

J.

This is just another reason you should stick with a MBR boot disk. You always can use a second or third hard disk as GPT formatted and still keep the boot hard disk as MBR. i feel an efi boot, unless required due to some Windows dual boot setup, you need to stick with MBR and avoid problems as can occur trying to use Hibernation.

If you need Hibernation, you need to use an MBR boot disk.

Thank You,

Very likely, yes. Did you install without swap? Normally the swap partition is used for hibernation, and the “resume=” parameter points to that.

I am very much doubting that advice.

I admit that I have not used hibernation on my UEFI box. But it should work the same way with grub2-efi as with grub2 in MBR. The details of hibernate/resume are handled by the kernel, not by grub.

First, I have avoided using efi, so direct experience has not been achieved by me. However, searches on the internet find all kinds of Hibernation not working problems with efi booting enabled. And as a user, surely, you need to be smart enough to create a SWAP partition if you want to use Hibernation in Linux.

However, the real question is how do you help yourself using efi booting, unless you must do so? My advise is to use MBR booting, surely you will create a SWAP partition and then using existing features such as Hibernation in Linux should work. I do not doubt this recommendation to any user.

Thank You,

I have trouble making sense of that.

When I use MBR booting, the BIOS loads the boot sector into memory and jumps to it. The boot sector loads the grub code into memory and jumps to it. The grub code then loads linux.

When I use EFI booting, the BIOS loads the grub code from the EFI partition and jumps to it. The grub code then loads linux.

There’s no important difference that I can see, except that with EFI booting, full 64bit code is available, while with MBR booting, grub is started in 16bit mode.

I did look at “grub.cfg”. For my 12.3 install, it does use “noresume”. My best guess is that I put that there myself because I don’t use hibernation. But it’s possible that grub2-efi is installed to not use “resume=”.

For my 13.1RC2 install with EFI, the “grub.cfg” does have “resume=” properly set to the swap file system.

There is one other difference. Normally, the kernel is loaded with a grub “linux” command. With EFI and secure-boot, it is instead loaded with a “linuxefi” command, which starts the kernel at a different interface. I have no idea whether that affects hibernation.

Hey, its OK to not understand a point of view and in no way prevents us from helping others to use openSUSE. Booting up openSUSE takes up so little time in relation what we do in using it, that perhaps there is little importance on the subject. Switching to newer features such as efi are OK, but only if there is some real benefit. efi booting is new, may have numerious issues and not using it has little effect on the usefulness of running openSUSE, once the booting process has been completed. This is my main point on efi booting, but agreeing with me is in no way required.

I do enjoy a good discussion and you have provided that to me to day.

Thank You,

As nrickert has already suggested, make the necessary changes by editing the ‘GRUB_CMDLINE_LINUX_DEFAULT=’ with the required ‘resume=/dev/disk/by-…’ in /etc/default/grub, (don’t forget to remove noresume), then run

grub2-mkconfig -o /boot/grub2/grub.cfg

so that the changes are made for next boot.

Thank you guys for all the replies.
OK, I changed at /boot/grub2/grub.cfg the statement noresume to resume=/dev/disk/by-id/ata-ST1000LM024_HN-M101MBB_S2U5J9BD407412-part10 (which is my swap partition). Then, at running

grub2-mkconfig -o /boot/grub2/grub.cfg

I get

linux-aokd /boot/grub2# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.7.10-1.1-desktop
Found initrd image: /boot/initrd-3.7.10-1.1-desktop
  /dev/sdb: open failed: No medium found
  No volume groups found
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
done
linux-aokd /boot/grub2#

"

and at /boot/grub2/grub.cfg the statement resume=/dev/disk/by-id/ata-ST1000LM024_HN-M101MBB_S2U5J9BD407412-part10 comes back to noresume. Of course, I still cannot hibernate.
I find strange the “/dev/sdb …” output by the grub2-mkconfig command. My partitions, including the swap one, are all in /dev/sda. Any further hints?

J.

[quote="“iulek,post:9,topic:94711”]
Thank you guys for all the replies.
OK, I changed at /boot/grub2/grub.cfg the statement noresume to resume=/dev/disk/by-id/ata-ST1000LM024_HN-M101MBB_S2U5J9BD407412-part10 (which is my swap partition). Then, at running

grub2-mkconfig -o /boot/grub2/grub.cfg

There’s a comment in “grub.cfg” telling you to make changes in “/etc/default/grub” or a file in “/etc/grub.d” instead of in “grub.cfg”.

Any change in “grub.cfg” will be lost after “grub2-mkconfig” next updates it.

I get that on a computer where “/dev/sdb” is a sd card reader, and there is no card plugged in. It’s not a reason for concern.

OK, thank you, and sorry for the confusion. Now I went to /etc/default/grub and changed two (two needed?) lines

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent resume=/dev/disk/by-id/ata-ST1000LM024_HN-M101MBB_S2U5J9BD407412-part10"

AND

GRUB_CMDLINE_LINUX_RECOVERY="showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe"

to

GRUB_CMDLINE_LINUX_RECOVERY="showopts apm=off resume=/dev/disk/by-id/ata-ST1000LM024_HN-M101MBB_S2U5J9BD407412-part10 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe"

Then I ran

grub2-mkconfig -o /boot/grub2/grub.cfg

and YES, now I have a hibernation capable (configured) system. Pretty fine, many thanks. Though, some few (minor importance) details: i) hibernation seems to be so slow in this laptop, ii) I do not see progress (indicator) message while hibernating ( splash=silent ?), iii) at hibenating it first seems to go to the login screen and then it blanks while I think it is making compressions and recording (this takes a good time, much more than in my previous laptop, but I would abide to time for the sake of robustness) , iv) at resuming, after showing decompressing percentages, the screen gets blank and now one key stroke brings the login screen rather than to go directly to the session.
It would be nice to fine-tune the process, I appreciate advices, but maybe you could point me to some reading at to the lines I could give in /etc/default/grub and how they operate. Specially, I have doubts about the need for the " resume=…" string at the two positions.
Anyway, even not fine-tuned, manage to hibernate is a big gain for me.
Yours,

J.

Yes, that’s right.

Though, some few (minor importance) details: i) hibernation seems to be so slow in this laptop, ii) I do not see progress (indicator) message while hibernating ( splash=silent ?), iii) at hibenating it first seems to go to the login screen and then it blanks while I think it is making compressions and recording (this takes a good time, much more than in my previous laptop, but I would abide to time for the sake of robustness) , iv) at resuming, after showing decompressing percentages, the screen gets blank and now one key stroke brings the login screen rather than to go directly to the session.
It would be nice to fine-tune the process, I appreciate advices, but maybe you could point me to some reading at to the lines I could give in /etc/default/grub and how they operate. Specially, I have doubts about the need for the " resume=…" string at the two positions.
Anyway, even not fine-tuned, manage to hibernate is a big gain for me.
Yours,

J.

That’s been my experience with hibernation for several openSUSE versions, but it might have to do with how how much needs to be shifted to/from RAM. Others may be able to advise further.