Score:0

Hibernation just works for the first time in Ubuntu 20.04

au flag

It's a Ubuntu 20.04 installed on a HP Laptop 17-cn1000ns and after following these instructions https://askubuntu.com/a/1321773/92504 suspension just works the first time after each reboot.

After booting, "sudo systemctl hibernate" works, but after restoring from hibernation if you run "sudo systemctl hibernate" again it begins hibernation but twenty seconds after it jumps automaticaly to the login screen.

It's the default Ubuntu installation, with Secure Boot enabled in UEFI, with swap on /swapfile, with latest patches and using Nouveau for its GeForce MX350 (GP107M).

The only tweeking I have set is adding resume and resume_offset on GRUB_CMDLINE_LINUX_DEFAULT value in /etc/default/grub following those instructions. Please, remember that it works for the first time:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=4e424e51-6be3-424e-9fb0-53830ca7ca37 resume_offset=34816"

Here are the differences between /var/log/kern.log between those two executions. This is more or less "diff successful.out unsuccessful.out" without timestamps:

3a4
> PM: Image not found (code -16)
23,26c24,81
< nouveau 0000:01:00.0: DRM: failed to idle channel 1 [DRM]
< PM: pci_pm_freeze(): nouveau_pmops_freeze+0x0/0x20 [nouveau] returns -16
< PM: dpm_run_callback(): pci_pm_freeze+0x0/0xc0 returns -16
< nouveau 0000:01:00.0: PM: failed to freeze async: error -16
---
> nouveau 0000:01:00.0: Enabling HDA controller
> nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 6013d4 [ PRIVRING ]
> nouveau 0000:01:00.0: acr: unload binary failed
> ACPI: EC: interrupt blocked
> ACPI: Preparing to enter system sleep state S4
> ACPI: EC: event blocked
> ACPI: EC: EC stopped
> PM: Saving platform NVS memory
> Disabling non-boot CPUs ...
> IRQ143: set affinity failed(-22).
> IRQ146: set affinity failed(-22).
> smpboot: CPU 1 is now offline
> IRQ143: set affinity failed(-22).
> IRQ146: set affinity failed(-22).
> smpboot: CPU 2 is now offline
> IRQ143: set affinity failed(-22).
> IRQ146: set affinity failed(-22).
> smpboot: CPU 3 is now offline
> IRQ143: set affinity failed(-22).
> IRQ146: set affinity failed(-22).
> smpboot: CPU 4 is now offline
> IRQ 27: no longer affine to CPU5
> IRQ143: set affinity failed(-22).
> IRQ146: set affinity failed(-22).
> IRQ 148: no longer affine to CPU5
> smpboot: CPU 5 is now offline
> IRQ 123: no longer affine to CPU6
> IRQ 149: no longer affine to CPU6
> smpboot: CPU 6 is now offline
> IRQ 40: no longer affine to CPU7
> IRQ 144: no longer affine to CPU7
> IRQ 159: no longer affine to CPU7
> smpboot: CPU 7 is now offline
> PM: hibernation: Creating image:
> PM: hibernation: Need to copy 1263996 pages
> PM: hibernation: Normal pages needed: 1263996 + 1024, available pages: 2844771
> PM: Restoring platform NVS memory
> ACPI: EC: EC started
> Enabling non-boot CPUs ...
> x86: Booting SMP configuration:
> smpboot: Booting Node 0 Processor 1 APIC 0x2
> CPU1 is up
> smpboot: Booting Node 0 Processor 2 APIC 0x4
> CPU2 is up
> smpboot: Booting Node 0 Processor 3 APIC 0x6
> CPU3 is up
> smpboot: Booting Node 0 Processor 4 APIC 0x1
> CPU4 is up
> smpboot: Booting Node 0 Processor 5 APIC 0x3
> CPU5 is up
> smpboot: Booting Node 0 Processor 6 APIC 0x5
> CPU6 is up
> smpboot: Booting Node 0 Processor 7 APIC 0x7
> CPU7 is up
> ACPI: Waking up from system sleep state S4
> ACPI: button: The lid device is not compliant to SW_LID.
> ACPI: EC: interrupt unblocked
> ACPI: EC: event unblocked
30a86
> nouveau 0000:01:00.0: fifo: fault 01 [WRITE] at 0000000000393000 engine 05 [BAR2] client 08 [HUB/HOST_CPU_NB] reason 02 [PTE] on channel -1 [007febf000 unknown]
31a88
> nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 6013d4 [ PRIVRING ]
39a97,99
> acpi LNXPOWER:02: Turning OFF
> acpi LNXPOWER:01: Turning OFF
> acpi LNXPOWER:00: Turning OFF
43,45c103,107
< Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=0999 lmp_ver=0a lmp_subver=3aa1
< Bluetooth: hci0: RTL: unknown IC info, lmp subver 3aa1, hci rev 0999, hci ver 000a
< Bluetooth: hci0: RTL: assuming no firmware upload needed
---
> Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
> Bluetooth: hci0: RTL: rom_version status=0 version=3
> Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin
> Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin
> Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422
47a110
> Bluetooth: hci0: RTL: fw version 0x09993aa1
53c116
< wlp2s0: RX AssocResp from 5a:f4:51:b4:20:d8 (capab=0x1511 status=0 aid=47)
---
> wlp2s0: RX AssocResp from 5a:f4:51:b4:20:d8 (capab=0x1511 status=0 aid=46)
59,66d121
< clocksource: timekeeping watchdog on CPU2: Marking clocksource 'tsc' as unstable because the skew is too large:
< clocksource:                       'acpi_pm' wd_now: 1a6f6e wd_last: f612b mask: ffffff
< clocksource:                       'tsc' cs_now: 9b89d69971 cs_last: 98b26de6f6 mask: ffffffffffffffff
< tsc: Marking TSC unstable due to clocksource watchdog
< TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
< sched_clock: Marking unstable (386983959272, -268386948)<-(386725162800, -12035832)
< clocksource: Checking clocksource tsc synchronization from CPU 7.
< clocksource: Switched to clocksource acpi_pm

Any help will be very appreciated!

Best regards,

/Ángel

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.