Could not resume from hibernation when swap is specified as device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Medium
|
Dan Streetman | ||
Bionic |
Fix Released
|
Medium
|
Dan Streetman | ||
Focal |
Fix Released
|
Medium
|
Dan Streetman | ||
Groovy |
Fix Released
|
Medium
|
Dan Streetman | ||
Hirsute |
Fix Released
|
Medium
|
Dan Streetman |
Bug Description
[impact]
unable to resume from hibernation when resume= boot param is specified as device path
[test case]
set up device/partition for swap, e.g. /dev/vda2
add 'resume=/dev/vda2' kernel boot parameter
hibernate
power system back on; it should resume from /dev/vda2 instead of coldboot
[regression potential]
any regression would likely result in failure to correctly resume from hibernation, incorrectly attempting to resume from hibernation, or failing to resume from hibernation.
[scope]
this is needed in b/f/g/h
this bug was introduced, ironically, by bug 1644975, which was added in bionic, so this bug doesn't exist in xenial.
this code that introduced this bug isn't included in Debian, so no change is needed there.
[original description]
I originally experienced this on Pop!_OS but I have reproduced it on a freshly installed Ubuntu.
1. Ubuntu 20.04 LTS
2. initramfs-
3. I expect the system to resume from hibernation when running pm_hibernate
4. The system starts up anew when I try to resume
I have setup a swap partition on /dev/vda2 in /etc/fstab. To enable hibernate I added the kernel parameter "resume=/dev/vda2" to GRUB_CMDLINE_
From debugging initramfs it tries to follow a symbolic link
DEV=$(readlink "$resume")
(see /usr/share/
which works well when swap is specified with uuid. When swap is specified as a device directly the readlink returns an empty string and the system does not resume from hibernation.
To verify this I added the parameter -f to readlink and run "update-initramfs -u". The system now hibernates successfully.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: initramfs-tools 0.136ubuntu6
ProcVersionSign
Uname: Linux 5.4.0-28-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Sun May 3 13:26:02 2020
InstallationDate: Installed on 2020-05-03 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitec
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: sts-sponsor-volunteer |
tags: | added: suspend-resume |
description: | updated |
Changed in initramfs-tools (Ubuntu Hirsute): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in initramfs-tools (Ubuntu Groovy): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in initramfs-tools (Ubuntu Focal): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in initramfs-tools (Ubuntu Bionic): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in initramfs-tools (Ubuntu Groovy): | |
importance: | Undecided → Medium |
Changed in initramfs-tools (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in initramfs-tools (Ubuntu Bionic): | |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in initramfs-tools (Ubuntu Focal): | |
status: | New → In Progress |
Changed in initramfs-tools (Ubuntu Groovy): | |
status: | New → In Progress |
Changed in initramfs-tools (Ubuntu Hirsute): | |
status: | Confirmed → In Progress |
tags: |
added: verification-done removed: verification-needed |
The attachment "resume.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]