Reviewing the patch from bug 554009, I have the following comments: - as the patch sets SWAPTYPE, no need to set it in line 24 of the original script immediately before the patch: just run wait-for-root (if that is actually needed);
- the test for $resume_offset would be safer if it looked for a number, eg: [ "${resume_offset}" -ge 0] 2>/dev/null - lines 63-67 of the original script can be replaced by line 64 only: no need for a separate resume_offset case. I confirm that the patch enables hibernation and hybrid-sleep to a /swapfile using uswsusp with LXLE 16.04 identifying as "4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:58:51 UTC 2017 i686 i686 i686 GNU/Linux", and also with the above changes. Why is no-one picking this up? Still 3.5 years of support for Ubuntu 16.04 LTS. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1644975 Title: Resume from disk (swapfile) fails Status in initramfs-tools package in Ubuntu: Confirmed Bug description: Well, hibernation with swap file doesn't work while hibernation with swap partition works perfectly fine with the exactly same configuration and hardware. The reason is that when resuming from swap file, initramfs script can't correctly detect the machine are hibernated from the last shut down. And I investigated the issue and found this patch solved https://bugs.launchpad.net/ubuntu/+source/initramfs- tools/+bug/554009/+attachment/1366060/+files/resume.patch) for the hibernate to work. And it isn't applied to the package. I'd like to help this is really applied to the official package. In short, my setup is swapfile inside the system filesystem (LUKS + LVM2 + ext4). Also, I roughly followed this tutorial to prepare this configurartion that: https://ubuntuforums.org/showthread.php?t=1042946 I've opening this bug because the original bug report is closed and getting no response... To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1644975/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp