[mythtv-users] Mythwelcome always starts mythfrontend on boot.

Chris Simmons chris at simmons.titandsl.co.uk
Thu Sep 4 19:41:23 UTC 2008


James Skimming wrote:
> Hi Chris
>
> I've been using Mythwelcome for almost a year, I've not had your
> problem, so I'm afraid I've never had to debug this particular issue.
>
> I've noticed though, from the Mythwelcome log, the entry "mythshutdown
> --startup returned: 0" when the machine starts automatically, (it's 1
> when started manually).
>
> If you're going to debug this, I'd suggest to start looking here first.
>   
That's interesting.  I just turned my box on manually to test this and, 
like I mentioned in my earlier post, I looked at the value of $status (I 
dump this to a file on start up as you can see from my settings below).  
It says 'user' so the backend clearly knows it was started by me rather 
than due to an automatic wakeup.  I also just ran "mythshutdown -p -v 
all" and it says "looks like we were started manually1" amongst other 
things.

However, I'm fairly sure I've seen these give contradictory answers on 
an auto start but maybe I'm imagining it?  I'll have to check it after 
an auto start again to check this (when the wife isn't watching tv that 
is :).  I've checked the value the backend writes out several times and 
that is always correct, I didn't know about mythshutdown -p til 
recently, I assumed it would be using the same setting everywhere but 
maybe not!
> How much earlier than the begging of the recording are you waking up
> your system? My system is configured to start recording 1 minute before
> the scheduled time (some programs do start early) and to wake up 4
> minutes before the recording.
>
>   
I think it wakes up 2 minutes before plus there's 2 minutes before the 
show starts.  My other settings are below, maybe you can compare them 
with yours to figure out the key difference?

mythtv-setup (Shutdown/Wakeup Options):-
Startup command: echo $status > /home/myth/restartStatus
Block shutdown before client connected: unchecked
Idle shutdown timeout (sec): 120
Mx. wait for recording (min): 10
Wakeup time format: time_t
Command to set Wakeup Time: /usr/bin/mythSetWakeupTime $time
Server halt command: /usr/bin/mythshutdown --shutdown
Pre Shutdown check-command: /usr/bin/mythshutdown --check

mythSetWakeupTime is just a simple script to put 0 in rtc then $1 and it 
works fine, no problems there...


Mythwelcome:- 

Command to set wakeup time: <blank>
Wakeup time format: yyyy-MM-dd hh:mm:ss
nvram-wakeup Restart Command: <blank>
Command to reboot: /sbin/reboot
Command to shutdown: /sbin/poweroff
Command to run Xterm: xterm
Command to run to start the Frontend: /usr/bin/mythfrontend

My theory is that you have to call mythshutdown --setwakeup for all this 
to work properly.  Note from above that I directly set the wakeup time 
without going via mythshutdown.  This is because its a pain in the ass 
if you're trying to use RTC because it seems mythshutdown --setwakeup 
wants date-time style input.

If that's the case then I'd guess this might work but I've already tried 
lots of different guesses without luck.  :(

Mythtv-setup:

Wakeup time format: yyyy-mm or whatever it is.
Command to set Wakeup Time: /usr/bin/mythshutdown --setwakeup $time

Mythwelcome:-

Command to set wakeup time: /usr/bin/someScript

...where someScript will have to take a date-time and convert it into 
seconds since epoch.

Cheers for the help James,

Chris.


More information about the mythtv-users mailing list