Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Power down problem



Klaus.Schmidinger@cadsoft.de(Klaus Schmidinger)  04.11.01 12:07

Once upon a time Klaus Schmidinger shaped the electrons to say...

>Rainer Zocholl wrote:
>>
>> Hello
>>
>> Have 1..2 probs with "power down":
>>
>> 1.
>> If VDR is recording, nicely the message
>> "Recording, shut down anyway?" comes.
>> "OK"
>> "Press any key to cancel"
>> "no key"
>>
>> and:
>> No shut down occurs.
>>
>> Tried serveral times.
>>
>>
>> Nice bug... :-)

>No, it's not a bug - it's a feature!

;-)

>From INSTALL:

>  If a timer is currently recording, the parameters will reflect the
>start   time of that timer. This means that the first parameter will
>be a time in   the past, and the second parameter will be a negative
>number. This only   happens if the user presses the "Power" key while
>a timer is currently   recording.

What usefull can be done with this info? (Except determine: "It's invalid")
I would assmue that always the "next event" would be given.
(The running record is already broken.)


>> The power-off programms realizes the wake-up time in the past and
>> does nothing, of cause.

>And why does it "of course" do nothing??

Because:
If the "wakeup" would turn power off,
which time should the wake-up programm set?
It is told only the starttime of the 
running -already broken- recording, in the past.
If it would programm that, the box will sleep
for 30 days...that can't be the users intention.
If it programms nothing, the box will never awake again
or will use the old time event of yesterday (If no "date"
info set into the clock)
I don't thing that this is what the user want to do
when turning off using the RC. 
But it is difficult question of view...

I have a "shutdown now" in the Commands.conf if i
don't want the timer to be reprogrammed.

I use the "power off" while recording, emm, when i
see that the recording will be garbage anyway.
Or when i want to work on the box, but i'm too lazy to
go to the commands-manue ;-)


>As you ever so often say, the USER said "Shutdown NOW, even though a
>recording is going on!" - so why doesn't your shutdown program shut
>down?? It can well see that there's something out of the ordinary,
>because the "next" time is in the past!

Yepp, but what should it do with that info?
And: How should it know, that this is caused by the users wish
(pressing "pwr") and not by an error?

The powerdown script would have to react:

    If time is OK (far enough in the future): 
       Setup awake up timer and turn off
    
    If the time in not far enough in the future 
    or if time is in the past: 
      just turn off, disable the wakeup feature.
    

The last point is implementend in nvram-wakeup just the
other way to be "fail save", i assume.

Between "setting the timer" and the "actual wake up"
there must be sufficient time,
else the wakeup time could be missed because it may
occur during the "shutdown -r", and no wakeup occurs...
Especially critical is the additional reboot, because
sometimes a lengthly fsck occurs.

One shutdown -r
One reboot (required to enable. It's just a workarround)
            (Has to check if the actuall shutdown is to be allowed!
            that check currently not done)
One shutdown

Anyway: There must be a "safety time margin" for the wakeup.
VDR can't know about this detail.



How to solve that?

And...will it be clear to the user, that if he
kills a recording with "power off", he also disables the 
wake up for all recordings?





>If the user turns off VDR willingly and against VDR's "advice"
>(remember: there's a recording going on!), it would seem only fair
>that the USER turns it on again when he/she thinks it's ok to do so.

And why should it program the old, already broken timer?
Would not it be better, if it programm the next timer?
There is of cause the problem, that this might be in 2 minutes...

Hm... maybe we need to differencitate between 
"standy by" and "power off" ?

Hm..it's not so easy to solve, as long as the mind reading
interface is not finished yet.


So:
It there a way of "feed back" from the external programm to
the OSD? (tty on OSD? ;-))

I think that would reduce the problem by giving the user
somekind of feed back, why "nothing happens".

"Shutdown time too short"
"Start time in the past, shutdown ignored" or so.

This message must be done by the powerdown script.



>> VDR should give the next event which is more than 10 minutes
>> in the future. ("10 minutes" because nvram-wakeup
>> refuses to shut down for less than 10 minutes. But the user
>> said: "shut down now" and would be irrtaded that nothing happens)

>As I said, it's your shutdown program that refuses to do what the user
>requested!

Yes. Therfe is a dilemma.


>> (Is there a way that VDR may display the output of
>> the power off script like in commands.conf?)
>>
>> 2.
>> After ending of an recording, the shutdown seens
>> to occur immediately, with no grant.

>I have changed this in version 0.98 (to be released tonight).
>Then it will wait 5 seconds if the user explicitly has pressed
>the Power key, 5 minutes in any other case.

Thanks, so i have a fair chance to find the remote control in time ;-)

And it sounds that this allows "blind operation" now too:
TV set is already off, and i know that there are no recordings in
the next hour, but the box would stay on for a longer time,
because the "user event timer" is still running.

press "Power off", nothing happens (Because "press any key to cancel")
repressing "Power off" stopped the power downs, because it was not the "OK"


(The "power key" is used in the sense: Box, you are now alone, 
forget the user events now.)


Rainer---<=====>                         Vertraulich
             //  
           //                              
         <=====>--------------ocholl, Kiel, Germany ------------



Home | Main Index | Thread Index