htcuni-autosuspend 0.3 is available. Fixes a bug where multiple copies of the daemon could be started.
I'm experience some issues of a moderately severe kind after installing and running htcuni-autosuspend, whereby after suspend if plugging in-out the AC adapter, the system wakes up half-way, to the suspend console, says a new USB device AC adapter was attached, then X need to be killed and the htcunid daemon stops responding and can't be restarted.
This even occurs when killing the autosuspend process before suspending by hand. I've seen some errors generated by the init.d htcuni-suspend daemon, but couldn't write them down, need to check what's going on.
Or it's potentially connected with swap. Should it be disabled before suspend and enabled afterwards? Didn't have suspend problems with it enabled before?
EDIT1: I think I've determined the problems are originated when suspend is initiated while disk activity is occurring. I've witnessed an instance of this while upgrading in aptitude. Therefore, the modification proposed in the following post is all the more needed. Obviously, you can stop the daemon by hand, but then if you forget, it leads to problems in critical cases like mine above.
EDIT2: Even when the suspend daemon is stopped, there are still random errors after some time associated with it or something hanging the htcunid. I've been able to log some error messages, I've gotten this a couple of times:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']htcuni:~# /etc/rcS.d/S99htcuni-autosuspend: line 21: 2187 Terminated
setsid $DAEMON > /dev/null 2> /dev/null
/etc/rcS.d/S41htcunid: line 19: 2051 Illegal instruction setsid $DAEMON > /dev/null 2> /dev/null[/div]