Overview

Request 910116 superseded

update grub2.sleep to fix hibernation

Loading...

Michael Chang's avatar
  1. Can you please make a reference to grub2-systemd-sleep.sh in grub2.changes or the factory check bot might complain that it is changed but not mentioned.

  2. I'd like to verify the change on tumbleweed but is not fruitful. I have read in bsc#1184804 but didn't find how to do it. Also installing kernel-default from Kernel:stable didn't help either.

https://software.opensuse.org/download/package?package=kernel-default&project=Kernel%3Astable

Would you please share the info how to setup for testing ? Thanks.


Stefan Seyfried's avatar
author target maintainer
strolchi:~ # /usr/lib/systemd/system-sleep/grub2.sleep pre hibernate
INFO: running /usr/lib/systemd/system-sleep/grub2.sleep for hibernate
INFO: Running prepare-grub ..
  Skipping openSUSE Tumbleweed Memtest, because it has no root= option
WARNING: no kernelfile matching the running kernel found
running kernel: '5.14.0-rc4-3.g1c88b51-default', probably booting kernel: '../usr/lib/modules/5.14.0-rc4-3.g1c88b51-default/vmlinuz'
ERROR: kernel version mismatch, cannot suspend to disk
strolchi:~ # echo $?
1

That's an easy way to test on Factory / Tumbleweed (I'm using the Kernel:HEAD kernel) I'm not sure if this prevents suspension and cannot test right now as this kernel is broken wrt hibernation :-), but it certainly prevents the main feature of grub2.sleep, the auto-selection of the running kernel, to work.

with my updated version:

# bash grub2-systemd-sleep.sh pre hibernate
INFO: running grub2-systemd-sleep.sh for hibernate
INFO: Running prepare-grub ..
  Skipping openSUSE Tumbleweed Memtest, because it has no root= option
  running kernel is grub menu entry openSUSE Tumbleweed, with Linux 5.14.0-rc4-3.g1c88b51-default (vmlinuz-5.14.0-rc4-3.g1c88b51-default)
  preparing boot-loader: selecting entry openSUSE Tumbleweed, with Linux 5.14.0-rc4-3.g1c88b51-default, kernel /boot/5.14.0-rc4-3.g1c88b51-default
  running /usr/sbin/grub2-once "openSUSE Tumbleweed, with Linux 5.14.0-rc4-3.g1c88b51-default"

WARNING: Detected GRUB environment block on lvm device
openSUSE Tumbleweed, with Linux 5.14.0-rc4-3.g1c88b51-default will remain the default boot entry until manually cleared with:
    grub-editenv /boot/grub2/grubenv unset next_entry

    time needed for sync: 0.0 seconds, time needed for grub: 0.7 seconds.
INFO: Done.

Michael Chang's avatar

Yes, Kernel:Head does work for me. Thanks a lot for the info. :)


Request History
Stefan Seyfried's avatar

seife created request

update grub2.sleep to fix hibernation


Stefan Seyfried's avatar

seife superseded request

superseded by 910700

openSUSE Build Service is sponsored by