Bug 12006 - [PATCH] hibernate-resume from swap file
Summary: [PATCH] hibernate-resume from swap file
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.30.x
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-05 06:44 UTC by Jordi Pujol
Modified: 2021-03-20 14:53 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:


Attachments
hibernate-resume from swap file (866 bytes, patch)
2019-07-05 06:44 UTC, Jordi Pujol
Details
hibernate-resume from swap file (878 bytes, patch)
2019-07-13 07:26 UTC, Jordi Pujol
Details
Updated patch (Now also removed superfluous parameter to /sys/power/resume) (1.62 KB, patch)
2021-03-19 08:24 UTC, Sven Mueller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jordi Pujol 2019-07-05 06:44:10 UTC
Created attachment 8131 [details]
hibernate-resume from swap file

klibc-utils/resume.c
hibernate-resume from swap file.
- write offset in /sys/power/resume_offset according to the kernel's document uswsusp.txt
- Doing this the kernel will hibernate and resume successfully from a swap file.
Comment 1 Jordi Pujol 2019-07-13 07:26:32 UTC
Created attachment 8156 [details]
hibernate-resume from swap file

checking for "/sys/power/resume_offset", because oldest kernel versions doesn't have it
Comment 2 wmz 2021-01-16 09:18:00 UTC
I'm interested in how this patch is not adopted?
Comment 3 Sven Mueller 2021-03-19 08:24:46 UTC
Created attachment 8826 [details]
Updated patch (Now also removed superfluous parameter to /sys/power/resume)
Comment 4 Sven Mueller 2021-03-19 08:26:15 UTC
Upping Importance some.
This prevents people from using hibernation with a swap file and is fixed easily with the attached patch.
Comment 5 Denys Vlasenko 2021-03-20 13:03:10 UTC
Applied, thank you.
Comment 6 Jordi Pujol 2021-03-20 14:53:50 UTC
The additional parameter in /sys/power/resume is for compatibility with tuxonice on kernel 2.6. Modern kernel versions don't use this parameter.