After I hibernate, linux doesn't seem to notice I hibernated and does a normal boot

noamraph

New Member
Joined
Aug 27, 2020
Messages
3
Reaction score
1
Credits
30
Hi,
I have a Carbon X1 6th gen. I had Ubuntu 16.04, with hibernate working great. I now upgraded to 20.04 (through 18.04), and now going to hibernation seems fine, exactly like it were in 16.04, but when I power up, it seems like linux doesn't notice that I hibernated, and instead does a regular boot. How do I debug this?

I have an active swap partition (I checked - if I disable it, the "hibernate" button in xfce disappears). The linux argument line in grub includes "resume=/dev/nvme0n1p6", and /dev/nvme0n1p6 is indeed the swap partition.

I will appreciate any help. Thanks a lot!
Noam
 


perhaps you may have disabled hibernation. go to that link https://01.org/node/3721 and https://wiki.debian.org/Suspend perhaps it may help because debian and ubuntu has mostly similar commands.

Thanks! But hibernation is not disabled - it appears in the menu, and the first step (saving the state and shutting down) works fine. It's just when waking up it seems like it doesn't detect that it hibernated. If there's any specific setting you think of, I'll be happy to hear!
 
you can clear your confusion by let remaining some file or pdf open and then hibernate your PC and after few minute simply move your mouse . if PC has hibernated than your file will be open there by default.
 
I found a solution. I guess that the problem was that the nvme module (which allows using the SSD) wasn't loaded before resume was attempted. I created a script that performs these two commands at the beginning of the initramfs stage:
Code:
modprobe nvme
echo /dev/nvme0n1p6 > /sys/power/resume

(/dev/nvme0n1p6 is my swap partition).

To run this on every boot, I did this:
Code:
echo '#!/bin/sh
PREREQ=""
prereqs()
{
    echo "$PREREQ"
}

case $1 in
prereqs)
    prereqs
    exit 0
    ;;
esac

modprobe nvme
echo /dev/nvme0n1p6 > /sys/power/resume
' > /etc/initramfs-tools/scripts/init-top/myresume

chmod a+x /etc/initramfs-tools/scripts/init-top/myresume
update-initramfs -u

Now I have hibernate working again!
 

Members online


Top