[mythtv-users] Mythwelcome and ACPI wake up

Paul Harrison mythtv at dsl.pipex.com
Sun Nov 11 18:57:12 UTC 2007

Ma Begaj wrote:
> 2007/11/11, Paul Harrison <mythtv at dsl.pipex.com>:
>> I use nvram-wakeup but I'm sure it's possible to set things up to use
>> ACPI and have everything work properly because I've applied several
>> patches to make it possible to do just that. You just have to figure out
>> how to plug you scripts into the mythshutdown process to do what you
>> want :-)
> mythshutdown's internal alarm setting did not work for me (I do not
> remember why), so I got it directly from mythshutdown's output:
> wakeup=`mythshutdown -t -v all | grep 'Mythshutdown: wakeup time given is:'`
> wakeup_date=`echo -n $wakeup | awk '{ print $8 }'`
> wakeup_time=`echo -n $wakeup | awk '{ print $9 }'`
> and I write it to /proc/acpi/alarm.
> It is not a nice solution because mythshutdown's output might change
> but it is working for me at the moment.
> M.
This is from memory and completely untested but something like this
should work.

In mythtv-setup got to General settings then the Shutdown/Wakeup Options
page set the following:-

Wakeup time format - 'yyyy-MM-ddThh:mm'
Command to set Wakeup Time - 'mythshutdown --setwakeup $time'

In MythWelcome press F11 to show the MythShutdown/MythWelcome Settings
page set the following:-

Command to Set Wakeup Time: - Add the name of your script here to set
the wakeup time using ACPI. The time will be passed as a parameter. Your
script should return  '0' if you want to shutdown, '1' if you need to
reboot or '2' if something went wrong.

Wakeup time format: change this to the format you want the time passed
to your script above.

If you need to do a reboot after setting the time (some BIOS require a
reboot before the time will stick) then add the command to do that in
the nvram-wakeup Restart Command - probably not needed for ACPI.

Add the commands to use to reboot and shutdown.

Paul H.

More information about the mythtv-users mailing list