FFe: Enable configuring resume offset via sysfs

Bug #1760106 reported by Mario Limonciello on 2018-03-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
klibc (Ubuntu)
Status tracked in Cosmic
linux (Ubuntu)
Status tracked in Cosmic
Seth Forshee
Seth Forshee
systemd (Ubuntu)
Status tracked in Cosmic

Bug Description


 * Cannot hibernate & resume from a swapfile

[Test Case]

 * Create or enlarge swapfile to be big enough for hibernation
 * Attempt to hibernate and resume

[Regression Potential]

 * Hibernation is not reliable technology in itself, and multiple things may cause failure to resume. Thus it is sufficient to validate this bug after swapfile is attempted for hibernation and the disk offset kernel parameter is modified. Irrespective if actual suspending or resume were successful or not.

[Other Info]

 * Original bug report

In 4.17 a new attribute is introduced to configure the hibernation resume offset. Since Ubuntu enables a swapfile by default this attribute is important to be able to make hibernation work "out of the box".

The patch in the kernel is here:

Systemd support for adopting this change is available here:
As of 3/30/18 it's not yet been merged however.

Klibc support for adopting this change is available here:

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1760106

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
description: updated
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: bionic kernel-da-key
Changed in linux (Ubuntu Bionic):
status: Confirmed → Triaged
summary: - Enable configuring resume offset via sysfs
+ FFe: Enable configuring resume offset via sysfs
Seth Forshee (sforshee) on 2018-04-03
Changed in linux (Ubuntu Bionic):
assignee: nobody → Seth Forshee (sforshee)
status: Triaged → Fix Committed
Andy Whitcroft (apw) wrote :

As this is 4.17 only I assume we will have to backport this for the kernel. Asking one of the kernel-team folk to review that. Also how close is pottering to accepting the systemd changes. As it seems we need all three bits ready.

Mario Limonciello (superm1) wrote :


The systemd changes are approved, just waiting for CI to pass and they'll be merged.

Mario Limonciello (superm1) wrote :

regarding klibc upstream is MIA for a long time. There are patches that have been posted before mine, but no activity since:

commit 4d19974d7020488f63651244e1f9f51727c3f66c
Author: H. Peter Anvin <email address hidden>
Date: Mon Feb 1 13:26:01 2016 -0800

    [klibc] fwrite: fix typo in comment

    Fix typo in comment, no code change.

    Reported-by: Gilles Espinasse <email address hidden>
    Signed-off-by: H. Peter Anvin <email address hidden>

Please note, I'm not part of the release team.

Over the lifetime of bionic userspace it will be used on newer kernels, or those that backport this particular feature.

Despite this being a "new" interface, I see this as actually a minor bug and deficiency of Linux platform, given that other operating systems support swapfile hybernation just fine. Thus it's merely a bug fix. However, the value of knowing that "bionic GA and above" are fixed would be really nice. As far as I can tell, the linux kernel patch is in proposed already, and userspace should follow too. I'll look into cherrypicking that into systemd.

Mario Limonciello (superm1) wrote :

@xnox in order to coordinate the systemd upload in case you have anything in flight, here's a debdiff:

Launchpad Janitor (janitor) wrote :
Download full text (40.4 KiB)

This bug was fixed in the package linux - 4.15.0-15.16

linux (4.15.0-15.16) bionic; urgency=medium

  * linux: 4.15.0-15.16 -proposed tracker (LP: #1761177)

  * FFe: Enable configuring resume offset via sysfs (LP: #1760106)
    - PM / hibernate: Make passing hibernate offsets more friendly

  * /dev/bcache/by-uuid links not created after reboot (LP: #1729145)
    - SAUCE: (no-up) bcache: decouple emitting a cached_dev CHANGE uevent

  * Ubuntu18.04:POWER9:DD2.2 - Unable to start a KVM guest with default machine
    type(pseries-bionic) complaining "KVM implementation does not support
    Transactional Memory, try cap-htm=off" (kvm) (LP: #1752026)
    - powerpc: Use feature bit for RTC presence rather than timebase presence
    - powerpc: Book E: Remove unused CPU_FTR_L2CSR bit
    - powerpc: Free up CPU feature bits on 64-bit machines
    - powerpc: Add CPU feature bits for TM bug workarounds on POWER9 v2.2
    - powerpc/powernv: Provide a way to force a core into SMT4 mode
    - KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9
    - KVM: PPC: Book3S HV: Work around XER[SO] bug in fake suspend mode
    - KVM: PPC: Book3S HV: Work around TEXASR bug in fake suspend state

  * Important Kernel fixes to be backported for Power9 (kvm) (LP: #1758910)
    - powerpc/mm: Fixup tlbie vs store ordering issue on POWER9

  * Ubuntu 18.04 - IO Hang on some namespaces when running HTX with 16
    namespaces (Bolt / NVMe) (LP: #1757497)
    - powerpc/64s: Fix lost pending interrupt due to race causing lost update to

  * fwts-efi-runtime-dkms 18.03.00-0ubuntu1: fwts-efi-runtime-dkms kernel module
    failed to build (LP: #1760876)
    - [Packaging] include the retpoline extractor in the headers

linux (4.15.0-14.15) bionic; urgency=medium

  * linux: 4.15.0-14.15 -proposed tracker (LP: #1760678)

  * [Bionic] mlx4 ETH - mlnx_qos failed when set some TC to vendor
    (LP: #1758662)
    - net/mlx4_en: Change default QoS settings

  * AT_BASE_PLATFORM in AUXV is absent on kernels available on Ubuntu 17.10
    (LP: #1759312)
    - powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features

  * Bionic update to 4.15.15 stable release (LP: #1760585)
    - net: dsa: Fix dsa_is_user_port() test inversion
    - openvswitch: meter: fix the incorrect calculation of max delta_t
    - qed: Fix MPA unalign flow in case header is split across two packets.
    - tcp: purge write queue upon aborting the connection
    - qed: Fix non TCP packets should be dropped on iWARP ll2 connection
    - sysfs: symlink: export sysfs_create_link_nowarn()
    - net: phy: relax error checking when creating sysfs link netdev->phydev
    - devlink: Remove redundant free on error path
    - macvlan: filter out unsupported feature flags
    - net: ipv6: keep sk status consistent after datagram connect failure
    - ipv6: old_dport should be a __be16 in __ip6_datagram_connect()
    - ipv6: sr: fix NULL pointer dereference when setting encap source address
    - ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state
    - mlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic
    - net: phy: Tell caller result ...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in systemd (Ubuntu Cosmic):
status: New → In Progress
Changed in systemd (Ubuntu Bionic):
status: New → Confirmed
Changed in systemd (Ubuntu Cosmic):
status: In Progress → Fix Committed
description: updated

Hello Mario, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Bionic):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-bionic

Hm.... I think I am confused on how this feature is supposed to work.

I've increased the swapfile size to cover my RAM and then some. However, initramfs doesn't configure resume= nor resume_offset= thus after hibernation, resume is not at all attempted. Should I specify resume=/dev/vda1 or some such?

I think this is actually fine. Ship it.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers