DebuggingKernelSuspendHibernateResume

Differences between revisions 18 and 19
Revision 18 as of 2011-03-02 16:10:07
Size: 9592
Editor: c-98-246-63-231
Comment:
Revision 19 as of 2011-07-27 22:08:28
Size: 9564
Editor: c-24-7-86-43
Comment:
Deletions are marked like this. Additions are marked like this.
Line 164: Line 164:
{{{
Thank you for taking the time to report this bug and helping to make Ubuntu better. This report seems to indicate that your battery drained while the machine was suspended. In this case a false bug report is generated, we are therefore closing this bug Invald. Please see https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume#Is%20this%20really%20a%20failure? for more information.
}}}
 * Set status to Incomplete
Thank you for taking the time to report this bug and helping to make Ubuntu better. This report seems to indicate that your battery drained while the machine was suspended. In this case a false bug report is generated, we are therefore closing this bug Invald. Please see https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResumefor more information.

= See also =
* [[SuspendResumeTesting]]

Triage and Debug of Kernel Suspend/Hibernate Resume apport bugs

This page is aimed to help you do initial Triage and Debug of Suspend/Resume or Hibernate/Resume bugs as reported by apport. This page presents some background information as to how the reporting works, and then will take you through a series of debug steps recommending information and data which will need to be collected.

The primary source of reports of suspend and hibernate failures arrive via apport. Apport checks at boot time whether there was a suspend or hibernate in progress, if we are booting normally then that was never resumed and therefore has failed. This means that the failure may have occured some time before the report is generated. Bear this in mind when answering the questions below.

Bug Validation

Before gathering information on the bug you could consider the questions in this section which will help weed out false reports and duplicates.

Is this really a failure?

There are some suspend/resume failures which are /expected/. For example if you suspend your laptop and then the battery runs out. When the machine is next started the suspend image is no longer present and a normal boot will occur. This will be detected as a resume failure but there is no bug, other than your battery is not infinite in size. If this occurs you can safely close the bug 'Invalid' and ignore this report.

If it is the case the user has an encrypted swap, hibernation will currently fail. This is a known issue. See the Debugging Hibernate section below for more information.

Is this a repetition of a previous failure?

If this is another occurance of a previous reported failure it is best to mark the new bug a duplicate of the first using the Mark Duplicate link on the bug report.

Information Gathering

At a very minimum every sleep/resume bug should contain the answers the questions in this section before being considered Triaged.

Did the machine break while going to sleep or waking up?

It is very important to know whether the problem occurs on the way into the sleep state or on the way out. If the machine never makes it to sleep, but instead wakes up or powers off incorrectly, that is a suspend/hibernate failure. If the machine wakes back up from the sleep but then takes you to the login prompt or crashes after that then it is a resume failure.

Please indicate in the bug whether it is a sleep or wakeup failure and how you determined this.

Is it reproducible?

Is the problem reproducible. If you do say 10 sleep cycles does the problem occur every time, 1 in 5 etc. Do the symptoms vary at all?

Please indicate in the bug how and what you tested.

Did it work before?

Has this sleep type (suspend or hibernate) ever worked in the past. If it has which kernel release did it work on?

Please indicate in the bug whether it worked, and if so include the contents of /proc/version_signature from that release (or the Ubuntu version number if you do not have it).

Do you end up with flashing Caps Lock light or similar?

If you have a flashing Caps Lock light then very likely you are experiencing a kernel panic.

Please indicate that in the bug.

Hibernate specific information

For resume from Hibernate failures, please include the output from the following commands from the boot following the hibernate, this includes information on the search for the resume device etc:

  1. dmesg

  2. cat /proc/cmdline

  3. cat /etc/initramfs-tools/conf.d/resume

Other information

Please include any information as to the circumstances leading up to this failure, anything unusual for example did you see any error messages?

Debugging Suspend

Suspending from text mode

The first step for debugging suspend is to determine if the issue occurs when triggered using the pm-suspend command. If possible you should reboot the system with the no_console_suspend boot parameter. See DebuggingKernelBoot for instructions on how to modify boot parameters. You should then switch to VT1 by pressing Ctrl-Alt-F1. Login at the prompt there and run the following commands:

setfont /usr/share/consolefonts/Uni1-VGA8.psf.gz
sudo pm-suspend

This will select a much smaller font so that you can see more messages should they come out, and then initiate the suspend.

Please report whether you got any additional messages. Digital photos of the screen are a sensible way to get this into the bug.

Enabling Suspend Debugging

If the previous step produces nothing useful, then you will need to try enabling kernel suspend debugging. See DebuggingKernelSuspend for details. Please report any results to the bug.

Debugging Hibernate

Failure due to encrypted swap

https://help.ubuntu.com/community/EncryptedHome

Users installing from Ubuntu 9.10 and selecting the Encrypted Home option will automatically have encrypted swap space. Other users may have also ran sudo ecryptfs-setup-swap. It is important to note that Hibernation will work with an encrypted swap but resume will fail. There are ways around this, but theyinvolve choosing a password to use for your encrypted swap and entering that password every time you boot your system, and sharing that password with anyone else that might want to resume the system. This is a known, wishlist issue that we hope to solve. If you happen to report or triage this type of issue, please tag the bug encrypted-swap. For triagers, posting the following comment to a bug may help:

Thank you for taking the time to report this bug and helping to make Ubuntu better.  It is currently a known issue that Hibernation will fail to resume due to an encrypted swap.  Please refer to https://help.ubuntu.com/community/EncryptedHome for more information.  We will tag this bug "encrypted-swap" so that we can track this issue going forward and possibly request additional testing.  Thanks in advance for your patience and cooperation. 

Hibernating from text mode

The first step for debugging hibernate is to determine if the issue occurs when triggered using the pm-hibernate command. If possible you should reboot the system with the no_console_suspend boot parameter. See DebuggingKernelBoot for instructions on how to modify boot parameters. You should then switch to VT1 by pressing Ctrl-Alt-F1. Login at the prompt there and then run the following commands:

  • setfont /usr/share/consolefonts/Uni1-VGA8.psf.gz
    sudo pm-hibernate

This will select a much smaller font so that you can see more messages should they come out, and then initate the hibernate.

To help us investigate the problem please use the following debug test method and report results in the bug. Common method is to take photos of the screen & attach dmesg output to the bug report.

Per sub-system hibernate testing

Again from VT-1 (see above for instructions), first reduce the size of your font with the following commands:

  • setfont /usr/share/consolefonts/Uni1-VGA8.psf.gz

There are three tests listed below:

  • "devices" test mode in "platform" mode of hibernation
  • "core" test mode in "platform" mode of hibernation
  • "core test mode in "reboot" mode of hibernation.

The test modes are as follows:

  • core :
    • test the freezing of processes, suspending of devices, platform global control methods(*), the disabling of nonboot CPUs and suspending of platform/system devices
  • devices :
    • test the freezing of processes and suspending of devices

If you cat /sys/power/pm_test and cat /sys/power/disk it will list the modes that it supports.

Then run the following commands:

  • $ sudo -i
    
    # lsmod > lsmod.output.txt
    
    # echo devices > /sys/power/pm_test
    # echo platform > /sys/power/disk
    # echo disk > /sys/power/state
    # dmesg > /tmp/dmesg-devices-platform.txt
    
    # echo core > /sys/power/pm_test
    # echo platform > /sys/power/disk
    # echo disk > /sys/power/state
    # dmesg > /tmp/dmesg-core-platform.txt
    
    # echo core > /sys/power/pm_test
    # echo reboot > /sys/power/disk
    # echo disk > /sys/power/state
    # dmesg > /tmp/dmesg-core-reboot.txt

Please collect the lsmod, full dmesg output files from the failing boot/tests, and attach to the bug report. This includes significant information about the search for the resume device.

Please report whether you got any additional messages. Digital photos of the screen are a sensible way to get this into the bug.

Notes

Battery drained whilst suspended stock reply

Thank you for taking the time to report this bug and helping to make Ubuntu better. This report seems to indicate that your battery drained while the machine was suspended. In this case a false bug report is generated, we are therefore closing this bug Invald. Please see https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResumefor more information.

See also

* SuspendResumeTesting


CategoryKernel CategoryDebugging

DebuggingKernelSuspendHibernateResume (last edited 2014-01-22 12:12:32 by penalvch)