You are not logged in.

#1 2019-07-02 16:14:47

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Hibernation fails

Every time I try to hibernate my laptop, it hangs. Screen is black, backlight turned on, power led lights and CPU fan becomes faster.

After reboot I see, that state was no saved, and last journal entries are always like following:

Jul 02 20:21:42 anton-laptop kernel: PM: hibernation entry
Jul 02 20:21:42 anton-laptop kernel: PM: Syncing filesystems ...

Machine is Dell Inspiron 15 5565.

$ cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=416e40be-dce5-452f-bbab-b9f9745c905d rw quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3 initcall_debug resume=UUID=416e40be-dce5-452f-bbab-b9f9745c905d resume_offset=25526271 splash
$ cat /etc/systemd/sleep.conf
[Sleep]
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yes
SuspendState=mem standby freeze
HibernateMode=shutdown

Any ideas how to fix?

Last edited by bergentroll (2019-07-02 16:15:22)

Offline

#2 2019-07-02 20:42:38

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

Journal?
Does S3 work?
Does a resume partition work?
Do you have a windows installation?

Offline

#3 2019-07-03 15:48:33

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

1.

Jul 03 20:19:10 anton-laptop systemd[1]: Starting Cleanup of Temporary Directories...
Jul 03 20:19:10 anton-laptop systemd-tmpfiles[7433]: [/usr/lib/tmpfiles.d/pesign.conf:1] Line references path below legacy directory /var/run/, updating /var/run/pesign → /run/pesign; please update the tmpfiles.d/ drop-in file accordingly.
Jul 03 20:19:10 anton-laptop systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Jul 03 20:19:10 anton-laptop systemd[1]: Started Cleanup of Temporary Directories.
Jul 03 20:19:10 anton-laptop audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 03 20:19:10 anton-laptop audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 03 20:19:10 anton-laptop kernel: audit: type=1130 audit(1562167150.136:126): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=su>
Jul 03 20:19:10 anton-laptop kernel: audit: type=1131 audit(1562167150.136:127): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=su>
Jul 03 20:21:04 anton-laptop NetworkManager[490]: <info>  [1562167264.0446] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jul 03 20:21:04 anton-laptop NetworkManager[490]: <info>  [1562167264.0447] device (enp1s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 03 20:21:04 anton-laptop NetworkManager[490]: <info>  [1562167264.0711] device (p2p-dev-wlp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 03 20:21:04 anton-laptop NetworkManager[490]: <info>  [1562167264.0719] manager: NetworkManager state is now ASLEEP
Jul 03 20:21:04 anton-laptop systemd[1]: Reached target Sleep.
Jul 03 20:21:04 anton-laptop systemd[1]: Starting Hibernate...
Jul 03 20:21:04 anton-laptop kernel: PM: Configured resume from disk to 8388610
Jul 03 20:21:04 anton-laptop kernel: PM: Hibernation image partition 8:2 present
Jul 03 20:21:04 anton-laptop kernel: PM: Looking for hibernation image.
Jul 03 20:21:04 anton-laptop kernel: PM: Image not found (code -22)
Jul 03 20:21:04 anton-laptop kernel: PM: Hibernation image not present or could not be loaded.
Jul 03 20:21:04 anton-laptop kernel: PM: Hibernation mode set to 'shutdown'
Jul 03 20:21:04 anton-laptop systemd-sleep[7559]: Suspending system...
Jul 03 20:21:04 anton-laptop kernel: PM: hibernation entry
Jul 03 20:21:04 anton-laptop kernel: PM: Syncing filesystems ... 

2. S3 seems work (sleep works, does it share the same state? How can I check S3 otherwise?).

3. I have swapfile on /. So resume=UUID=... that you can see in post #1 pointing to /dev/sda2 which is /.

4. Archlinux is only one OS on my device. And EFI GRUB2 is the loader.

Offline

#4 2019-07-03 18:06:04

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

3. I have swapfile on /. So resume=UUID=... that you can see in post #1 pointing to /dev/sda2 which is /.

Jul 03 20:21:04 anton-laptop kernel: PM: Looking for hibernation image.
Jul 03 20:21:04 anton-laptop kernel: PM: Image not found (code -22)
Jul 03 20:21:04 anton-laptop kernel: PM: Hibernation image not present or could not be loaded.

There's sth. wrong w/ the swapfile or its location or (trivial problem) the resume hook is missing in mkinitcpio.conf, https://bbs.archlinux.org/viewtopic.php … 7#p1849927

Offline

#5 2019-07-04 14:31:44

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

Swap works, offset checked, hook presented:

cat /etc/mkinitcpio.conf  | grep '^HOOKS='
HOOKS=(base udev plymouth autodetect modconf block filesystems resume keyboard fsck)

Offline

#6 2019-07-04 14:53:37

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

I assume you recreated the initramfs after adding the hook?

If yes, the swap file does NOT work - no matter what you checked. The log clearly says the hibernation image could not be located.
Thus in any doubt try a swap partition first to at least rule out any issue w/ the swapfile generation.

Offline

#7 2019-07-04 16:43:13

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

Yes, I did mkinitcpio -p linux.

I checked hibernation with partition and got everything the same.

Offline

#8 2019-07-04 19:38:28

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

My last guess would be some userspace shenanigan - try to hibernate from the rescue.target.

Offline

#9 2019-07-05 16:53:33

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

Well, checked with the same result.

Offline

#10 2019-07-05 17:19:57

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,808
Website

Re: Hibernation fails

Obligatory link: https://01.org/node/3721


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#11 2019-07-07 16:37:41

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

So, I tried to build the kernel from ABS tree adding CONFIG_DRM_AMDGPU=n option (my device has AMD chipset, CPU and both GPUs). I failed to reach the graphical.target, but I tried to hibernate from TTY, and hibernation succeed for the first time. So, it seems, I have an issue with amdgpu, and I also can not shut off the display, because system hangs.

Here is the similar hibernation issue post: https://bbs.archlinux.org/viewtopic.php?id=229526.
Here is seemed related kernel bug report: https://bugzilla.kernel.org/show_bug.cgi?id=201305.

Last edited by bergentroll (2019-07-07 17:31:06)

Offline

#12 2019-07-07 17:33:52

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

Edit Same effect when booting "nomodeset"? - according to the kernel bug: "yes".

Also try passing

amdgpu.dc=0 amdgpu.dpm=0 amdgpu.aspm=0 amdgpu.runpm=0 amdgpu.bapm=0

to the kernel (dc is the new core driver, the others are power saving stuff) - if they make a difference, try to isolate the crucial one by removing them one by one.

Edit: From the kernel bug, dpm seems promising…

Last edited by seth (2019-07-07 17:35:18)

Offline

#13 2019-07-08 15:23:12

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

Indeed with amdgpu.dpm=0 laptop turns off some time after hibernate command. Seems good. But after poweroff resume fails.

It is still "Image not found" issue.

$ journalctl -eb-1
…
Jul 08 20:07:23 anton-laptop polkitd[528]: Registered Authentication Agent for unix-process:2823:68067 (system bus name :1.441 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, lo>
Jul 08 20:07:23 anton-laptop NetworkManager[487]: <info>  [1562598443.5085] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jul 08 20:07:23 anton-laptop NetworkManager[487]: <info>  [1562598443.5086] device (enp1s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 08 20:07:23 anton-laptop polkitd[528]: Unregistered Authentication Agent for unix-process:2823:68067 (system bus name :1.441, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
Jul 08 20:07:23 anton-laptop NetworkManager[487]: <info>  [1562598443.5234] device (p2p-dev-wlp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 08 20:07:23 anton-laptop NetworkManager[487]: <info>  [1562598443.5240] manager: NetworkManager state is now ASLEEP
Jul 08 20:07:23 anton-laptop systemd[1]: Reached target Sleep.
Jul 08 20:07:23 anton-laptop systemd[1]: Starting Hibernate...
Jul 08 20:07:23 anton-laptop kernel: PM: Configured resume from disk to 8388610
Jul 08 20:07:23 anton-laptop kernel: PM: Hibernation image partition 8:2 present
Jul 08 20:07:23 anton-laptop kernel: PM: Looking for hibernation image.
Jul 08 20:07:23 anton-laptop kernel: PM: Image not found (code -22)
Jul 08 20:07:23 anton-laptop kernel: PM: Hibernation image not present or could not be loaded.
Jul 08 20:07:23 anton-laptop kernel: PM: Hibernation mode set to 'shutdown'
Jul 08 20:07:23 anton-laptop systemd-sleep[2834]: Suspending system...
Jul 08 20:07:23 anton-laptop kernel: PM: hibernation entry
Jul 08 20:07:23 anton-laptop kernel: PM: Syncing filesystems ... 
lines 1010-1066/1066 (END)
$ journalctl -b0
…
Jul 08 20:08:54 anton-laptop kernel: initcall prandom_reseed+0x0/0x7d returned 0 after 10 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  init_error_injection+0x0/0x6a @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall init_error_injection+0x0/0x6a returned 0 after 162 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  pci_resource_alignment_sysfs_init+0x0/0x18 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall pci_resource_alignment_sysfs_init+0x0/0x18 returned 0 after 4 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  pci_sysfs_init+0x0/0x50 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall pci_sysfs_init+0x0/0x50 returned 0 after 155 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  bert_init+0x0/0x220 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall bert_init+0x0/0x220 returned 0 after 1 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  clk_debug_init+0x0/0x116 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall clk_debug_init+0x0/0x116 returned 0 after 21 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  boot_wait_for_devices+0x0/0x2b @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall boot_wait_for_devices+0x0/0x2b returned -19 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  dmar_free_unused_resources+0x0/0xb1 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall dmar_free_unused_resources+0x0/0xb1 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  deferred_probe_initcall+0x0/0x1a0 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall deferred_probe_initcall+0x0/0x1a0 returned 0 after 35 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  late_resume_init+0x0/0x101 @ 1
Jul 08 20:08:54 anton-laptop kernel: PM:   Magic number: 11:262:133
Jul 08 20:08:54 anton-laptop kernel: acpi PNP0C02:05: hash matches
Jul 08 20:08:54 anton-laptop kernel: acpi device:08: hash matches
Jul 08 20:08:54 anton-laptop kernel: initcall late_resume_init+0x0/0x101 returned 0 after 74 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  genpd_power_off_unused+0x0/0x7e @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall genpd_power_off_unused+0x0/0x7e returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  genpd_debug_init+0x0/0x166 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall genpd_debug_init+0x0/0x166 returned 0 after 4 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  rtc_hctosys+0x0/0xe3 @ 1
Jul 08 20:08:54 anton-laptop kernel: rtc_cmos 00:01: setting system clock to 2019-07-08T15:08:52 UTC (1562598532)
Jul 08 20:08:54 anton-laptop kernel: initcall rtc_hctosys+0x0/0xe3 returned 0 after 34 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  charger_manager_init+0x0/0x85 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall charger_manager_init+0x0/0x85 returned 0 after 102 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  firmware_memmap_init+0x0/0x33 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall firmware_memmap_init+0x0/0x33 returned 0 after 47 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  register_update_efi_random_seed+0x0/0x20 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall register_update_efi_random_seed+0x0/0x20 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  efi_shutdown_init+0x0/0x3f @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall efi_shutdown_init+0x0/0x3f returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  itmt_legacy_init+0x0/0x4c @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall itmt_legacy_init+0x0/0x4c returned -19 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  pci_mmcfg_late_insert_resources+0x0/0x4c @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall pci_mmcfg_late_insert_resources+0x0/0x4c returned 0 after 3 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  sch_default_qdisc+0x0/0x11 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall sch_default_qdisc+0x0/0x11 returned 0 after 2 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  tcp_congestion_default+0x0/0x18 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall tcp_congestion_default+0x0/0x18 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  software_resume+0x0/0x220 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall software_resume+0x0/0x220 returned -19 after 4 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  clear_boot_tracer+0x0/0x26 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall clear_boot_tracer+0x0/0x26 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  tracing_set_default_clock+0x0/0x35 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall tracing_set_default_clock+0x0/0x35 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  acpi_gpio_handle_deferred_request_irqs+0x0/0x100 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall acpi_gpio_handle_deferred_request_irqs+0x0/0x100 returned 0 after 0 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  clk_disable_unused+0x0/0x130 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall clk_disable_unused+0x0/0x130 returned 0 after 1 usecs
Jul 08 20:08:54 anton-laptop kernel: calling  regulator_init_complete+0x0/0x47 @ 1
Jul 08 20:08:54 anton-laptop kernel: initcall regulator_init_complete+0x0/0x47 returned 0 after 1 usecs
Jul 08 20:08:54 anton-laptop kernel: Freeing unused decrypted memory: 2040K
Jul 08 20:08:54 anton-laptop kernel: Freeing unused kernel image memory: 1552K
Jul 08 20:08:54 anton-laptop kernel: Write protecting the kernel read-only data: 20480k
Jul 08 20:08:54 anton-laptop kernel: Freeing unused kernel image memory: 2012K
Jul 08 20:08:54 anton-laptop kernel: Freeing unused kernel image memory: 368K
Jul 08 20:08:54 anton-laptop kernel: x86/mm: Checked W+X mappings: passed, no W+X pages found.
Jul 08 20:08:54 anton-laptop kernel: CFS CPU scheduler.
…

I truncated logs, but I find nothing more about resume.

Offline

#14 2019-07-08 21:27:58

seth
Member
Registered: 2012-09-03
Posts: 51,200

Re: Hibernation fails

My last best guess to why the imge can't be found is to nuke the swap file, resp. simply re-create it (using dd): https://wiki.archlinux.org/index.php/Swap#Manually
(Obviously you should not be using it as actual swap at this time)

Offline

#15 2019-07-09 14:59:59

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Hibernation fails

Nope. Checked and rechecked.

Offline

Board footer

Powered by FluxBB