You are not logged in.

#1 2022-05-08 12:51:38

Spfnym
Member
Registered: 2018-05-01
Posts: 11

Can't resume from hibernate

I recently was moving my system to different set of storage devices and while it had some problems, I think I got the system working properly, with the exception of resuming from hibernation. Possibly of particular note is that the SWAP is no longer as a file, but recreated as a partition on an HDD; mostly meant to be used for hibernation after I get some more RAM. Also, not too much earlier I started not using a display manager but starting X from TTY.

Suspend at least works properly, but it's a bummer that my actual plan didn't really work out. I think it gets to a little bit past bootloader, and then the screen goes black, there seems to be no response from trying to go to TTY, and I don't think it was accepting an SSH connection either.

Because before I did this large batch of administration the hibernation worked, I'm a bit unsure why it's not any longer. I'll try to give information that could help figure it out.

This is what journalctl says:

May 06 23:58:01 localhost systemd[1]: Reached target Sleep.
May 06 23:58:01 localhost systemd[1]: Starting Hibernate...
May 06 23:58:01 localhost systemd[1]: Stopping Atop advanced performance monitor...
May 06 23:58:01 localhost systemd[1]: atop.service: Deactivated successfully.
May 06 23:58:01 localhost systemd[1]: Stopped Atop advanced performance monitor.
May 06 23:58:01 localhost audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=atop comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 06 23:58:01 localhost systemd[1]: atop.service: Consumed 5.198s CPU time.
May 06 23:58:01 localhost systemd-sleep[450620]: Entering sleep state 'hibernate'...
May 06 23:58:01 localhost kernel: audit: type=1131 audit(1651870681.844:564): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=atop comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 06 23:58:01 localhost kernel: PM: hibernation: hibernation entry
May 06 23:58:02 localhost krunner[426224]: [2022-05-06 23:58:02.428] [426244] (device_info_linux.cc:45): NumberOfDevices

A lot of partitions are encrypted, but not the system (with the exception of /var), nor the SWAP.

$ sudo cat /boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options root=/dev/disk/by-uuid/b39625ea-c289-4ec3-92fb-ae605e1078a8 rw intel_iommu=on iommu=pt resume=UUID=7c3f42f6-d205-46f5-beb9-e11f778d9d8e
$ sudo lsblk /dev/sda1
sda1   8:1    0 37.1G  0 part [SWAP]

$ sudo lsblk /dev/disk/by-uuid/7c3f42f6-d205-46f5-beb9-e11f778d9d8e
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda1   8:1    0 37.1G  0 part [SWAP]
$ free -m
               total        used        free      shared  buff/cache   available
Mem:           15917        6635        1847         674        7433        8270
Swap:          37999           8       37991
$ cat /sys/power/disk
[platform] shutdown reboot suspend test_resume
$ cat /sys/power/state
freeze mem disk
$ sudo grep "7c3f42f6-d205-46f5-beb9-e11f778d9d8e" /etc/fstab
UUID=7c3f42f6-d205-46f5-beb9-e11f778d9d8e       none            swap            defaults        0 0
$ swapon --show
NAME      TYPE       SIZE USED PRIO
/dev/sda1 partition 37.1G 8.4M   -2
$ grep "HOOKS" /etc/mkinitcpio.conf
# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
#    HOOKS=(base)
#    HOOKS=(base udev autodetect block filesystems)
#    HOOKS=(base udev block filesystems)
#    HOOKS=(base udev block mdadm encrypt filesystems)
#    HOOKS=(base udev block lvm2 filesystems)
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck resume)
$ grep "MODULES" /etc/mkinitcpio.conf
# MODULES
#     MODULES=(piix ide_disk reiserfs)
#MODULES=(vfio vfio_iommu_type1 vfio_pci vfio_virqfd)
MODULES=(vfio_pci vfio vfio_iommu_type1 vfio_virqfd)
#MODULES=()
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
##   This setup specifies all modules in the MODULES setting above.

So, why can't I resume from hibernation?

Last edited by Spfnym (2022-05-08 12:52:41)

Offline

#2 2022-05-08 13:44:17

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 83

Re: Can't resume from hibernate

What log say after attempt to resume from hibernation? Is `resume=...` actually in /proc/cmdline after boot?

Offline

#3 2022-05-08 14:50:50

Spfnym
Member
Registered: 2018-05-01
Posts: 11

Re: Can't resume from hibernate

Well, if it did say something, I might have something on my hands. But I don't think it does. Those are the last messages I can access from before a forced shut down.

$ cat /proc/cmdline
initrd=\intel-ucode.img initrd=\initramfs-linux.img root=/dev/disk/by-uuid/b39625ea-c289-4ec3-92fb-ae605e1078a8 rw intel_iommu=on iommu=pt resume=UUID=7c3f42f6-d205-46f5-beb9-e11f778d9d8e

Offline

#4 2022-05-08 16:51:54

Spfnym
Member
Registered: 2018-05-01
Posts: 11

Re: Can't resume from hibernate

I decided to produce video evidence for my problem, in the hopes some relevant errors would be shown that way.
Hibernation from TTY with no graphical interface started actually manages to resume fully. I don't think I've seen those errors before that it shows as it's hibernating.

And because that didn't quite go according to what I described before, I tried the KDE's hibernate button (I've used systemctl hibernate there, too), and that resulted in this. And that's what I had experienced before. The log for that one doesn't show anything past the "kernel: PM: hibernation: hibernation entry", but the one that did manage to resume from systemctl hibernate (when started from no graphical interface at all) produced this log

Since this difference in how my system reacted to a graphical vs. non-graphical hibernate says to me it makes sense to disclose that KDE is started from command line with startx which is mostly just configured to execute startplasma-x11 along with what there was by default. So no display manager, as I've already stated.

Offline

#5 2022-05-08 21:47:48

Soyman
Member
Registered: 2017-06-23
Posts: 8

Re: Can't resume from hibernate

I have been having hibernation issues and they sound very similar to this issue. I too start my WM using startx, i3 in my case. Hibernation works fine before starting i3 but has the same black screen issue when trying to hibernate with i3 running.
The issue started occurring recently for me, I suspect that it was an update that did this as hibernation worked fine before and not much else changed.

Offline

#6 2022-05-08 23:20:12

Spfnym
Member
Registered: 2018-05-01
Posts: 11

Re: Can't resume from hibernate

It is also conceivable, absolutely, that some update broke things in my case as well. There was maybe a bit too much administration I did almost at once to really know what caused what.

Offline

#7 2022-05-09 08:30:25

Spfnym
Member
Registered: 2018-05-01
Posts: 11

Re: Can't resume from hibernate

It seemed to me that trying now with the sddm.service enabled would be a good idea, and it still fails to resume from a hibernate from a graphical environment. That would be one lead that didn't seem to take anywhere, at least in my case.

Next up, I also tried another graphical environment, this time Fluxbox. No luck there.

Offline

#8 2022-05-12 02:46:18

Soyman
Member
Registered: 2017-06-23
Posts: 8

Re: Can't resume from hibernate

I managed to locate the issue. It is a recent nvidia driver update. I just tried downgrading from 510.68 to 510.47 and now hibernation works fine.
I also had to downgrade linux to start X and i3. I'm using linux-lts so it was just a minor version downgrade. The system seems to work fine although there is a minor risk of library incompatibility, my main programs seem to work fine.
I used the pacman archive from 2022-02-10 because I managed to confirm that hibernation worked at that point.

There is also the 510.54 version of the driver. It might also work but I'm too lazy to check it right now.
If you want to try it, use 2022-03-31 which has the latest version of 510.54.
I upgraded to 510.60 on 2022-04-07 and I feel like that is when it stopped working for me, could be wrong on that though.

Edit:
I forgot to mention that I tried the new nvidia 515.43.04-1 drivers that are in the testing repo and the hibernation issue is not fixed in that version.

Last edited by Soyman (2022-05-12 02:52:23)

Offline

Board footer

Powered by FluxBB