First I would confirm that your suspend is functioning correctly. Take a look at the quirks page and confirm that your suspend is functioning correctly and not just seeming like it's working right.
2. Is your 001_something script executable?
Check to make sure that your
001_something script is executable!
% chmod +x 001_something
3. Does your 001_something script look correct?
Check to make sure your script conforms to what
pm-utils is expecting.
case "$1" in
ACTION BEFORE SUSPEND/HIBERNATE
ACTION AFTER RESUME
NOTE: Are you putting your attempts to use the network in the
hibernate|suspend correct portion of the case/switch statement?
4. file in .d directory functioning (/etc/pm/suspend.d/ or /usr/lib/pm-utils/sleep.d/)?
Next I would confirm that your
001_something script is in fact getting picked up by suspend/hibernate correctly by having it simply echo out to a file some string just so you know that it's working.
echo "yup I'm working" > /tmp/pmck_`date +%Y-%T`.log
You should then see files such as
If the above .d directory is functioning, I would make a
001_something and have it copy the
/var/log/pm-suspend.log file you think is getting overwritten to some other file under
/tmp, that way you can at least confirm that logging is correct. This may gain you some further insight into what's happening.
cp /var/log/pm-suspend.log /tmp/pmlg_`date +%Y-%T`.log
6. Sleep hook number?
Also can you change the name of your hook file to
00-something instead of
001_something? Not sure but the man page indicates these values.
SLEEP HOOK ORDERING CONVENTION
00 - 49
User and most package supplied hooks. If a hook assumes that all of the usual services and userspace infrastructure
is still running, it should be here.
50 - 74
Service handling hooks. Hooks that start or stop a service belong in this range. At or before 50, hooks can assume
that all services are still enabled.
75 - 89
Module and non-core hardware handling. If a hook needs to load/unload a module, or if it needs to place non-video
hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range. At or before
75, hooks can assume all modules are still loaded.
90 - 99
Reserved for critical suspend hooks.
7. Network connectivity?
Add the following to your
# network status?
ip link show > $TMP
# dns working?
dig google.com +answer >> $TMP
# can we ping google?
ping -c 5 www.google.com >> $TMP
8. Bug with pm-utils, HAL, and Wheezy?
I came across this debian bug report and wonder if this might be the cause of your problem. The bug describes an issue with HAL and pm-utils. It sounds like removing HAL fixes the networking issue.
9. More verbose pm-utils debugging
Additionally there is this link which offers advice for suspend/resume issues specific to Debian. There is mention of a way to increase the logging of pm-utils by setting a variable,
PM_DEBUG=true in the
Enabling Debugging for pm-utils
The log of suspend and resume processes are in file
/var/log/pm-suspend.log. It contains moderately verbose information by
default. More information can be enabled for debugging by inserting
line export PM_DEBUG=true into the beginning of file
Perhaps this might be helpful in giving you more insight into what's going on with pm-utils!
10. ACPI shutting down network prior to
If the issue doesn't appear to be with
pm-utils, it may be because of
acpi. When you close the lid on your laptop, an
acpi event is triggered, that event has an action associated to it.
% more /etc/acpi/events/lm_lid
% more /etc/acpi/actions/lm_lid.sh
test -f /usr/sbin/laptop_mode || exit 0
# lid button pressed/released event handler
Taking a closer look at
laptop_mode you'll see that this tool is responsible for doing a variety of things, one of which is managing the status of your network devices.
laptop-mode maintains a directory,
/etc/laptop-mode/conf.d, similar to other unix tools. In there are files related to the ethernet and wireless networking devices.
In the primary config. file,
/etc/laptop-mode/laptop-mode.conf, is the ability to turn on more verbose messaging. Perhaps this will shed some additional light on what's going on?
Summary of above things to try based on the OP's feedback
1: Suspend works as far as battery usage and the sleep LED on my notebook are concerned. Otherwise I do not understand how the mentioned web page should help me find out.
2: It is.
3: It looks correct.
4: I get those files.
5: I get the corresponding log files, but these are not helpful to me.
6: 00 instead of 001 does not show any difference.
7: Things in this section just test for network connectivity. As said in my question, I do not have network connectivity as soon as the script is run. The wlan0 device is down. The log files: http://paste.debian.net/231760.
NOTE: I did not have dig installed (error msg. in paste.debian.net log), however it is clear that no network access is available (as said). I can see that it is down by inspecting the output of iwconfig, ip link show, ping, ... The perl script is the script in question.
BTW, as soon as the first line of
/usr/lib/pm-utils/bin/pm-action is executed (from upowerd), the network is down already.
8: hal was installed, removing it does not change anything.