[mythtv-users] ACPI and setwakeup.sh Mythbuntu 12.04 w/.25 fixes

BobW bob_pub_mailbox-mytv at yahoo.com
Sun Jan 6 22:57:33 UTC 2013


On 1/6/2013 3:30 PM, Joel Newcomb wrote:
> Hello MythTV community, I am having difficultly making my backend only 
> machine set it's wakeup time. What worked flawlessly in Mythbuntu 
> 10.04 does not seem to react the same as my new 12.04 with .25 fixes. 
> When using the manual test from Myth.org/wiki/ACPI_wakeup,(w/ same 
> scripts, permissions, hwclock settings) all works as expect, machine 
> powers itself back up. If I log out and let the checklogin.sh script 
> run, I see errors in mythbackend.log:
>
> Jan  6 12:09:38 mythbackend mythbackend[1852]: I Scheduler 
> scheduler.cpp:2728 (CheckShutdownServer) CheckShutdownServer returned 
> - OK to shutdown
> Jan  6 12:09:38 mythbackend mythbackend[1852]: N Scheduler 
> scheduler.cpp:2813 (ShutdownServer) Running the command to set the 
> next scheduled wakeup time :-#012#011#011#011#011#011#011sudo sh -c 
> "/usr/local/bin/setwakeup.sh 1357519800"
> Jan  6 12:09:38 mythbackend mythbackend[1852]: E Scheduler 
> scheduler.cpp:2819 (ShutdownServer) SetWakeuptimeCommand failed, 
> shutdown aborted
>
> Do I now have to pass some parameters to (Shutdownserver) instead of 
> directly to bios? I am not using MythWelcome, do I still need to use 
> Mythshutdown commands in mythtv-setup? What is that 
> -#012#011#011#011#011#011#011 in front of my setwakeup script?
>
> I have reached the end of my Google-Fu knowledge and need more clues 
> as to why it will not write the next startup time into Bios. Thanks in 
> advance, I have always found my answers here on the list and welcome 
> comments.

I am no expert, but I do have this working on Ubuntu 12.04 & fixes/0.25.

First, the #012... in front of the setwakeup script is not an indicator 
of a problem. That appears in my logs, ever when shutdown works properly.

My previous problem was that I needed to add /usr/bin/mythshutdown to my 
sudoers file for the mythtv group. (I also have /usr/bin/setwakeup.sh & 
/usr/bin/nvram-wakeup in there too--they may not be necessary, but I 
ain't messing with it!) It seems a recent update, (in the last 2 
months?), made that an necessity.

Try
mythshutdown --check -v general --loglevel info
to verify shutdown is "ready". Manually shutdown with the proper options 
from mythshutdown --help

You might also try running setwakeup manually and verify that it is 
changing the alarm time in your rtc.

cat /proc/driver/rtc
to list the current settings.

You could also set it manually and shutdown to see if it restarts.

date "+%s" will give you the current time, add 300 to it to set an alarm 
for 5 mins from now and use that as an input to setwakeup.sh.

Example:
date "+%s"
1357512755
  date
Sun Jan  6 17:52:35 EST 2013

setwakeup.sh  1357513055

For some reason, my auto shutdown seems to take a vacation for a day 
here and there, but so far it seems to be restarting and working 
correctly when it does shutdown...for now at least.


More information about the mythtv-users mailing list