Unmotivated wakeup from suspend
Hi,
I'm not sure if this is the right board, so please excuse if it is not.
I try to put my Ubuntu 9.04 server asleep, when everybody has left the local net.
I'm doing this by regular pinging around and execute a "powersave -u" when nobody answers for three times.
This is working well so far, except that the box wakes up shortly after going to sleep.
The script is as follows (simplified)
SLEEPTIME=300
_ping_range {
# ping all numbers in our subnet
...
}
while 1; do
_ping_range
if [ $? -ne 0 ]; then
powersave -u
fi
sleep $SLEEPTIME
done
Now I found out, that the box always wakes up exactly after SLEEPTINE Seconds.
When I change SLEEPTIME the Box again wakes up exactly after that time.
That looks pretty weird to me.
It seems as if the sleep command is exeuted in spite of the preceding powersave command and sets a trigger to wakeiup before the machine is in suspens mode.
Does that make any sense?
Is there any means to find out which event did wake up the box?
|