resume from hibernation broken when resume image is autodetected (UUID= syntax used)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Medium
|
Benjamin Drung | ||
Noble |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[ Impact ]
I found a reason of non-functioning resume from hibernation when resume partition/file is autodetected by intiramfs hook /usr/share/
Here is the scenario:
1) hook /usr/share/
2) during boot init script sets 'resume' variable to 'RESUME' value from conf/conf.
3) resuming script local-premount/
DEV=$(readlink ${resume})
DEV=/sys/
if [ -r "$DEV" ]; then
read MAJMIN < "$DEV"
fi
4) next check fails and resume process silently aborts:
if [ -z "$MAJMIN" ]; then
exit 1
fi
Resuming script fails to get device major-minor because resume=
Commonly mentioned workaround is to explicitly specify kernel parameter resume=
[ Test Plan ]
1. hibernate: `sudo systemctl hibernate`
2. resume from hibernate
3. `cat /sys/power/resume` should contain the major-minor of the swap
[ Other Info ]
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools 0.130ubuntu3
Uname: Linux 4.16.6-
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 5 11:32:31 2018
InstallationDate: Installed on 2018-03-27 (38 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
PackageArchitec
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Benjamin Drung (community): Disapprove
- git-ubuntu import: Pending requested
-
Diff: 48 lines (+8/-10)2 files modifiedinit (+4/-4)
scripts/local-premount/resume (+4/-6)
description: | updated |
tags: | added: patch |
tags: | added: regression-release |
tags: | added: rls-ee-incoming |
Changed in initramfs-tools (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → Medium |
summary: |
- resume from hibernation broken when resume image is autodetected + resume from hibernation broken when resume image is autodetected (UUID= + syntax used) |
Changed in initramfs-tools (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
tags: | removed: rls-ee-incoming |
How to check you have this issue:
1) get provided resume script, replace /usr/share/ initramfs- tools/scripts/ local-premount/ resume with it initramfs. debug, if you see following lines, you have this issue: local-premount/ resume 707d-4422- 866d-a7534da507 02' () block// dev major/minor
2) sudo update-initramfs -k $(uname -r) -u
3) sudo systemctl hibernate
4) edit grub menu entry, add 'debug' parameter to kernel command line, boot
5) look into /run/initramfs/
+ /scripts/
Success: Resume device: 'UUID=106238b0-
Failure: Failed to get /sys/class/