View previous topic :: View next topic |
Author |
Message |
publiosulpicio Apprentice
Joined: 31 Aug 2008 Posts: 150
|
Posted: Sat Dec 01, 2012 10:50 am Post subject: Strange behaviour of automatic wake up |
|
|
I would like to use my gentoo box as an alarm clock, using cron to start vlc. This is easy, but I do not want to have the computer on all the night. I found this how to very useful http://ubuntuforums.org/showthread.php?t=1714793 (it is for ubuntu, but it needs very small modifications to work in gentoo). Essentially, it uses /sys/class/rtc/rtc0/wakealarm to automatically turn on the computer at a specified time. If I do something like
Code: |
sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm'
sh -c 'echo `date "+%s" -d "+ 5 minutes"` >/sys/class/rtc/rtc0/wakealarm'
|
it works very well: I turn off the computer and it turn on by itself in 5 minutes.
The problem is that if the scheduled time for automatic wake up is for tomorrow, it does not work. When I set it everything seems ok
Code: |
cat /sys/class/rtc/rtc0/wakealarm
|
is correct, but the computer does not wake up. The strange thing is that cat /sys/class/rtc/rtc0/wakealarm reports random alrm_time and alrm_date if I check them after the scheduled time (they were correct when I turned off the pc). This happens even if the scheduled time is a few hours in the future (but in the next day), it seems something happens at midnight (or in the night).
Any ideas on how to solve this? Thank you! |
|
Back to top |
|
|
publiosulpicio Apprentice
Joined: 31 Aug 2008 Posts: 150
|
Posted: Sat Dec 01, 2012 11:18 am Post subject: |
|
|
I found the the problem is not midnight or something like that. It seems that the automatic wake up works only if I turn off the computer and I do not turn it on until it does this automatically. If I set the wake up, turn off and turn on and then turn off another time (of course everything happens before the scheduled time) then it won't turn on on. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|