[mythtv-users] Mythwelcome and ACPI wake up

Brion Swanson brions at usalug.net
Thu Dec 20 15:14:08 UTC 2007


On 12/20/07, Jonathan Rogers <jonner at teegra.net> wrote:
>
> There already is some documentation at
> <URL:http://mythtv.org/wiki/index.php/ACPI_Wakeup>.
>
> Since I use Ubuntu, I found this slightly more useful:
> <URL:
> https://help.ubuntu.com/community/MythTV/Install/WhatNext/ACPIWake?highlight=%28wakeup%29%7C%28acpi%29
> >


Yup, I've been through both of those documents.  Waking up is not a
problem.  Shutting down is.  I don't know how to make Myth take the settings
I give it (I've restarted Mythbackend after making changes) but it simply
won't sleep.  Is it because I have nothing scheduled to record so it doesn't
have a wake-up time?

I am using SVN trunk, so some mythwelcome/mythshutdown settings have
> changed.


I'm using Mythbuntu 7.10 and whatever version of Myth comes with that --
probably the latest in Ubuntu's Gutsy repos.

For my Abit motherboard, I found two things in those docs essential:
> * I disabled the wakeup feature in the BIOS setup.
> * I modified my hwclock.sh script so that the wakeup time is written
> to /proc/acpi/alarm twice after the hardware clock is set.


I haven't disabled wakeup in BIOS (quite frankly don't know if it's set) but
since it wakes up without a problem, I never bothered to change it.  Do you
think the BIOS wakeup could possibly prevent Myth from shutting down?  I
doubt it.

Yeah, I've been testing my setup and saw the same thing. I set a short
> idle timeout in mythtv-setup of 30s. My mythtvbackend log contains
> lines like "I'm idle now... shutdown will occur in 30 seconds." and
> "Waited more than 60 seconds for shutdown to complete - resetting idle
> time". I don't know if there's a bug in mythbackend or mythshutdown or
> what. However, it does eventually shut down, though it takes longer
> than it seems it should.


How did you get it to output that?  I see nothing like it in my logs.  Just
for fun I ran the following:

myth at libra:~$ sudo sh -c 'echo "+00-00-00 00:05:00" > /proc/acpi/alarm'
myth at libra:~$ mythshutdown -v all --shutdown
2007-12-20 09:59:47.203 Mythshutdown: --shutdown
2007-12-20 09:59:47.204 MSqlQuery: SELECT data FROM settings WHERE value =
'DailyWakeupStartPeriod1' AND hostname IS NULL;
2007-12-20 09:59:47.204 MSqlQuery: SELECT data FROM settings WHERE value =
'DailyWakeupEndPeriod1' AND hostname IS NULL;
2007-12-20 09:59:47.204 MSqlQuery: SELECT data FROM settings WHERE value =
'DailyWakeupStartPeriod2' AND hostname IS NULL;
2007-12-20 09:59:47.205 MSqlQuery: SELECT data FROM settings WHERE value =
'DailyWakeupEndPeriod2' AND hostname IS NULL;
2007-12-20 09:59:47.205 no daily wakeup times are set
2007-12-20 09:59:47.205 MSqlQuery: SELECT data FROM settings WHERE value =
'MythShutdownNextScheduled' AND hostname IS NULL;
2007-12-20 09:59:47.205 no recording time is set
2007-12-20 09:59:47.205 no wake up time set and no scheduled program
2007-12-20 09:59:47.206 MSqlQuery: DELETE FROM settings WHERE value =
'MythShutdownWakeupTime';
2007-12-20 09:59:47.207 MSqlQuery: INSERT INTO settings ( value, data )
VALUES ( 'MythShutdownWakeupTime', NULL );
2007-12-20 09:59:47.207 MSqlQuery: SELECT data FROM settings WHERE value =
'MythShutdownNvramRestartCmd' AND hostname = 'libra' ;
2007-12-20 09:59:47.207 everything looks fine, shutting down ...
2007-12-20 09:59:47.208 MSqlQuery: SELECT data FROM settings WHERE value =
'MythShutdownPoweroff' AND hostname = 'libra' ;
2007-12-20 09:59:47.208 ..
2007-12-20 09:59:47.208 .
2007-12-20 09:59:47.208 shutting down ...
2007-12-20 09:59:47.274 SSDPCache - Destructor
2007-12-20 09:59:47.274 UPnpDeviceDesc - Destructor
myth at libra:~$
Broadcast message from myth at libra
        (/dev/pts/1) at 9:59 ...

The system is going down for maintenance NOW!
Connection to libra closed by remote host.

I've been using the hibernate command as the mythwelcome/mythshutdown
> shutdown command. It can use several different suspend methods
> including suspend to RAM and suspend2. Right now I'm wondering if
> mythbackend isn't expected to still exist after running a shutdown
> command. Maybe everything would be smoother if I shut down mythbackend
> before suspending and restarted it after resuming.


I'd like to get regular shutdowns working before I start playing with
suspend, though at some point that is a goal as well.

I think the gap that I'm missing is how to get Myth to consider itself idle
and then shutdown (even if it doesn't have a wake up time).  After that I'll
look into WOL to force it to wake if it's asleep.

Thanks for your help,
Brion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20071220/346f6d25/attachment.htm 


More information about the mythtv-users mailing list