Sunday, October 11, 2009

smartq 7 suspend problem workaround - resuspend after 2 hours

I have done a little poking about on this and have come to some conclusions.
Firstly, I haven't done comprehensive testing yet, but the following seems to get around the unreliable re-suspend described above. Replacing
  Code:
if [ x"$(cat /sys/devices/platform/hhtech_gpio/wk_status)" = x"1" ]; then
   sudo pm-suspend
fi

with
  Code:
if [ x"$(cat /sys/devices/platform/hhtech_gpio/wk_status)" = x"1" ]; then
   echo mem >/sys/power/state
fi

in /etc/pm/sleep.d/xresume should send the smartq back to sleep after its 2 hour wakeup. (I think there is probably some race condition provoked by calling pm-suspend from within pm-suspend, and the following just prompts the kernel to suspend without invoking the support script). This is still a bit of a nasty kludge, but seems like a workable solution.

No comments:

Post a Comment