You are not logged in.

#1 2022-08-04 18:11:57

1501664796
Member
Registered: 2022-08-04
Posts: 2

[SOLVED] Hibernate Failed

I tried to config hibernation while I cannot get through it.

First, I created swapfile on my btrfs file system

# touch /swapfile
# chattr +C /swapfile
# dd if=/dev/zero of=/swapfile bs=1M count=13850
# chmod 0600 /swapfile
# mkswap -U clear /swapfile

And then I edited the fstab configuration, mkinitcpio configuration (yes, with

sudo mkinitcpio -P

) and kernel parameter:

xxx@xxx-laptop ~> cat /etc/mkinitcpio.conf
MODULES=(btrfs)
BINARIES=(/usr/bin/btrfs)
FILES=()
HOOKS=(base udev autodetect keyboard keymap modconf block filesystems resume fsck)
xxx@xxx-laptop ~> free -m
               total        used        free      shared  buff/cache   available
Mem:           13844        2216        9048         125        2580       11226
Swap:          13849           0       13849
xxx@xxx-laptop ~> sudo swapon -s
Filename        Type    Size    Used    Priority
/swapfile                               file    14182396  0    -2
xxx@xxx-laptop ~> sudo findmnt -no UUID -T /swapfile
8d651eeb-69ba-485a-bda7-273b2a4729c5
xxx@xxx-laptop ~> sudo filefrag -v /swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
94442752
xxx@xxx-laptop ~> cat /proc/cmdline
initrd=\amd-ucode.img initrd=\initramfs-linux.img root=PARTUUID=eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee rw intel_pstate=no_hwp resume=UUID=8d651eeb-69ba-485a-bda7-273b2a4729c5 resume_offset=94442752

However, I still cannot hibernate as I got the error (the screen turn off and the turn back on with following error message):

# echo disk > /sys/power/state
bash: echo: write error: No such device

As

# cat /sys/power/disk
[platform] shutdown reboot suspend test_resume

Is there anything wrong with  my configuration?

The log may be helpful:

$ journalctl -f -et kernel

Aug 05 01:56:17 xxx-laptop kernel: PM: hibernation: hibernation entry
Aug 05 01:56:28 xxx-laptop kernel: Filesystems sync: 0.092 seconds
Aug 05 01:56:28 xxx-laptop kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Aug 05 01:56:28 xxx-laptop kernel: OOM killer disabled.
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0x09c00000-0x09d90fff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0x09f00000-0x09f0efff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xaf64f000-0xaf64ffff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xaf65c000-0xaf65cfff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xc3f5e000-0xc40bbfff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xc690f000-0xc690ffff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xc817e000-0xce3fdfff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Marking nosave pages: [mem 0xcf800000-0xffffffff]
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Basic memory bitmaps created
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Preallocating image memory
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Allocated 708849 pages for snapshot
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Allocated 2835396 kbytes in 0.60 seconds (4725.66 MB/s)
Aug 05 01:56:28 xxx-laptop kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Aug 05 01:56:28 xxx-laptop kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Aug 05 01:56:28 xxx-laptop kernel: wlan0: deauthenticating from a0:a3:3b:d0:b9:ec by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 05 01:56:28 xxx-laptop kernel: [drm] free PSP TMR buffer
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: MODE2 reset
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: interrupt blocked
Aug 05 01:56:28 xxx-laptop kernel: ACPI: PM: Preparing to enter system sleep state S4
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: event blocked
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: EC stopped
Aug 05 01:56:28 xxx-laptop kernel: ACPI: PM: Saving platform NVS memory
Aug 05 01:56:28 xxx-laptop kernel: Disabling non-boot CPUs ...
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 1 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 2 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 3 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 4 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 5 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 6 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 7 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 8 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 9 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 10 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 11 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 12 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 13 is now offline
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 14 is now offline
Aug 05 01:56:28 xxx-laptop kernel: Spectre V2 : Update user space SMT mitigation: STIBP off
Aug 05 01:56:28 xxx-laptop kernel: smpboot: CPU 15 is now offline
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Creating image:
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Need to copy 768580 pages
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Normal pages needed: 768580 + 1024, available pages: 2865337
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Image created (768580 pages copied)
Aug 05 01:56:28 xxx-laptop kernel: ACPI: PM: Restoring platform NVS memory
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: EC started
Aug 05 01:56:28 xxx-laptop kernel: LVT offset 0 assigned for vector 0x400
Aug 05 01:56:28 xxx-laptop kernel: Enabling non-boot CPUs ...
Aug 05 01:56:28 xxx-laptop kernel: x86: Booting SMP configuration:
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 1 APIC 0x1
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU1: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C001: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: Spectre V2 : Update user space SMT mitigation: STIBP always-on
Aug 05 01:56:28 xxx-laptop kernel: CPU1 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 2 APIC 0x2
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU2: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C002: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU2 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 3 APIC 0x3
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU3: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C003: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU3 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 4 APIC 0x4
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU4: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C004: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU4 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 5 APIC 0x5
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU5: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C005: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU5 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 6 APIC 0x6
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU6: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C006: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU6 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU7: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C007: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU7 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 8 APIC 0x8
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU8: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C008: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU8 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 9 APIC 0x9
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU9: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C009: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU9 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 10 APIC 0xa
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU10: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00A: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU10 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 11 APIC 0xb
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU11: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00B: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU11 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 12 APIC 0xc
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU12: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00C: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU12 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 13 APIC 0xd
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU13: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00D: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU13 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 14 APIC 0xe
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU14: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00E: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU14 is up
Aug 05 01:56:28 xxx-laptop kernel: smpboot: Booting Node 0 Processor 15 APIC 0xf
Aug 05 01:56:28 xxx-laptop kernel: microcode: CPU15: patch_level=0x0a50000b
Aug 05 01:56:28 xxx-laptop kernel: ACPI: \_SB_.PLTF.C00F: Found 3 idle states
Aug 05 01:56:28 xxx-laptop kernel: CPU15 is up
Aug 05 01:56:28 xxx-laptop kernel: ACPI: PM: Waking up from system sleep state S4
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: interrupt unblocked
Aug 05 01:56:28 xxx-laptop kernel: ACPI: EC: event unblocked
Aug 05 01:56:28 xxx-laptop kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
Aug 05 01:56:28 xxx-laptop kernel: pci 0000:00:00.2: PCI INT A: no GSI
Aug 05 01:56:28 xxx-laptop kernel: [drm] PCIE GART of 1024M enabled.
Aug 05 01:56:28 xxx-laptop kernel: [drm] PTB located at 0x000000F400BF7000
Aug 05 01:56:28 xxx-laptop kernel: [drm] PSP is resuming...
Aug 05 01:56:28 xxx-laptop kernel: nvme nvme0: 16/0/0 default/read/poll queues
Aug 05 01:56:28 xxx-laptop kernel: [drm] reserve 0x400000 from 0xf47f800000 for PSP TMR
Aug 05 01:56:28 xxx-laptop kernel: usb 3-4: reset full-speed USB device number 2 using xhci_hcd
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: RAS: optional ras ta ucode is not available
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: RAP: optional rap ta ucode is not available
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: dpm has been disabled
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
Aug 05 01:56:28 xxx-laptop kernel: [drm] DMUB hardware initialized: version=0x01010020
Aug 05 01:56:28 xxx-laptop kernel: [drm] kiq ring mec 2 pipe 1 q 0
Aug 05 01:56:28 xxx-laptop kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 05 01:56:28 xxx-laptop kernel: [drm] JPEG decode initialized successfully.
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 05 01:56:28 xxx-laptop kernel: amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 05 01:56:28 xxx-laptop kernel: PM: Cannot find swap device, try swapon -a
Aug 05 01:56:28 xxx-laptop kernel: PM: Cannot get swap writer
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Bootloader revision 0.3 build 0 week 24 2017
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Device revision is 1
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Secure boot is enabled
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: OTP lock is enabled
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: API lock is enabled
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Debug lock is disabled
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Found device firmware: intel/ibt-20-1-3.sfi
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Boot Address: 0x24800
Aug 05 01:56:28 xxx-laptop kernel: Bluetooth: hci0: Firmware Version: 21-22.22
Aug 05 01:56:28 xxx-laptop kernel: PM: hibernation: Basic memory bitmaps freed
Aug 05 01:56:28 xxx-laptop kernel: OOM killer enabled.
Aug 05 01:56:28 xxx-laptop kernel: Restarting tasks ... done.
Aug 05 01:56:28 xxx-laptop kernel: audit: type=1130 audit(1659635788.913:68): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 05 01:56:29 xxx-laptop kernel: PM: hibernation: hibernation exit

Last edited by 1501664796 (2022-08-06 02:40:02)

Offline

#2 2022-08-06 02:42:13

1501664796
Member
Registered: 2022-08-04
Posts: 2

Re: [SOLVED] Hibernate Failed

I have found the problem. I calculate the offset wrong: I should use https://wiki.archlinux.org/title/Power_ … e_on_Btrfs instead of the previous section.

Offline

Board footer

Powered by FluxBB