View Single Post
Old 06-16-2011, 04:26 PM   #13
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Maybe you're having the same problem that yuryfdr had with his midi music player: the device just goes to sleep if there aren't any UI events in some short amount of time. The way around this was to bracket his script with the lines:

Code:
echo test > /sys/power/wake_lock
<script code goes here>
echo test > /sys/power/wake_unlock
I suspect that it would be better to set up an exit "trap" for the last line to ensure that it always gets called, no matter how the script ends:

Code:
trap 'echo test > /sys/power/wake_unlock' EXIT
Otherwise, battery usage will go up if the device can't sleep during inactivity.

Last edited by rkomar; 06-16-2011 at 04:30 PM.
rkomar is offline   Reply With Quote