Suspend/Resume Bug Report Guide
The purpose of going through below steps is to help narrow down the root cause (BIOS? Kernel? Graphics driver?) of the suspend/resume failure and provide more info for debugging.
Prerequisite: no processes using /proc/acpi/event (which might be used by e.g. gnome-power-manager, to interfere with some ACPI related actions like pressing power button).
1. get the process id by "lsof /proc/acpi/event".
2. kill these processes.
Notes:
1. Perform suspend/resume test under both text console mode (init level 3) and X mode (init level 5) to see if it's X specific. If they are with the same failure, let's focus on text console mode and just provide logs under that condition.
2. provide following logs before and after suspend/resume: dmesg output, intel_reg_dumper output (using reg_dump tool in xf86-video-intel source package), intel_gpu_dump output (see this guide).
S3 suspend (a.k.a Suspend To RAM):
a. check if the resume hang is caused by graphics driver:
1. run: dmesg > dmesg_before; echo mem > /sys/power/state; dmesg > dmesg_after
2. press the power button to see if the machine can be resumed.
3. If it can't be resumed, reboot the system then check if the file "dmesg_after" generated.
4. If dmesg_after exists, it means that the system can be resumed from BIOS, so it's likely to be a graphics issue. Otherwise it's not related to graphics and don't report it to freedesktop.org bugzilla.
b. suspend/resume by skipping BIOS:
1. enable "CONFIG_PM_DEBUG" in kernel configuration, so that we can use /sys/power/pm_test.
2. run: echo core/processors/devices > /sys/power/pm_test
3. run: dmesg > dmesg_before; echo mem > /sys/power/state; dmesg > dmesg_after
4. wait for about five seconds and see whether it can be resumed correctly.
5. If it can't be resumed correctly, it may be graphics driver bug. This info is helpful to narrow down the issue.
S4 hibernation (a.k.a Suspend To Disk):
If resume fails at kernel booting stage, try adding boot option "resume=/dev/XXXX" (XXXX means the swap partition).
Check if hibernation under console mode has the same failure as in X mode.
1. boot the system into init level 3 (text mode).
2. run: echo disk > /sys/power/state
3. press the power button to see if the system can be resumed correctly.
4. If it can be resumed normally, the issue may be related to the graphics driver.
5. If it can't be resumed normally, the issue may be related to the Linux kernel.
