FS#76579 - [systemd] 252.1-1: systemd-suspend-then-hibernate does not work

Attached to Project: Arch Linux
Opened by slack3r (slack3r) - Tuesday, 15 November 2022, 07:59 GMT
Last edited by Christian Hesse (eworm) - Friday, 03 March 2023, 14:41 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: system never enter into 'hibernate' mode and does not resume properly.


Additional info:
* package version(s): 252.1-1

Steps to reproduce:
- edit /etc/systemd/sleep.conf and set 'HibernateDelaySec=1min';
- call "systemctl suspend-then-hibernate", then wait more than one minute;
- try to resume the system.

Solution:
downgrade to 251.7-4
This task depends upon

Closed by  Christian Hesse (eworm)
Friday, 03 March 2023, 14:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd 253.1-1
Comment by slack3r (slack3r) - Tuesday, 15 November 2022, 08:21 GMT
Kernel log with systemd 251.7 attached.
Comment by Toolybird (Toolybird) - Tuesday, 15 November 2022, 20:34 GMT
This appears to be by design. Although, it's still being debated upstream [1]

[1] https://github.com/systemd/systemd/issues/25269
Comment by slack3r (slack3r) - Wednesday, 16 November 2022, 06:15 GMT
As I can understand, it is a bug/regression.

See https://github.com/systemd/systemd/issues/25365

(ArchLinux)User wrote:
"When waking from suspend-then-hibernate, screen comes back on and windows appear but are not interactive."

Same behavior here: screen and keyboard get locked.
Comment by Toolybird (Toolybird) - Wednesday, 16 November 2022, 06:39 GMT
Yes, it all seems related. Upstream #25365 was closed as a dupe of #25356 which is "already reported and discussed at #25269" i.e. the issue I mentioned. PM can now add this to the existing collection of "current systemd issues to watch" :)
Comment by Toolybird (Toolybird) - Friday, 03 February 2023, 23:45 GMT
Dupe  FS#77362 
Comment by snek (snek) - Saturday, 04 February 2023, 01:12 GMT
A fix was merged. I don't know how long it will take to hit systemd-stable, so backporting it might make sense: https://github.com/systemd/systemd/pull/25374
Comment by Christian Hesse (eworm) - Saturday, 04 February 2023, 22:09 GMT
Cherry-picking results in conflicts... :-/
Comment by Christian Hesse (eworm) - Saturday, 04 February 2023, 22:18 GMT Comment by Christian Hesse (eworm) - Thursday, 16 February 2023, 10:55 GMT
The stable release comes too late... This is in v253 now.
Comment by slack3r (slack3r) - Monday, 20 February 2023, 20:33 GMT
  • Field changed: Percent Complete (100% → 0%)
v253 does not solve the issue as expected.
See: https://github.com/systemd/systemd/issues/26492
Comment by slack3r (slack3r) - Wednesday, 22 February 2023, 09:18 GMT
Pull #26492 was merged.
Waiting for an official backport, but it seems fine now:

[ 99.680699] PM: suspend entry (deep)
[ 100.389965] ACPI: PM: Preparing to enter system sleep state S3
[ 100.595522] ACPI: PM: Saving platform NVS memory
[ 100.607210] ACPI: PM: Low-level resume complete
[ 100.607249] ACPI: PM: Restoring platform NVS memory
[ 100.612319] ACPI: PM: Waking up from system sleep state S3
[ 101.044250] PM: suspend exit
[ 101.079382] PM: hibernation: hibernation entry
[ 106.368075] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[ 106.368083] PM: hibernation: Marking nosave pages: [mem 0x0009c000-0x000fffff]
[ 106.368094] PM: hibernation: Marking nosave pages: [mem 0x27f36000-0x27f60fff]
[ 106.368102] PM: hibernation: Marking nosave pages: [mem 0x27fb3000-0x28ce3fff]
[ 106.368317] PM: hibernation: Marking nosave pages: [mem 0x46b82000-0x47ffdfff]
[ 106.368656] PM: hibernation: Marking nosave pages: [mem 0x47fff000-0xffffffff]
[ 106.377768] PM: hibernation: Basic memory bitmaps created
[ 106.378386] PM: hibernation: Preallocating image memory
[ 106.630789] PM: hibernation: Allocated 321560 pages for snapshot
[ 106.630792] PM: hibernation: Allocated 1286240 kbytes in 0.25 seconds (5144.96 MB/s)
[ 106.700555] ACPI: PM: Preparing to enter system sleep state S4
[ 106.910807] ACPI: PM: Saving platform NVS memory
[ 106.922154] PM: hibernation: Creating image:
[ 107.068985] PM: hibernation: Need to copy 310258 pages
[ 107.068987] PM: hibernation: Normal pages needed: 310258 + 1024, available pages: 1507250
[ 106.922327] ACPI: PM: Restoring platform NVS memory
[ 106.928315] ACPI: PM: Waking up from system sleep state S4
[ 109.211902] PM: hibernation: Basic memory bitmaps freed
[ 109.212982] PM: hibernation: hibernation exit


Patch attached.

P.s.
v253 PKGBUILD diff attached.
Builds fine and the issue is gone.

Loading...