The patch titled s2ram debugging documentation has been added to the -mm tree. Its filename is s2ram-debugging-documentation.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: s2ram debugging documentation From: Pavel Machek <pavel@xxxxxx> Linus posted quite nice TRACE_RESUME how-to, and I think it is too nice to be hidden in archives of mailing list, so I turned it into Documentation piece. Signed-off-by: Pavel Machek <pavel@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- Documentation/power/s2ram.txt | 56 ++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+) diff -puN /dev/null Documentation/power/s2ram.txt --- /dev/null +++ a/Documentation/power/s2ram.txt @@ -0,0 +1,56 @@ + How to get s2ram working + ~~~~~~~~~~~~~~~~~~~~~~~~ + 2006 Linus Torvalds + 2006 Pavel Machek + +1) Check suspend.sf.net, program s2ram there has long whitelist of + "known ok" machines, along with tricks to use on each one. + +2) If that does not help, try reading tricks.txt and + video.txt. Perhaps problem is as simple as broken module, and + simple module unload can fix it. + +3) You can use Linus' TRACE_RESUME infrastructure, described below. + + Using TRACE_RESUME + ~~~~~~~~~~~~~~~~~~ + +I've been working at making the machines I have able to STR, and almost +always it's a driver that is buggy. Thank God for the suspend/resume +debugging - the thing that Chuck tried to disable. That's often the _only_ +way to debug these things, and it's actually pretty powerful (but +time-consuming - having to insert TRACE_RESUME() markers into the device +driver that doesn't resume and recompile and reboot). + +Anyway, the way to debug this for people who are interested (have a +machine that doesn't boot) is: + + - enable PM_DEBUG, and PM_TRACE + + - use a script like this: + + #!/bin/sh + sync + echo 1 > /sys/power/pm_trace + echo mem > /sys/power/state + + to suspend + + - if it doesn't come back up (which is usually the problem), reboot by + holding the power button down, and look at the dmesg output for things + like + + Magic number: 4:156:725 + hash matches drivers/base/power/resume.c:28 + hash matches device 0000:01:00.0 + + which means that the last trace event was just before trying to resume + device 0000:01:00.0. Then figure out what driver is controlling that + device (lspci and /sys/devices/pci* is your friend), and see if you can + fix it, disable it, or trace into its resume function. + +For example, the above happens to be the VGA device on my EVO, which I +used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out +that "radeonfb" simply cannot resume that device - it tries to set the +PLL's, and it just _hangs_. Using the regular VGA console and letting X +resume it instead works fine. _ Patches currently in -mm which might be from pavel@xxxxxx are git-acpi.patch uswsusp-add-pmops-prepareenterfinish-support-aka-platform-mode.patch swsusp-use-partition-device-and-offset-to-identify-swap-areas.patch swsusp-rearrange-swap-handling-code.patch swsusp-use-block-device-offsets-to-identify-swap-locations-rev-2.patch swsusp-add-resume_offset-command-line-parameter-rev-2.patch swsusp-document-support-for-swap-files-rev-2.patch swsusp-add-ioctl-for-swap-files-support.patch swsusp-update-userland-interface-documentation.patch swsusp-improve-handling-of-highmem.patch swsusp-improve-handling-of-highmem-fix.patch swsusp-use-__gfp_wait.patch add-include-linux-freezerh-and-move-definitions-from.patch add-include-linux-freezerh-and-move-definitions-from-ueagle-fix.patch quieten-freezer-if-config_pm_debug.patch swsusp-cleanup-whitespace-in-freezer-output.patch swsusp-thaw-userspace-and-kernel-space-separately.patch swsusp-support-i386-systems-with-pae-or-without-pse.patch suspend-dont-change-cpus_allowed-for-task-initiating-the-suspend.patch swsusp-measure-memory-shrinking-time.patch suspend-to-disk-fails-if-gdb-is-suspended-with-a-traced-child.patch convert-pm_sem-to-a-mutex.patch convert-pm_sem-to-a-mutex-fix.patch swsusp-untangle-thaw_processes.patch swsusp-untangle-freeze_processes.patch swsusp-fix-coding-style-in-suspendc.patch swsusp-fix-labels.patch s2ram-debugging-documentation.patch support-for-freezeable-workqueues.patch use-freezeable-workqueues-in-xfs.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html