View Single Post
Old 05-03-2013, 09:56 AM   #16
sven
Enthusiast
sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.
 
Posts: 39
Karma: 454
Join Date: Jul 2012
Location: Brussels
Device: Kobo Touch
Quote:
Originally Posted by z000ao8q View Post
Hello,
how did you get the device out of suspend?

I am looking for a way to sleep/suspend the device for a certain time and only have it woken up for executing a cron job.
similar to rtcwake - which is unfortunately not working
Hi,

On my Kobo Touch I use the rtcwake command to set the wake up time. After that I do the suspend:
Code:
rtcwake -m no -s 10
echo 1 > /sys/power/state-extended
echo mem > /sys/power/state
This example sends the Kobo for 10 seconds to sleep. With the -t parameter instead of -s you can set the epoch wake up time, i.e. seconds since 1 Jan 1970.

What I couldn't get working is to send the Kobo directly to mem sleep with rtcwake command.

Edit: Also your second approach echoing directly to /sys/class/rtc/rtc0/wakealarm should work. It is only important to write 0 to wakealarm before writing the wakeup time:
Code:
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo "+20" > /sys/class/rtc/rtc0/wakealarm
I hope that helps,

Sven

Last edited by sven; 05-03-2013 at 11:16 AM. Reason: Addition to post
sven is offline   Reply With Quote