[mythtv-users] Mythwelcome and ACPI wake up

fb517255 at skynet.be fb517255 at skynet.be
Wed Nov 14 21:23:34 UTC 2007


On Wed, 2007-11-14 at 21:59 +0100, Ma Begaj wrote:
> 2007/11/14, fb517255 at skynet.be <fb517255 at skynet.be>:
> >
> > On Mon, 2007-11-12 at 18:21 +0100, fb517255 at skynet.be wrote:
> > > On Sun, 2007-11-11 at 17:59 +0000, Paul Harrison wrote:
> > > > fb517255 at skynet.be wrote:
> > > > > Ok as requested;
> > > > >
> > > > > I changed .gnomerc to
> > > > > /home/mythtv/start.sh > /tmp/start.log 2>&1 &
> > > > >
> > > > > In start.log I found
> > > > > mythtv: unexpected token in line /home/mythtv/.mythtv/lircrc:596
> > > > > mythtv: unexpected token in line /home/mythtv/.mythtv/lircrc:596
> > > > > I removed the line 596 but I don't suspect this being the problem of
> > > > > mythwelcome
> > > > >
> > > > >
> > > > > and start.sh has the following;
> > > > > #!/bin/bash
> > > > > /usr/bin/mythwelcome -v all > /tmp/mythwelcome.log
> > > > >
> > > > > Now that I use the full path to launch mythwelcome I have mythwelcome
> > > > > and mythfrontend on my screen. At least I have something on my screen
> > > > > now ;)
> > > > >
> > > > > Now why did mythwelcome launch the front-end as it was an auto start-up?
> > > > > Can I check this somewhere?
> > > > >
> > > > > Greetings
> > > > >
> > > > > Matthews
> > > > >
> > > > Basically MythWelcome and MythShutdown were written to work together to
> > > > co-ordinate the wakeup/shutdown process. When you replace mythshutdown
> > > > with your own scripts you can break things.
> > > >
> > > > MythWelcome uses 'mythshutdown --startup' to determine if  the computer
> > > > was started automatically to record something or because one of the
> > > > wakeup periods is about to start.
> > > >
> > > > mythshutdown --startup checks the "MythshutdownWakeupTime" setting in
> > > > the database which should be set to the next wakeup time. If we are
> > > > withing 15 minutes of that  time then an automatic wakeup is assumed and
> > > > mythfrontend wont be started by  mythwelcome.
> > > >
> > > > The "MythshutdownWakeupTime" gets set when mythshutdown --shutdown is
> > > > called by mythbackend just before shutting down the computer.
> > > >
> > > > I'm guessing that your scripts don't set the "MythshutdownWakeupTime"
> > > > setting so mythshutdown --startup always thinks it was started by the user.
> > > >
> > > > 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 :-)
> > > >
> > > > Paul H.
> > > > ______________
> > >
> > >
> > > This would mean that the following command isn't correctly working;
> > > server halt command: sudo mythshutdown --shutdown
> > >
> > > the shutdown is working, can I verify if the value
> > > "MythshutdownWakeupTime" is set correctly?
> > >
> > > by the way when I run mythshutdown --startup I have no output.
> > >
> > > We are getting closer ;)
> >
> >
> > In mythtv-setup I have;
> > Server halt command: sudo mythshutdown --shutdown
> >
> > in mythwelcome I have set (changed):
> > Command to shutdown: sudo /usr/bin/mythshutdown --shutdown
> > instead of: /usr/bin/poweroff
> >
> > Now my pc doesn't shut down anymore so I assume that the problem is
> > coming from mythshutdown.
> >
> > When I run sudo /usr/bin/mythshutdown --shutdown manually I get
> > following error:
> > mg at wsubu:~$ sudo /usr/bin/mythshutdown --shutdown
> > QSqlQuery::exec: database not open
> > QSqlQuery::exec: database not open
> > mythshutdown: Could not initialize myth context. Exiting.
> 
> Did you run this command as mythtv user (user which runs mythtv)?
> 
> M.

even when I run it as mythtv user I got this output (verbose log)

2007-11-14 22:18:55.317 MSqlQuery: SELECT data FROM settings WHERE value
= 'MythShutdownNextScheduled' AND hostname IS NULL;
2007-11-14 22:18:55.317 no recording time is set
2007-11-14 22:18:55.317 no wake up time set and no scheduled program
2007-11-14 22:18:55.324 MSqlQuery: DELETE FROM settings WHERE value =
'MythShutdownWakeupTime';
2007-11-14 22:18:55.325 MSqlQuery: INSERT INTO settings ( value, data )
VALUES ( 'MythShutdownWakeupTime', NULL );
2007-11-14 22:18:55.326 MSqlQuery: SELECT data FROM settings WHERE value
= 'MythShutdownNvramRestartCmd' AND hostname = 'wsubu' ;
2007-11-14 22:18:55.326 everything looks fine, shutting down ...
2007-11-14 22:18:55.327 MSqlQuery: SELECT data FROM settings WHERE value
= 'MythShutdownPoweroff' AND hostname = 'wsubu' ;
2007-11-14 22:18:55.327 ..
2007-11-14 22:18:55.327 .
2007-11-14 22:18:55.327 shutting down ...
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
mythshutdown: Could not initialize myth context. Exiting.
2007-11-14 22:19:34.631 SSDPCache - Destructor
2007-11-14 22:19:34.636 UPnpDeviceDesc - Destructor


At least we see that the value 'MythShutdownWakeupTime' is set correctly
in the verbose log but the system doesn't shutdown.

I could write a script to execute the mythshutdown and then do a normal
shutdown command but this isn't really a cleanway to do it.

Regards,

Matthews



More information about the mythtv-users mailing list