I am using OpenSUSE Slowroll on a Dell XPS 9530 15" laptop and hibernation does not work.
I think the issue may have something to do with my NVIDIA drivers.
In “Power Management” I have my laptop set to hibernate after 10 minutes of inactivity.
Whether I choose to Hibernate from the start menu, or whether I leave my laptop running on battery power for 10 minutes, I get the following output when the system is attempting to hibernate:
If I chose Hibernation from the start menu, my laptop shuts down successfully. But, when I turn the laptop back on, my system does not recover from hibernation; none of my programs or documents are open; the system behaves as if it had been shut down.
If the hibernation begins automatically after 10 minutes of inactivity on battery the system never shuts down and the output I showed you stays on the screen until the laptop runs out of battery.
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
set btrfs_relative_path="y"
export btrfs_relative_path
if [ -f ${config_directory}/grubenv ]; then
load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${env_block}" ] ; then
set env_block="(${root})${env_block}"
export env_block
load_env -f "${env_block}"
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
if [ "${env_block}" ] ; then
save_env -f "${env_block}" next_entry
fi
set boot_once=true
else
set default="${saved_entry}"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
if [ "${env_block}" ] ; then
save_env -f "${env_block}" saved_entry
else
save_env saved_entry
fi
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
font="/usr/share/grub2/unicode.pf2"
fi
if loadfont $font ; then
if [ "${grub_platform}" = "efi" ]; then
echo "Please press 't' to show the boot menu on this console"
fi
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
for i in gfxterm; do
if [ x${use_append} = xtrue ]; then
terminal_output --append $i
elif terminal_output $i; then
use_append=true;
fi
done
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
insmod gfxmenu
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
insmod png
set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
export theme
if [ x${boot_once} = xtrue ]; then
set timeout=0
elif [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=8
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=8
fi
if [ -n "$extra_cmdline" ]; then
menuentry "Help on bootable snapshot #$snapshot_num" {
echo "Select the default entry of the snapshot boot menu."
echo "Examine the snapshot, and if it's OK,"
echo " run 'snapper rollback' and reboot."
echo "See 'System Rollback by Booting from Snapshots'"
echo " in the manual for more information."
echo " ** Hit Any Key to return to boot menu ** "
read
}
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/00_tuned ###
### BEGIN /etc/grub.d/05_crypttab ###
crypttab_entry cr_nvme-eui.0025384141427cf4-part2 f6de00861c0b448b9e75549ce0c1a851 none
### END /etc/grub.d/05_crypttab ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE Tumbleweed-Slowroll' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
echo 'Loading Linux 6.10.5-1-default ...'
linux /boot/vmlinuz-6.10.5-1-default root=/dev/mapper/system-root ${extra_cmdline} splash=silent resume=/dev/system/swap mitigations=auto quiet security=apparmor
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-6.10.5-1-default
}
submenu 'Advanced options for openSUSE Tumbleweed-Slowroll' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
menuentry 'openSUSE Tumbleweed-Slowroll, with Linux 6.10.5-1-default' --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.10.5-1-default-advanced-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
echo 'Loading Linux 6.10.5-1-default ...'
linux /boot/vmlinuz-6.10.5-1-default root=/dev/mapper/system-root ${extra_cmdline} splash=silent resume=/dev/system/swap mitigations=auto quiet security=apparmor
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-6.10.5-1-default
}
menuentry 'openSUSE Tumbleweed-Slowroll, with Linux 6.10.5-1-default (recovery mode)' --hotkey=3 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.10.5-1-default-recovery-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
echo 'Loading Linux 6.10.5-1-default ...'
linux /boot/vmlinuz-6.10.5-1-default root=/dev/mapper/system-root single ${extra_cmdline}
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-6.10.5-1-default
}
menuentry 'openSUSE Tumbleweed-Slowroll, with Linux 6.10.3-1-default' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.10.3-1-default-advanced-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
echo 'Loading Linux 6.10.3-1-default ...'
linux /boot/vmlinuz-6.10.3-1-default root=/dev/mapper/system-root ${extra_cmdline} splash=silent resume=/dev/system/swap mitigations=auto quiet security=apparmor
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-6.10.3-1-default
}
menuentry 'openSUSE Tumbleweed-Slowroll, with Linux 6.10.3-1-default (recovery mode)' --hotkey=1 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.10.3-1-default-recovery-96f5b121-cbf3-443f-9064-64d4f1d3e4f9' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod btrfs
cryptomount -u f6de00861c0b448b9e75549ce0c1a851
set root='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/aYM2R5-zJLf-xFhJ-Of61-KJ2h-s7sd-2Ny4rj/PuwAZo-DqzA-6ZnU-ouQX-sx9K-Di0h-rwfY5l' 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
else
search --no-floppy --fs-uuid --set=root 96f5b121-cbf3-443f-9064-64d4f1d3e4f9
fi
echo 'Loading Linux 6.10.3-1-default ...'
linux /boot/vmlinuz-6.10.3-1-default root=/dev/mapper/system-root single ${extra_cmdline}
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-6.10.3-1-default
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme1n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-8639-66AD' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 8639-66AD
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup --is-supported
if [ "$?" = 0 ]; then
fwsetup
else
echo "Your firmware doesn't support setup menu entry from a boot loader"
echo "Press any key to return ..."
read
fi
}
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###
btrfs-mount-subvol ($root) /.snapshots @/.snapshots
if [ -f "/.snapshots/grub-snapshot.cfg" ]; then
source "/.snapshots/grub-snapshot.cfg"
fi
### END /etc/grub.d/80_suse_btrfs_snapshot ###
### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
##
Could you do the following?
First run systemctl hibernate. Based on your description, the system should turn off. Then, turn it on again and run the following five commands:
If I do “systemctl hibernate” I get the output shown in my original post however the system does not shut down. It just sits there so I need to do a hard shutdown with the power button. If this is the case, should I still run those five commands?
I wouldn’t expect a difference between system menu hibernate button and systemctl hibernate.
Do all of that and let’s see if some evidence show up in log.
# change hibernation mode to shutdown
# the platform mode can have issues handing over to BIOS/UEFI
echo 'shutdown' > /sys/power/disk
# verify change (shutdown should be enclosed in square brackets)
cat /sys/power/disk
# hibernate using
systemctl hibernate
# or
echo 'disk' > /sys/power/state
I made the change after first using the “su” command (this was the only way I could get permission to change /sys/power/disk). I verified the change also. I hibernated using ‘systemctl hibernate’ and the system did shut down but nothing was restored when I restarted; none of my programs or documents were still open. Now when I do ‘cat /sys/power/disk’ I no longer see those changes; shutdown is no longer enclosed in square brackets. If I leave my laptop on battery, it will now shutdown successfully however when I restart none of my programs or documents are open.
Sorry, forgot to mention. You need to be root to write/modify those variables.
Preferably using sudo -i or if using su using su -l to clear out the current user’s environment variables.
This is expected as we did not persist the runtime changes by writing to those pseudo files. See man 5 sysctl.d.
This could be due to some error saving the contents of RAM to disk or less likely restoring from it.
Make sure your swap partition is at least 1.1x the size of your RAM.
Provide output of cat /proc/cmdline. There should be a resume parameter pointing to your swap partition.
Get the logs from the current and last boot using:
As far as #1: I don’t think I even have a swap partition. I didn’t think I would need one since I have 64 GB of RAM, because the system wouldn’t need to swap. Do I need a swap partition to hibernate? I thought it could be written to a file. Maybe I’m just short of empty disk space.
Swap is needed to hibernate and can be in file. I guess you used the guided partitioning during installation and marked the option to expand swap. You only need swap enough to save the in memory data.
Try to add to add the parameter nvidia_drm.modeset=1 to Kernel. You can do it through YaST > Bootloader > Kernel parameters. Reboot and test hibernation.
I should have enough disk space for what is in memory. The reason I didn’t make a SWAP partition is because the OS would never need to do paging considering system has 64 GB of RAM.
I added this expression to “Optional Kernel Command Line Parameter” and when it was there the system would not shut down during hibernate; I had to do a hard shutdown by pressing the power button. I confirmed this 3 times. When I removed the expression the system was able to shut down properly during hibernation.
Either way, the restoration of programs and documents on startup still does not work.