[Desktop-packages] [Bug 1172692] Re: Please implement in-kernel suspend to both
** Changed in: pm-utils Status: Confirmed => Won't Fix -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Won't Fix Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Fix Released Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1172692]
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Won't Fix Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Fix Released Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1172692]
Created attachment 122010 patch based on review of patch 68712, taken from running pm-functions -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Won't Fix Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Fix Released Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1172692] Re: Please implement in-kernel suspend to both
Launchpad has imported 6 comments from the remote bug at https://bugzilla.redhat.com/show_bug.cgi?id=866487. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. On 2012-10-15T13:40:20+00:00 Jaroslav wrote: Description of problem: After pm-suspend-hybrid the hibernation method doesn't return to previous state Version-Release number of selected component (if applicable): pm-utils-1.4.1-21.fc18.x86_64 How reproducible: Always Steps to Reproduce: 1. pm-hibernate 2. pm-suspend-hybrid 3. pm-hibernate Actual results: On step 3 hybrid suspend is done instead of hibernation. Expected results: The hibernation on step 3. Additional info: Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/1 On 2012-10-15T14:34:20+00:00 Jaroslav wrote: Created attachment 627462 Proposed fix Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/2 On 2012-10-17T14:46:01+00:00 Jaroslav wrote: Updated upstream ticket: https://bugs.freedesktop.org/show_bug.cgi?id=52572 Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/4 On 2012-10-17T14:55:43+00:00 Fedora wrote: pm-utils-1.4.1-22.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/pm-utils-1.4.1-22.fc18 Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/5 On 2012-10-17T17:35:21+00:00 Fedora wrote: Package pm-utils-1.4.1-22.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pm-utils-1.4.1-22.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-16321/pm-utils-1.4.1-22.fc18 then log in and leave karma (feedback). Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/6 On 2012-12-20T16:22:09+00:00 Fedora wrote: pm-utils-1.4.1-22.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/1172692/comments/7 ** Changed in: pm-utils (CentOS) Status: Unknown => Fix Released ** Changed in: pm-utils (CentOS) Importance: Unknown => Undecided -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Confirmed Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Fix Released Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the
[Desktop-packages] [Bug 1172692]
Comment on attachment 68712 Improved patch to save previous hibernation method Review of attachment 68712: - In do_hibernate() the attempt to save and restore the active mode in /sys/power/disk fails, causing "sh: I/O error" message in pm log (attempting to write something that isn't one of the modes in /sys/power/disk, namely an empty string). Instrumenting the function I found that HIBERNATE_MODE_SAVE was never set. The characters [] are special in a shell pattern (which is what follows the ## and %% shell variable expansion modifiers) and have to be escaped: \[ \]. The following works as you intended: do_hibernate() { [ -n "${HIBERNATE_MODE}" ] && \ grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ #df 2016-02-07 Shell patterns have to be escaped \[ \]! Fixes sh: I/O error when -z $HIBERNATE_MODE_SAVE HIBERNATE_MODE_SAVE=$(cat /sys/power/disk) && \ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE##*\[}" && \ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE%%\]*}" && \ echo -n "${HIBERNATE_MODE}" > /sys/power/disk echo -n "disk" > /sys/power/state RET=$? echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk return "$RET" } Although you could make the penultimate line as follows I don't recommend it because it would hide any problems like the escaping issue that could cause HIBERNATE_MODE_SAVE to be invalid: [ -n "$HIBERNATE_MODE_SAVE" ] && echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Confirmed Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Unknown Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1172692]
In comment #2 I wrote: > Comment on attachment 68712 [details] [review] >... > Although you could make the penultimate line as follows I don't recommend it > because it would hide any problems like the escaping issue that could cause > HIBERNATE_MODE_SAVE to be invalid: > > [ -n "$HIBERNATE_MODE_SAVE" ] && echo -n "$HIBERNATE_MODE_SAVE" > > > /sys/power/disk In fact there are 2 cases as the code is used now: 1HIBERNATE_MODE unset => normal hibernate 2HIBERNATE_MODE = suspend => suspend-hybrid Given which, I've revised my comment above and propose a new version of the modified do_hibernate() as follows: do_hibernate() { local hibernate_mode_save ret [ -n "${HIBERNATE_MODE}" ] && \ grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ hibernate_mode_save=$(cat /sys/power/disk) && \ hibernate_mode_save="${hibernate_mode_save##*\[}" && \ hibernate_mode_save="${hibernate_mode_save%%\]*}" && \ [ "$hibernate_mode_save" != "${HIBERNATE_MODE}" ] || \ hibernate_mode_save="" [ -n "$hibernate_mode_save" ] && \ echo -n "${HIBERNATE_MODE}" > /sys/power/disk echo -n "disk" > /sys/power/state ret=$? [ -n "$hibernate_mode_save" ] && \ echo -n "$hibernate_mode_save" > /sys/power/disk return $ret } The key points: - hibernate_mode_save is only set if the current HIBERNATE_MODE is being changed (which only happens, if it does, in the suspend-hybrid case); - on resume the hibernate mode is only restored if hibernate_mode_save was set. This fixes: - the failure to restore the hibernate mode with suspend-hybrid; - "sh: I/O error" on resume from suspend-hybrid - "sh: I/O error" on resume from hibernate. Finally, the pm_functions script uses "echo -n" (from line 318, including the above patch) and local declarations while the comment against function log() implies that the script is aiming for POSIX conformance and yet other functions use non-POSIX local declarations. local and "echo -n" usages are fine for Debian and derived environments. To achieve POSIX conformance such usages would have to be reviewed and modified; "echo -n" could be replaced with printf (the parameters to be echoed in each case being plain text not containing formatting commands); or a shell function echo() can be added based on log(). -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Confirmed Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Unknown Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list:
[Desktop-packages] [Bug 1172692]
In comment #3 I wrote: >... > Finally, the pm_functions script uses "echo -n" (from line 318, including > the above patch) ... See also bug 91497. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/1172692 Title: Please implement in-kernel suspend to both Status in OEM Priority Project: Fix Released Status in OEM Priority Project precise series: Fix Released Status in pm-utils: Confirmed Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Precise: Fix Released Status in pm-utils source package in Quantal: Fix Released Status in pm-utils source package in Trusty: Fix Released Status in pm-utils package in CentOS: Unknown Bug description: From kernel-3.6 there is in-kernel support for suspend to both (AKA hybrid suspend). Working patches can be found at https://bugs.freedesktop.org/show_bug.cgi?id=52572 (or links). [Impact] * Ubuntu 12.04 implements hybrid suspend differently. It suspends first and wakes up the computer for hibernation 15 minutes later. This is risky since the computer may be carried when the wakeup happens. The hard disk may experience physical shocks and get damaged. * Thus, it is desirable to have a real hybrid suspend implementation. In-kernel hybrid suspend has been supported since kernel 3.6+. pm-utils only needs a small patch to enable this feature. [Test Case] * Ensure all Ubuntu 12.04 packages are up-to-date in the test environment. Install pm-utils 1.4.1-9ubuntu1 Install linux-image-lts-raring * Reboot the computer with lts-raring kernel. Run the command: 'pm-suspend-hybrid' from a terminal. After the computer suspends, press the power button. It should be able to resume from suspension correctly. * Run the command above again. After it suspends, remove and reconnect its power supply (or its battery). Press the power button. It should be able to resume from hibernation correctly. * Reboot with the default 3.2 kernel, Run the command above. The computer should be able to suspend and then wake up for hibernation 15 minutes later. [Regression Potential] * This patch won't affect users who still use 3.2 kernel. It only enables in-kernel hybrid suspend if the option 'suspend' is available from /sys/power/disk. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1172692/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp