How to debug a suspend problem?
There are many ways to handle suspend and hibernate capabilities, many of the old methods are deprecated. This has made searching for solutions difficult, as it seems every solution is completely unrelated to the next. With that said...
The method currently recommended, advocated from http://pm-utils.freedesktop.org/wiki/, should be available for most recent distributions. I would first check if you have pm-utils
installed, and if the included commands are operating as expected.
View if the package is installed, enter this command in terminal
rpm -qa | grep pm-utils
This should output the version you have installed. If you don't get the expected output, you need to install the package.
sudo yum install pm-utils
Once you get that verified, test out your ability to suspend.
sudo pm-suspend
If You don't suspend, and get no output why, check the your recent dmesg output
dmesg | tail -50
This should help get you started, once you get some clues its much easier to go further down the trail. Post back with comments regarding your results, I can get you through the rest.
Try this as root:
PM_DEBUG=true pm-suspend
Then check /var/log/pm-suspend.log
for hints on what might go wrong.
If you can suspend, but not resume, there's a good article on the Ubuntu wiki on how to debug this problem.
As is suggested by Mika, as root:
PM_DEBUG=true pm-suspend
Details within:
/var/log/pm-suspend.log
In this case you're looking for where
[...] service [servicename] suspend suspend success
ends, and
[...] service [servicename] suspend resume success
begins. Somewhere in between you may find calls returning error, at which point suspend is inhibited. In this case, you may have suspend changes being rolled back. Figure out what service call is throwing the error, open it up in vi and take a look at it.
I had the same problem where after installing xboxdrv
on an Ubuntu 12.04, a call being made in a rule in /etc/pm/sleep.d/
was trying to stop a service that was never started or non-existent, in this case, xboxdrv
. Turns out it could never be started in the first place, because there was no /lib/modules/uinput.ko
module, because that module is merged into the kernel. This caused the case statement in /etc/pm/sleep.d/xboxdrv
to throw an error when it case matches "suspend" to the call service xboxdrv stop
. Prepending the line with #
bypasses the statement, at the expense of having to unplug and re-plug your controller on suspend then resume.