[RFC] Shutdown rewrite for 1.5.x

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

 



Marko M?kel? wrote:
> Right, becoming inactive is not that time-critical.  I will give your
> suggestion a try: in the MainThreadHook of each plugin, poll
> Shutdown.IsUserInactive().

It should work, though the first key press may trigger some longer work, 
and the MainThreadHook will be called at the end.
For softdevice and skins it may be interesting to watch for skin / osd 
activity while inactive.

> One more thing: are the timeouts for interactive->inactive->shutdown
> configureable?  Is there a way to force VDR to enter inactive mode
> without immediate shutdown?

Inactive mode is triggered by the Min User Inactivity timeout config 
option, by default 3 hours. 3 hours after the last key press VDR changes 
to inactive.

At most 5 minutes before this timeout, but only if there's no background 
activity, the countdown timer starts. If the countdown runs to 0 and 
there is no further activity, VDR will initiate the shutdown. After that 
the 6 minutes retry counter starts, to retry the shutdown. (there's no 
way how the shutdown script can report failure.) These timeouts are 
hard-coded as constants in vdr.c.

To force inactive mode, one can call Shutdown.SetUserInactive(); - the 
power key does it for example. This will lead to a shutdown as soon as 
there's no more activity - if you want to be inactive, but avoid 
shutdown, you can announce your activity by cPlugin::Active().

Cheers,

Udo



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux