Re: [vdr] Why does vdr-1.5.x poweroff my computer at boot ?

2007-07-17 Thread Gregoire Favre
On Sat, Jul 14, 2007 at 12:48:19AM +0200, Udo Richter wrote:

> I don't really understand that. On boot, you start VDR, kill it and 
> restart it?

Yes and no :-)
My vdrwatchdog just take care that vdr is up and respond, if it's not,
then it kill it and reload the driver and restart it.

Now I have found out that in in gentoo initscript I forgot to tell the
vdrwatchdog initscript to be run AFTER vdr, which was of course stupid
from me... since I don't have any FF cards anymore in my system, the
reload of the driver at boot don't seems needed anymore anyway.

> The next scheduled wakeup time is always MinEventTimeout in the future, 
> to prevent wakeup race conditions and immediate restarts on forced 
> shutdown. Thats probably what causes VDR to assume manual start on 
> second run. However this only happens together with calling the shutdown 
> script, and the shutdown script should not be called at all, since 
> there's a timer close by...?
> 
> To avoid this, you could save the NextWakeupTime and restore it after 
> VDR exits.

Yes, I have added a test for an enough uptime in my vdr's "checkscrip"
which is the easy way to be sure my computer don't power down too early.

Thank for your kindness answer and have a great day,
-- 
Grégoire FAVRE  http://gregoire.favre.googlepages.com  http://www.gnupg.org
   http://picasaweb.google.com/Gregoire.Favre

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Why does vdr-1.5.x poweroff my computer at boot ?

2007-07-13 Thread Udo Richter
Gregoire Favre wrote:
> Oh, that's a really bad way of doing things for me : it seems my
> vdrwatchdog initiate a "initializing full VDR restart".
> 
> I only got those "problem" needing a restart of vdr at boot, so the new
> implementation will never work for me.

I don't really understand that. On boot, you start VDR, kill it and 
restart it?

The next scheduled wakeup time is always MinEventTimeout in the future, 
to prevent wakeup race conditions and immediate restarts on forced 
shutdown. Thats probably what causes VDR to assume manual start on 
second run. However this only happens together with calling the shutdown 
script, and the shutdown script should not be called at all, since 
there's a timer close by...?

To avoid this, you could save the NextWakeupTime and restore it after 
VDR exits.

Cheers,

Udo

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Why does vdr-1.5.x poweroff my computer at boot ?

2007-07-13 Thread Gregoire Favre
On Fri, Jul 13, 2007 at 11:40:42PM +0200, Udo Richter wrote:

> This is not how its supposed to be.
> 
> Since 1.5.1, VDR remembers the planned wakeup time in setup.conf as 
> NextWakeupTime. (You can convert the number to human-readable with perl 
> -e "print scalar time()")
> On next wakeup, VDR checks if the next timer event is within 10 minutes 
> of the remembered time. If the remembered time is not 'now', VDR assumes 
> manual start and should stay awake for MinUserInactivity minutes.

Oh, that's a really bad way of doing things for me : it seems my
vdrwatchdog initiate a "initializing full VDR restart".

I only got those "problem" needing a restart of vdr at boot, so the new
implementation will never work for me.

Is there an easy way to have the 1.4.x way which always worked for me ?

Thank,
-- 
Grégoire FAVRE  http://gregoire.favre.googlepages.com  http://www.gnupg.org
   http://picasaweb.google.com/Gregoire.Favre

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Why does vdr-1.5.x poweroff my computer at boot ?

2007-07-13 Thread Udo Richter
Gregoire Favre wrote:
> I use Min. event timeout/user inactivity of 60 minutes but when my
> computer poweron vdr only seems to wait for about 5 minutes before
> shuting down my computer if a timer isn't programmed which is quiete bad
> if I power it by hand and don't come after it directly.

This is not how its supposed to be.

Since 1.5.1, VDR remembers the planned wakeup time in setup.conf as 
NextWakeupTime. (You can convert the number to human-readable with perl 
-e "print scalar time()")
On next wakeup, VDR checks if the next timer event is within 10 minutes 
of the remembered time. If the remembered time is not 'now', VDR assumes 
manual start and should stay awake for MinUserInactivity minutes.

Check your log files for lines 'next timer event at' on shutdown and 
'assuming manual start of VDR' on startup, and compare the times.

Cheers,

Udo


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr