JauntySuspendResumeHibernate

Differences between revisions 9 and 18 (spanning 9 versions)
Revision 9 as of 2008-11-28 13:47:19
Size: 6546
Editor: 82-44-33-89
Comment:
Revision 18 as of 2008-12-10 22:17:41
Size: 8717
Editor: 98
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * '''Contributors''':  * '''Contributors''': ColinKing
Line 13: Line 13:
Jaunty should be using just one method of Suspend/Resume/Hibernate and sticking to this one method.  
Jaunty needs to improve the overall Suspend/Resume/Hibernate experience with the help of suitable debug tools to fix buggy suspend/resume/hibernate issues.
Jaunty should be using just one user space method of Suspend/Resume/Hibernate and sticking to this one method rather than having several different alternative implementations.

Jaunty needs to improve the overall Suspend/Resume/Hibernate experience. Tracking down broken drivers can be a pain. To facilitate this, better troubleshooting assistance is required, ranging from a one-stop-shop trouble shooting Wiki guide, suitable quirk checking tools and well documented trouble debug strategies to help identify and fix buggy suspend/resume/hibernate issues.
Line 17: Line 18:

For laptop users the suspend policy should depend on the method of suspend. Clients such as Transmission Bittorrent can block a suspend event when initiated via menu selection or key press, however if the suspend is caused by the lid switch then the laptop should just suspend with no option for anything to block the suspend.
Line 26: Line 29:
There needs to be some rationalisation in the way suspend/resume/hibernate is controlled from userspace as there are several existing methods available: === Userland control of suspend/resume/hibernate ===

There needs to be some rationalisation in the way suspend/resume/hibernate is controlled from user space as there are several existing methods available:
Line 33: Line 38:
The acpi-support method of suspend/resume should be removed as it is legacy and should be transitioned into hal-info and pm-utils. Having this method as well as pm-utils seems unjustifiable - it's a different suspend/resume mechanism to pm-utils and duplication of different suspend/resume functionality is not helpful. The acpi-support method of suspend/resume should be removed as it is legacy and should be transitioned into hal-info and pm-utils. Having this method as well as pm-utils seems unjustifiable - it is a different suspend/resume mechanism to pm-utils and the duplication of different suspend/resume functionality is confusing and not helpful.
Line 35: Line 40:
Either we continue with pm-utils or move to DeviceKit-power (which is supported by the new gnome-power-manager for GNOME 2.26). Depending on the choice, we should just have one solution for suspend/resume/hibernate instead of many. Either we continue with pm-utils or move to !DeviceKit-power (which is supported by the new gnome-power-manager for GNOME 2.26). Depending on the choice, we should just have one solution for suspend/resume/hibernate instead of many.
Line 37: Line 42:
Diagnosing and hence fixing broken suspend/resume/hibernate needs to easier. A Community based Wiki tutorial or troubleshooting guide (such as http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-debug.html) needs to be written as the de-facto reference page to help users to gather information that can help pinpoint and fix problems. Also having a program/script that can test for known quirks and suggest pm-suspend workarounds could be helpful. === Diagnosing and Fixing suspend/resume/hiberate ===
Line 39: Line 44:
Debugging suspend/resume/hibernate issues can be notoriously difficult; being able do dump kernel messages early to a serial console is useful, however modern PCs do not have legacy serial port hardware, so providing a USB serial console driver in initramfs is required. Diagnosing and hence fixing broken suspend/resume/hibernate needs to easier. A Community based Wiki tutorial or troubleshooting guide (such as http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-debug.html) needs to be written as the de-facto reference page to help users to:

 * identify known hardware issues
 * step-by-step diagnose problems
 * gather hardware and kernel specific information that can help pin-point and fix problems

Also having a program/script that can test for known quirks and suggest pm-suspend workarounds would be helpful.

Debugging suspend/resume/hibernate issues can be notoriously difficult; being able do dump kernel messages early to a serial console is useful. However modern PCs do not have legacy serial port hardware, so providing a USB serial console driver in initramfs is required.
Line 43: Line 56:
 * A user cannot get his laptop to resume. They visit the trouble shooting guide which lists known hardware issues and pm-suspend workarounds that they can try.  * A user cannot get their laptop to resume. They visit the trouble shooting guide which lists known hardware issues and pm-suspend workarounds that they can try.
Line 45: Line 58:
 * As above, but the user is informed they can run a quirk checking program which can automatically suggest pm-suspend workarounds.  * A user cannot get their laptop to resume. The Wiki trouble shooting guide explains how to run a quirk checking program which can automatically suggest pm-suspend workarounds.
Line 47: Line 60:
 * A user cannot resume because they have problems with specific buggy drivers. The tutorial explains how to turn on the/sys/power/pm_trace "resume-trace" debugging procedure for finding buggy drivers to gather sufficient information to pin-point the relevant driver.  * A user cannot resume their laptop because they have problems with specific buggy drivers. The Wiki tutorial explains how to turn on the/sys/power/pm_trace "resume-trace" debugging procedure for finding buggy drivers to gather sufficient information to pin-point the relevant broken driver. They can then submit a bug report against this driver.
Line 49: Line 62:
 * A user cannot hibernate their laptop. The tutorial explains how to make the hibernation core run in a test mode and then run through the 5 different test modes.  * A user cannot hibernate their laptop. The tutorial explains how to make the hibernation core run in a test mode and then run through the 5 different test modes: freezer, devices, platform, processors or core.
Line 51: Line 64:
 * A user wants to attach an early kernel log message to a bug report. By plugging in a USB-serial dongle and enabling the USB serial console driver they can then capture the log on hardware which does no have a legacy serial port. The tutorial should explain how to enable the driver using kernel boot line options, e.g. add the following to the kernel boot command line:  * A user wants to attach an early kernel log message to a bug report. By plugging in a USB-serial dongle and enabling the USB serial console driver they can then capture the log on another PC using hardware which does no have a legacy serial port. The tutorial should explain how to enable the driver using kernel boot line options and how to capture the dmesg log on a 2nd PC over serial using tools such as minicom.
Line 53: Line 66:
{{{
console=ttyUSB0,9600
}}}
 * A user shuts the laptop lid and put it directly in a bag, possibly a tight fitting neoprene bag. The laptop may take 20 seconds or so to complete the suspend process, but it must always complete to avoid a flat battery and potential fire hazard.
Line 73: Line 84:
To facilitate the debug via USB Serial console, the USB serial console kernel driver needs to be included into initramfs. To facilitate the debug via USB Serial console, the USB serial console kernel driver needs to be included into initramfs. The user needs to also add in the appropriate USB console boot parameter, e.g.

{{{
console=ttyUSB0,9600 no_console_suspend
}}}

This needs to be appropriately documented in the Wiki page.
Line 96: Line 113:
 * OEM Team
  * What does the OEM Team need from the Kernel/Userspace?
  * What are typical and acceptable cycles? i.e. Suspend/Resume 500 times without failure
  * Other?
== BoF agenda and discussion ==
Line 97: Line 119:
== BoF agenda and discussion == === Userland control of suspend/resume/hibernate ===

 * Deprecating the use of /etc/acpi/sleep.sh et al(acpi-support) - what will this impact?
 * pm-utils vs !DeviceKit-power - risk/benefit of choice

=== Diagnosing and Fixing suspend/resume/hiberate ===

 * Including USB serial console driver(s) into initramfs
 * Including and beefing up http://people.freedesktop.org/~hughsient/quirk/quirk-checker.sh
 * Wiki troubleshooting guide/documentation needs writing

Summary

Jaunty should be using just one user space method of Suspend/Resume/Hibernate and sticking to this one method rather than having several different alternative implementations.

Jaunty needs to improve the overall Suspend/Resume/Hibernate experience. Tracking down broken drivers can be a pain. To facilitate this, better troubleshooting assistance is required, ranging from a one-stop-shop trouble shooting Wiki guide, suitable quirk checking tools and well documented trouble debug strategies to help identify and fix buggy suspend/resume/hibernate issues.

For laptop users the suspend policy should depend on the method of suspend. Clients such as Transmission Bittorrent can block a suspend event when initiated via menu selection or key press, however if the suspend is caused by the lid switch then the laptop should just suspend with no option for anything to block the suspend.

Release Note

Rationale

Userland control of suspend/resume/hibernate

There needs to be some rationalisation in the way suspend/resume/hibernate is controlled from user space as there are several existing methods available:

  • Writing directly to /sys/power/state (lowest level)
  • Using /etc/acpi/sleep.sh (acpi-support)
  • pm-utils - current solution (as used by hal)
  • DeviceKit-power which supersedes the power-management functionality of hal and replaces pm-utils.

The acpi-support method of suspend/resume should be removed as it is legacy and should be transitioned into hal-info and pm-utils. Having this method as well as pm-utils seems unjustifiable - it is a different suspend/resume mechanism to pm-utils and the duplication of different suspend/resume functionality is confusing and not helpful.

Either we continue with pm-utils or move to DeviceKit-power (which is supported by the new gnome-power-manager for GNOME 2.26). Depending on the choice, we should just have one solution for suspend/resume/hibernate instead of many.

Diagnosing and Fixing suspend/resume/hiberate

Diagnosing and hence fixing broken suspend/resume/hibernate needs to easier. A Community based Wiki tutorial or troubleshooting guide (such as http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-debug.html) needs to be written as the de-facto reference page to help users to:

  • identify known hardware issues
  • step-by-step diagnose problems
  • gather hardware and kernel specific information that can help pin-point and fix problems

Also having a program/script that can test for known quirks and suggest pm-suspend workarounds would be helpful.

Debugging suspend/resume/hibernate issues can be notoriously difficult; being able do dump kernel messages early to a serial console is useful. However modern PCs do not have legacy serial port hardware, so providing a USB serial console driver in initramfs is required.

Use Cases

  • A user cannot get their laptop to resume. They visit the trouble shooting guide which lists known hardware issues and pm-suspend workarounds that they can try.
  • A user cannot get their laptop to resume. The Wiki trouble shooting guide explains how to run a quirk checking program which can automatically suggest pm-suspend workarounds.
  • A user cannot resume their laptop because they have problems with specific buggy drivers. The Wiki tutorial explains how to turn on the/sys/power/pm_trace "resume-trace" debugging procedure for finding buggy drivers to gather sufficient information to pin-point the relevant broken driver. They can then submit a bug report against this driver.
  • A user cannot hibernate their laptop. The tutorial explains how to make the hibernation core run in a test mode and then run through the 5 different test modes: freezer, devices, platform, processors or core.
  • A user wants to attach an early kernel log message to a bug report. By plugging in a USB-serial dongle and enabling the USB serial console driver they can then capture the log on another PC using hardware which does no have a legacy serial port. The tutorial should explain how to enable the driver using kernel boot line options and how to capture the dmesg log on a 2nd PC over serial using tools such as minicom.
  • A user shuts the laptop lid and put it directly in a bag, possibly a tight fitting neoprene bag. The laptop may take 20 seconds or so to complete the suspend process, but it must always complete to avoid a flat battery and potential fire hazard.

Assumptions

Design

Implementation

pm-utils Quirk Checking Scripts

The Quirk checking script http://people.freedesktop.org/~hughsient/quirk/quirk-checker.sh perhaps could be included into the disto to help users pin-point suspend/resume quirks.

Initramfs Changes

To facilitate the debug via USB Serial console, the USB serial console kernel driver needs to be included into initramfs. The user needs to also add in the appropriate USB console boot parameter, e.g.

console=ttyUSB0,9600 no_console_suspend

This needs to be appropriately documented in the Wiki page.

Migration

Deprecating /etc/acpi/sleep.sh (et al) requires release note documentation at a minimum and perhaps modifications to the acpi-scripts informing the user that these are now deprecated and should not be used.

Test/Demo Plan

Unresolved issues

  • OEM Team
    • What does the OEM Team need from the Kernel/Userspace?
    • What are typical and acceptable cycles? i.e. Suspend/Resume 500 times without failure
    • Other?

BoF agenda and discussion

Userland control of suspend/resume/hibernate

  • Deprecating the use of /etc/acpi/sleep.sh et al(acpi-support) - what will this impact?
  • pm-utils vs DeviceKit-power - risk/benefit of choice

Diagnosing and Fixing suspend/resume/hiberate

References


CategorySpec

KernelTeam/Specs/JauntySuspendResumeHibernate (last edited 2008-12-10 22:17:41 by 98)