JauntySuspendResumeHibernate
2613
Comment:
|
6546
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
* '''Launchpad Entry''': UbuntuSpec:Jaunty-Suspend/Resume/Hibernate | * '''Launchpad Entry''': UbuntuSpec:jaunty-suspend-resume |
Line 8: | Line 8: |
##TOC ||<tablestyle="float:right; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>|| |
|
Line 9: | Line 12: |
Getting down to one suspend/hibernate method of Jaunty, improving the experience. | 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. |
Line 20: | Line 26: |
##This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified. | There needs to be some rationalisation in the way suspend/resume/hibernate is controlled from userspace 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's a different suspend/resume mechanism to pm-utils and duplication of different suspend/resume functionality is 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 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. 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 23: | Line 42: |
* 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. * As above, but the user is informed they can run a quirk checking program which can automatically suggest pm-suspend workarounds. * 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 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 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: {{{ console=ttyUSB0,9600 }}} |
|
Line 34: | Line 67: |
=== UI Changes === | === pm-utils Quirk Checking Scripts === |
Line 36: | Line 69: |
##Should cover changes required to the UI, or specific UI that is required to implement this | 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. |
Line 38: | Line 71: |
=== Code Changes === | === Initramfs Changes === To facilitate the debug via USB Serial console, the USB serial console kernel driver needs to be included into initramfs. |
Line 42: | Line 77: |
Line 43: | Line 79: |
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. |
|
Line 63: | Line 101: |
== References == * https://wiki.ubuntu.com/DebuggingKernelSuspend * https://wiki.ubuntu.com/UnderstandingSuspend * https://wiki.ubuntu.com/DebuggingIRQProblems * https://wiki.ubuntu.com/DebuggingACPI * https://wiki.canonical.com/UbuntuPlatform/Roadmaps/9.04/SuspendHibernate * http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-debug.html * http://lxr.linux.no/linux/Documentation/power/basic-pm-debugging.txt |
Launchpad Entry: jaunty-suspend-resume
Created: PeteGraner
Contributors:
Packages affected:
Summary
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.
Release Note
Rationale
There needs to be some rationalisation in the way suspend/resume/hibernate is controlled from userspace 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's a different suspend/resume mechanism to pm-utils and duplication of different suspend/resume functionality is 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 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.
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 his laptop to resume. They visit the trouble shooting guide which lists known hardware issues and pm-suspend workarounds that they can try.
- As above, but the user is informed they can run a quirk checking program which can automatically suggest pm-suspend workarounds.
- 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 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 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:
console=ttyUSB0,9600
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.
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
BoF agenda and discussion
References
https://wiki.canonical.com/UbuntuPlatform/Roadmaps/9.04/SuspendHibernate
http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-debug.html
http://lxr.linux.no/linux/Documentation/power/basic-pm-debugging.txt
KernelTeam/Specs/JauntySuspendResumeHibernate (last edited 2008-12-10 22:17:41 by 98)