So I've done a little more testing.  On boot, with /sys/power/resume
unset (i.e. 0:0), I see this in the logind debug logs:

Jan 08 09:47:11 surprise systemd-logind[1887]: Sleep mode "disk" is supported 
by the kernel.
Jan 08 09:47:11 surprise systemd-logind[1887]: /dev/dm-2: is a candidate device.
Jan 08 09:47:11 surprise systemd-logind[1887]: /dev/sda2: ignoring device with 
lower priority
Jan 08 09:47:11 surprise systemd-logind[1887]: /sys/power/resume is not 
configured; attempting to hibernate with path: /dev/dm-2, device: 253:2, 
offset: 0, priority: -2
Jan 08 09:47:11 surprise systemd-logind[1887]: Not enough swap for hibernation, 
Active(anon)=1134696 kB, size=1003516 kB, used=0 kB, threshold=98%

If I set /sys/power/resume correctly, then I see:

Jan 08 09:48:10 surprise systemd-logind[1887]: Sleep mode "disk" is supported 
by the kernel.
Jan 08 09:48:10 surprise systemd-logind[1887]: /dev/dm-2: is a candidate device.
Jan 08 09:48:10 surprise systemd-logind[1887]: /dev/sda2: ignoring device with 
lower priority
Jan 08 09:48:10 surprise systemd-logind[1887]: No swap partitions or files 
matching resume config were found in /proc/swaps.

(I haven't been able to test what happens if I restart logind because I
hit https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1910769 if I
try; my plan is add an ExecStartPre which sets the resume device to
logind's unit file, to see if that does the trick.)

Does anyone know what in the system is _meant_ to be setting
/sys/power/resume?  Is it possible I'm missing some configuration
somewhere to have that setting happen?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1910252

Title:
  `systemctl hibernate` incorrectly reports "Not enough swap space for
  hibernation"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1910252/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to