[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#890950: initramfs-tools: Resuming from hibernated swapfile fails



Control: tag -1 moreinfo

On Tue, 2018-02-20 at 22:11 +0000, Mario.Limonciello@dell.com wrote:
> Package: initramfs-tools
> Version: 0.130ubuntu2
> Severity: important
> 
> Dear Maintainer,
> 
> I've found that resuming from a hibernated swapfile using the kernel hibernate
> implementation fails.  This is due to some assumptions made in initramfs-tools:
> 
> 1) It requires that uswpswp is installed (to provide /bin/resume)[...]

No, it runs /bin/resume which is installed by klibc-utils.  (uswsusp
installs its resume implementation as /sbin/resume.  That's what the
comment is about.)

> 2) It doesn't properly detect offsets

So far as I can see, the kernel has never really supported an offset
being passed through /sys/power/resume.  However:

1. The kernel parses the resume_offset parameter, and uses that for
every resume request.
2. The implementation of /sys/power/resume is not very strict, and
ignores the trailing ":offset".

This second feature was briefly broken between Linux 4.1-rc1 and 4.1-
rc3, but otherwise still seems to work.  So I don't see what your
change is fixing.

However I do think that either:

1. The kernel should add real support for setting the resume offset
after boot.
2. klibc should stop writing the unused offset parameter.

Ben.

-- 
Ben Hutchings
[W]e found...that it wasn't as easy to get programs right as we had
thought. ... I realized that a large part of my life from then on was
going to be spent in finding mistakes in my own programs. - Maurice
Wilkes, 1949

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: