You are not logged in.

#1 2014-01-16 23:20:10

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Hibernate not functioning

Hi all, many months ago (>=6) i had suspend to ram and to disk working wonderfully using 'systemctl suspend|hibernate|hybrid-sleep' and the builtin support in the kernel. Now sometime after i got it working it becan to be unreliable (sometimes i would be able to resume from hibernate and other times not). Anyways now that you have the backstory: currently suspend to ram works but hibernate does not. To setup hibernate i did the following:

  1. Added 'resume' to HOOKS in /etc/mkinitcpio.conf

  2. Added 'resume=/dev/disk/by-uuid/the-uuid-of-my-swap-partition' to GRUB_CMDLINE_LINUX in /etc/default/grub

  3. Regenerated initramfs and vmlinuz using 'mkinitcpio -p linux' (as root)

  4. Regenerated grub.cfg using 'grub-mkconfig -o /boot/grub/grub.cfg' (as root)

Now as far as i can tell i didn't miss anything. Using the above i can suspend to ram using 'systemctl suspend'. But hibernate on the other hand doesn't work (using 'systemctl hibernate'). Instead upon hibernating i see a message saying its being suspended and then the system shuts down. The only catch is upon powering up i cannot thaw from hibernate (the hibernate image supposedly written to swap isn't loaded). When i issue 'dmesg' i notice this:

[    0.627850] PM: Checking hibernation image partition /dev/disk/by-uuid/4e487b3e-c436-4b05-bfaf-fde1f16f5203
[    0.957263] PM: Hibernation image not present or could not be loaded.

I also have been using /sys/power/* directly to rule out an issue with systemd. Below are some of the things i've looked at:

Confirm kernel suspend to ram is working using the below code. The system is suspended to ram and upon bumping the mouse, keyboard, or power button it springs back to life, as expected.

# echo mem > /sys/power/state

Confirm kernel hibernate is NOT working using the below code. This does as i describe above; thatis i am unable to load the hibernate image from swap and i recieve a message in dmesg as above.

# echo disk > /sys/power/state

Alright..so somethings funky. I then went on to follow this guide in hopes of solving my problem. I am now in the testing section of the document (1a) and have found that the 'devices' test fails to complete which implies to me that some driver is the issue. Though i have the forcefully restart the system (using the reset button on my tower) when the test fails (which is making it difficult for me to locate a log?). For completeness below is the code that causes the failure:

# echo devices > /sys/power/pm_test
# echo platform > /sys/power/disk
# echo disk > /sys/power/state

Another note about the above test is that i can replace the 'platform' in the second line to 'reboot' or 'shutdown' and it still fails all the same.

Now as i was saying since the 'devices' test fails this imples that a driver is the issue. I have read that GPU's and wireless cards are generally the first culprits. Here's a shortened version of lspci showing my gpu and wireless card info:

01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 630] (rev a1)
07:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)

Sorry that this has been so long winded, and perhaps a little scrambled. Thanks for any help smile

Offline

#2 2014-01-17 00:09:32

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Hibernate not functioning

Can we see output for

lsblk -f

Offline

#3 2014-01-17 00:14:15

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Re: Hibernate not functioning

frank604 wrote:

Can we see output for

lsblk -f
NAME        FSTYPE            LABEL       UUID                                 MOUNTPOINT
sda                                                                            
├─sda1      ext4                          e69cc030-35f7-4089-994d-acc3a72cd7c8 /var
├─sda2      linux_raid_member RekahSoft:0 900d84bc-4a97-1e17-d271-eeb48246f018 
│ └─md0                                                                        
│   └─md0p1 ext4                          3d9a42b4-c470-4005-9f25-de16b0030490 /media/backup
└─sda3      ext4                          919fb2cc-3074-4151-be55-ae4ed6d052d0 /media/dm-sup
sdb                                                                            
├─sdb1      ext4                          7bb3efdf-ead0-4fa7-9557-6d48c72fa158 /
├─sdb2      ext4                          5c9c757a-5e66-4593-b5e7-14321093c84f /home
└─sdb3      swap                          4e487b3e-c436-4b05-bfaf-fde1f16f5203 [SWAP]
sdc                                                                            
├─sdc1      ext4                          ffc11c59-9c1e-45f8-9f65-4a5cfbda1630 /media/dm
└─sdc2      linux_raid_member RekahSoft:0 900d84bc-4a97-1e17-d271-eeb48246f018 
  └─md0                                                                        
    └─md0p1 ext4                          3d9a42b4-c470-4005-9f25-de16b0030490 /media/backup

Last edited by rekahsoft (2014-01-17 00:19:46)

Offline

#4 2014-01-17 00:33:49

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Hibernate not functioning

Can you show the "hooks" in

 /etc/mkinitcpio.conf

Also have you tried

resume=/dev/sdb3

Or

resume=PARTUUID=4e487b3e-c436-4b05-bfaf-fde1f16f5203

Regenerate grub of course.

Offline

#5 2014-01-17 02:57:17

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Re: Hibernate not functioning

frank604 wrote:

Can you show the "hooks" in

 /etc/mkinitcpio.conf
HOOKS="base systemd autodetect plymouth modconf block resume filesystems keyboard fsck"
frank604 wrote:

Also have you tried

resume=/dev/sdb3

Or

resume=PARTUUID=4e487b3e-c436-4b05-bfaf-fde1f16f5203

Regenerate grub of course.

Yes and Yes. Same effect. Neither work. sad

Last edited by rekahsoft (2014-01-17 02:57:33)

Offline

#6 2014-01-17 07:12:04

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Hibernate not functioning

Sorry, I don't have a definite answer.  Just troubleshooting with you.  I noticed you are using plymouth.  Can you change hooks to look like

Test 1: Place resume BEFORE plymouth

 HOOKS="base systemd autodetect resume plymouth ... filesystems...

Test 2: Remove autodetect

 HOOKS="base systemd resume plymouth ... filesystems ...

Regenerate initramfs between and reboot in between.  I'm hoping this works for you.  All the best!!!!

Offline

#7 2018-07-28 19:26:01

Gr3qi
Member
Registered: 2018-07-28
Posts: 8

Re: Hibernate not functioning

I have the exact save problem now. Tried all above what you did, same outcome as yours.
After clicking on hibernate, screen goes blank, then it comes back then my laptop turns off. If i turn it on it starts up normally.

EDIT: actually its only similar in that hibernate not functioning for me and sleep is. It doesn't seem to save the image for some reason.

Journal after starting hibernate:

JJul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9199] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9202] device (enp2s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9353] manager: NetworkManager state is now ASLEEP
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9356] device (wlp3s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9396] device (wlp3s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9400] dhcp4 (wlp3s0): canceled DHCP transaction
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9401] dhcp4 (wlp3s0): state changed bound -> done
Jul 28 19:53:28 gr3q-arch kernel: wlp3s0: deauthenticating from 48:d3:43:9f:72:a7 by local choice (Reason: 3=DEAUTH_LEAVING)
Jul 28 19:53:28 gr3q-arch wpa_supplicant[449]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=48:d3:43:9f:72:a7 reason=3 locally_generated=1
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9631] device (wlp3s0): set-hw-addr: set MAC address to CE:7F:54:03:9D:EE (scanning)
Jul 28 19:53:28 gr3q-arch kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <warn>  [1532804008.9731] sup-iface[0x5574bf619a20,wlp3s0]: connection disconnected (reason -3)
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9733] device (wlp3s0): supplicant interface state: completed -> disconnected
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9742] device (wlp3s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jul 28 19:53:28 gr3q-arch NetworkManager[402]: <info>  [1532804008.9758] device (wlp3s0): set-hw-addr: reset MAC address to AC:2B:6E:CC:69:F6 (unmanage)
Jul 28 19:53:28 gr3q-arch dbus-daemon[401]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=402 comm="/usr/bin/NetworkManager --no-daemon ")
Jul 28 19:53:29 gr3q-arch systemd[1]: Reached target Sleep.
Jul 28 19:53:29 gr3q-arch systemd[1]: Starting Hibernate...
Jul 28 19:53:29 gr3q-arch systemd[1]: Starting Network Manager Script Dispatcher Service...
Jul 28 19:53:29 gr3q-arch systemd-sleep[5152]: Suspending system...
Jul 28 19:53:29 gr3q-arch kernel: PM: Image not found (code -22)
Jul 28 19:53:29 gr3q-arch kernel: PM: hibernation entry
Jul 28 19:53:29 gr3q-arch kernel: PM: Syncing filesystems ... 
Jul 28 19:53:29 gr3q-arch wpa_supplicant[449]: nl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlp3s0/drop_unicast_in_l2_multicast: No such file or directory
Jul 28 19:53:29 gr3q-arch wpa_supplicant[449]: nl80211: Failed to set IPv4 unicast in multicast filter
Jul 28 19:53:29 gr3q-arch wpa_supplicant[449]: nl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlp3s0/drop_unicast_in_l2_multicast: No such file or directory
Jul 28 19:53:29 gr3q-arch wpa_supplicant[449]: nl80211: Failed to set IPv4 unicast in multicast filter
Jul 28 19:53:29 gr3q-arch wpa_supplicant[449]: nl80211: deinit ifname=p2p-dev-wlp3s0 disabled_11b_rates=0

lsblk -f output:

NAME   FSTYPE LABEL    UUID                                 MOUNTPOINT
sda                                                         
├─sda1 ntfs   Recovery BE64D9B364D96EA1                     
├─sda2 vfat            DEDB-64E8                            /boot
├─sda3                                                      
├─sda4 ntfs            C43C00233C00135A                     
├─sda5 swap            429adcbc-ac02-4642-898e-d9a622a0867f [SWAP]
└─sda6 ext4            54e47c72-a6ba-4276-bb29-89b33e838263 /
sdb                                                         
└─sdb1 ntfs   Data     01D3C0FFD20EB8D0  

hooks for kernel:

HOOKS=(base udev systemd autodetect modconf block filesystems keyboard resume fsck)

I'm using systemd-boot, my config for arch is:

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options root=PARTUUID=7868f274-72b7-0a47-bce3-a373afa676cb rootfstype=ext4 add_efi_memmap rw
resume=PARTUUID=72e3673e-b87d-8846-9228-efdfbb184fa0

Last edited by Gr3qi (2018-07-28 19:34:19)

Offline

#8 2018-07-28 19:34:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Hibernate not functioning


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB