익명 09:49

Hibernation not working in HP 15 gr0012au

Hibernation not working in HP 15 gr0012au

I am having a HP laptop with AMD ryzen 3 3250u processor and I installed ubuntu 26 LTS and I tried to add a hibernation device in the laptop using a swap file but what I am experiencing is that when I run the command sudo systemctl hibernate my screen goes blank for sometime and return back to the lockscreen, sometime it work for the first time and subsequent hibernate fails, I am pasting my configuration files

/etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p8 during curtin installation
/dev/disk/by-uuid/4c859583-daba-499b-9918-8bc642b14b80 / ext4 defaults 0 1
# /boot/efi was on /dev/nvme0n1p1 during curtin installation
/dev/disk/by-uuid/D6BC-8F6E /boot/efi vfat defaults 0 1
/swapfile none swap sw 0 0

/etc/default/grub

# If you change this file or any /etc/default/grub.d/*.cfg file,
# run 'update-grub' afterwards to update /boot/grub/grub.cfg.
# For full documentation of the options in these files, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`( . /etc/os-release && echo ${NAME} )`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=4c859583-daba-499b-9918-8bc642b14b80 resume_offset=169984"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE/GOP/UGA
# you can see them in real GRUB with the command `videoinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
findmnt -no UUID -T /swapfile
4c859583-daba-499b-9918-8bc642b14b80
sudo filefrag -v /swapfile | awk '$1=="0:" {print substr($4,1,length($4)-2)}'
169984

here is the result for the kernel command

journalctl --since today -p emerg..err
Jun 22 17:44:22 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP>
Jun 22 17:44:22 Zenbook kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20251212>
Jun 22 17:44:22 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:44:22 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:44:22 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:44:22 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:44:22 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:44:22 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:44:22 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:44:22 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:44:25 Zenbook systemd[1]: Failed to activate swap swapfile.swap - /swapfile.
Jun 22 17:44:26 Zenbook kernel: ACPI Error: No handler for Region [RCM0] (000000002bbd688e) [S>
Jun 22 17:44:26 Zenbook kernel: ACPI Error: Region SystemCMOS (ID=5) has no handler (20251212/>
Jun 22 17:44:26 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.ESDT due to previous err>
Jun 22 17:44:26 Zenbook kernel: ACPI Error: Aborting method \_SB.PCI0.LPC0.EC0._Q42 due to pre>
Jun 22 17:44:28 Zenbook systemd[1]: Failed to activate swap swapfile.swap - /swapfile.
Jun 22 17:44:29 Zenbook systemd[1]: Failed to activate swap swapfile.swap - /swapfile.
Jun 22 17:44:35 Zenbook kernel: 
Jun 22 17:44:35 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 17:44:35 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBC due to previous err>
Jun 22 17:44:35 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 17:44:35 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBE due to previous err>
Jun 22 17:44:41 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:41 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:42 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:42 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:42 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:42 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:43 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:44 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:45 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:46 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:46 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:46 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:47 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:47 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:47 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:47 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:49 Zenbook gdm-password][2992]: gkr-pam: unable to locate daemon control file
Jun 22 17:44:53 Zenbook systemd[3231]: Failed to start app-gnome-snap\x2duserd\x2dautostart-37>
Jun 22 17:44:56 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:56 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:57 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:44:58 Zenbook systemd[3231]: Failed to start snap.prompting-client.daemon.service - >
Jun 22 17:45:00 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:45:00 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:45:10 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:45:11 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:45:27 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:45:27 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:48:00 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:48:01 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:48:49 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:48:49 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:49:21 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:49:21 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:49:24 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:49:25 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:49:40 Zenbook gdm3[1640]: Gdm: Failed to list cached users: GDBus.Error:org.freedesk>
-- Boot 6222b8fdb133452c9a58e6ee5f5c0f39 --
Jun 22 17:50:01 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP>
Jun 22 17:50:01 Zenbook kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20251212>
Jun 22 17:50:01 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:50:01 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:50:01 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:50:01 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:50:01 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:50:01 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:50:01 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 17:50:01 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 17:50:01 Zenbook kernel: Failed to create device parport0
Jun 22 17:50:05 Zenbook kernel: ACPI Error: No handler for Region [RCM0] (00000000d3275a16) [S>
Jun 22 17:50:05 Zenbook kernel: ACPI Error: Region SystemCMOS (ID=5) has no handler (20251212/>
Jun 22 17:50:05 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.ESDT due to previous err>
Jun 22 17:50:05 Zenbook kernel: ACPI Error: Aborting method \_SB.PCI0.LPC0.EC0._Q42 due to pre>
Jun 22 17:50:14 Zenbook kernel: 
Jun 22 17:50:14 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 17:50:14 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBC due to previous err>
Jun 22 17:50:14 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 17:50:14 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBE due to previous err>
Jun 22 17:50:20 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:20 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:21 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:21 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:21 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:22 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:22 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:24 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:24 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:25 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:25 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:25 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:25 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:45 Zenbook gdm-password][3131]: gkr-pam: unable to locate daemon control file
Jun 22 17:50:51 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:51 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:52 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:52 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:54 Zenbook systemd[3204]: Failed to start snap.prompting-client.daemon.service - >
Jun 22 17:50:56 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:50:56 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:51:15 Zenbook systemd-sleep[5143]: Failed to put system to sleep. System resumed aga>
Jun 22 17:51:15 Zenbook kernel: PM: hibernation: Image allocation is 79836 pages short
Jun 22 17:51:15 Zenbook systemd[1]: Failed to start systemd-hibernate.service - System Hiberna>
Jun 22 17:51:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:51:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:51:34 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:51:35 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 17:51:51 Zenbook chronyd[1427]: Could not connect to [2620:2d:4002:1::3123]:4460 (4.ntp>
Jun 22 17:51:52 Zenbook chronyd[1427]: Could not connect to [2620:2d:4000:1::2123]:4460 (1.ntp>
Jun 22 12:28:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 12:28:26 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 12:28:31 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 12:28:32 Zenbook kernel: NVRM: No NVIDIA GPU found.
Jun 22 12:43:13 Zenbook systemd-sleep[9679]: Failed to put system to sleep. System resumed aga>
Jun 22 12:43:13 Zenbook kernel: PM: hibernation: Image allocation is 116000 pages short
Jun 22 12:43:13 Zenbook systemd[1]: Failed to start systemd-hibernate.service - System Hiberna>
-- Boot f38d6bb7801c425387f1a8e9dbed4398 --
Jun 22 12:55:39 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP>
Jun 22 12:55:39 Zenbook kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20251212>
Jun 22 12:55:39 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 12:55:39 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 12:55:39 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 12:55:39 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 12:55:39 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 12:55:39 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 12:55:39 Zenbook kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.WLBU._ST>
Jun 22 12:55:39 Zenbook kernel: ACPI Error: Aborting method \_SB.WLBU._STA due to previous err>
Jun 22 12:55:43 Zenbook kernel: ACPI Error: No handler for Region [RCM0] (000000003573ea84) [S>
Jun 22 12:55:43 Zenbook kernel: ACPI Error: Region SystemCMOS (ID=5) has no handler (20251212/>
Jun 22 12:55:43 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.ESDT due to previous err>
Jun 22 12:55:43 Zenbook kernel: ACPI Error: Aborting method \_SB.PCI0.LPC0.EC0._Q42 due to pre>
Jun 22 12:55:51 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 12:55:51 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBC due to previous err>
Jun 22 12:55:51 Zenbook kernel: ACPI BIOS Error (bug): Attempt to CreateField of length zero (>
Jun 22 12:55:51 Zenbook kernel: ACPI Error: Aborting method \_SB.WMID.WQBE due to previous err>
Jun 22 12:56:00 Zenbook chronyd[1458]: Could not connect to [2620:2d:4002:1::3123]:4460 (4.ntp>
Jun 22 12:57:43 Zenbook gdm-password][3020]: gkr-pam: unable to locate daemon control file
Jun 22 12:57:51 Zenbook systemd[3095]: Failed to start snap.prompting-client.daemon.service - >
Jun 22 12:58:16 Zenbook kernel: PM: hibernation: Image allocation is 83357 pages short
Jun 22 12:58:16 Zenbook systemd-sleep[4989]: Failed to put system to sleep. System resumed aga>
Jun 22 12:58:17 Zenbook systemd[1]: Failed to start systemd-hibernate.service - System Hiberna>
free
               total        used        free      shared  buff/cache   available
Mem:         5479732     3315900      944936      138456     1614868     2163832
Swap:       16777212       42820    16734392
sudo swapon --show
NAME      TYPE SIZE   USED PRIO
/swapfile file  16G 925.1M   -1
ls -lha /dev/disk/by-uuid
total 0
drwxr-xr-x  2 root root 160 Jun 28 22:19 .
drwxr-xr-x 12 root root 240 Jun 28 22:19 ..
lrwxrwxrwx  1 root root  10 Jun 28 22:19 15cf6fe2-efa4-47b6-9adc-bb279ca2ef48 -> ../../sda4
lrwxrwxrwx  1 root root  10 Jun 28 22:19 28D6-4C0F -> ../../sda3
lrwxrwxrwx  1 root root  15 Jun 28 22:19 4E4A61734A61592B -> ../../nvme0n1p2
lrwxrwxrwx  1 root root  10 Jun 28 22:19 8E5A33945A337853 -> ../../sda2
lrwxrwxrwx  1 root root  15 Jun 28 22:19 C260-A33D -> ../../nvme0n1p1
lrwxrwxrwx  1 root root  10 Jun 28 22:19 b8cfc018-6aa3-407c-bae8-4c7f643c146d -> ../../sda5
df
Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs            1200800     5032   1195768   1% /run
/dev/sda4       54822144 34869628  17135236  68% /
tmpfs            3002000    39544   2962456   2% /dev/shm
efivarfs             160       87        69  56% /sys/firmware/efi/efivars
none                1024        0      1024   0% /run/credentials/systemd-journald.service
none                1024        0      1024   0% /run/credentials/systemd-resolved.service
tmpfs            3002000      348   3001652   1% /tmp
/dev/sda3        1046508     6452   1040056   1% /boot/efi
tmpfs             600400      100    600300   1% /run/user/1000
sudo blkid
/dev/nvme0n1p1: UUID="C260-A33D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="ae7b16d0-eb14-47e7-9a6c-4b9e75b0af67"
/dev/nvme0n1p2: BLOCK_SIZE="512" UUID="4E4A61734A61592B" TYPE="ntfs" PARTUUID="f6b6807e-f516-4383-a17b-600f9967e2f9"
/dev/sda2: LABEL="Directory" BLOCK_SIZE="512" UUID="8E5A33945A337853" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="59c46e43-2a47-437e-9b29-917a7baebede"
/dev/sda3: LABEL_FATBOOT="BOOT" LABEL="BOOT" UUID="28D6-4C0F" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="BOOT" PARTUUID="588b1594-4bd0-44f9-922d-0f5b0ca8a030"
/dev/sda4: LABEL="ROOT" UUID="15cf6fe2-efa4-47b6-9adc-bb279ca2ef48" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="ROOT" PARTUUID="ae5cab5c-3514-494c-99f8-7acbb7710d44"
/dev/loop1: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop17: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop8: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop15: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop6: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop13: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop4: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop11: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop2: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop9: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop16: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop7: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop14: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop5: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop12: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop3: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop10: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="236f1e99-7832-4089-9411-4dfdbeb10e8b"


Top Answer/Comment:

I am not sure exactly how your system currently boots as details of the UUIDs currently don't match what is in the fstab.

All of the following is based on data supplied in your original question. ALL THESE CHANGES ARE AT YOUR OWN RISK.

Note: There are many ways to create the swap but you must ensure it is contiguous to allow a large file to install in it.

First make sure you have a method to reverse any changes such as and system install/try USB.


Firstly, change the /etc/fstab to reflect the current UUID of the root file system. So change...

/dev/disk/by-uuid/4c859583-daba-499b-9918-8bc642b14b80 / ext4 defaults 0 1

to

/dev/disk/by-uuid/15cf6fe2-efa4-47b6-9adc-bb279ca2ef48 / ext4 defaults 0 1

Check the system will boot successfully.

If not successful restore the original fstab and abandon the rest of this instruction


If successful then...

Check the UUID of the disk that contains your swap.

findmnt -no UUID -T /swapfile

This should now report 15cf6fe2-efa4-47b6-9adc-bb279ca2ef48 I think it reads if from the fstab so you have set this earlier.

Find the offset of your swap file on your root drive (where your swap resides) with the following: -

sudo filefrag -v /swapfile

This is the physical offset from the start of the root disk. It is likely to be the fourth number on the first number line.

Your original awk filter should still work here.

sudo filefrag -v /swapfile | awk '$1=="0:" {print substr($4,1,length($4)-2)}'

The number might well be the same if you haven't remade the swap and/or the two UUIDs are is someway the same.

Edit /etc/default/grub

Change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=4c859583-daba-499b-9918-8bc642b14b80 resume_offset=169984"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=15cf6fe2-efa4-47b6-9adc-bb279ca2ef48 resume_offset=INSERTNUMBERHERE"

Update grub:

sudo update-grub

Next add the following file and remake the initramfs. Use your preferred texted editor I use vi.

sudo vi /etc/initramfs-tools/conf.d/resume

add:

RESUME=/dev/sda4 resume_offset=INSERTNUMBERHERE

or possibly (might not work)

RESUME=UUID=15cf6fe2-efa4-47b6-9adc-bb279ca2ef48 resume_offset=INSERTNUMBERHERE

sudo update-initramfs -c -k all

Reboot.

sudo systemctl hibernate

Useful links

https://www.majlovesreg.one/thoughts/how-to-enable-hibernate-on-ubuntu-26-04-lts/ https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/

상단 광고의 [X] 버튼을 누르면 내용이 보입니다