Rolf Ahrenberg wrote:
No "assuming manual start of VDR" entry found on my logs, so this really was on automatic wakeup for the timer.

If VDR did detect it as manual start, then something else must have caused VDR to believe that there's an interactive user. Something triggers the activity, maybe a plugin?

Mar 4 02:05:57 xxx vdr: [6748] next timer event at Sun Mar 4 10:58:00 2007

Mar  4 10:58:00 xxx vdr: [6688] timer 18 (5 1058-1130 'xxx') start
... and vdr just stays on ...

... and I assume that VDR started not more than 10 minutes before, eg. after 10:48?

Please add the attached patch, it logs some more infos that might shed light on this.

This gives log lines like this:

Mar  4 12:11:18 xx vdr: [3788] Manual Start check: Delta = 240

- means on VDR startup, the expected vs. now time was 240 seconds, VDR started 4 minutes before planned.

The following log lines get dumped once a minute:

Mar  4 12:12:20 xx vdr: [3788] LastActivity: Never
Mar  4 12:12:20 xx vdr: [3788] ActiveTimeout:     62
Mar  4 12:12:20 xx vdr: [3788] Retry:  Never

- No keyboard activity ever, no interactive user, ready to shut down again since 62 seconds. Never tried to restart. Thats how it should look like.

Mar  4 12:14:20 xx vdr: [3788] LastActivity:    36
Mar  4 12:14:20 xx vdr: [3788] ActiveTimeout:  -1164
Mar  4 12:14:20 xx vdr: [3788] Retry:  Never

- This is after activity: Last key stroke 36 seconds ago, no automatic shutdown for next 1164 seconds.

Cheers,

Udo

Index: vdr.c
===================================================================
--- vdr.c       (Revision 874)
+++ vdr.c       (Arbeitskopie)
@@ -1193,6 +1193,37 @@
 
         // Main thread hooks of plugins:
         PluginManager.MainThreadHook();
+
+
+#define DebugTimeouts
+#ifdef DebugTimeouts
+        
+        static time_t DebugTime = time(NULL);
+        time_t Now = time(NULL);
+        if (Now - DebugTime >= 60) {
+           time_t LastActivity = cRemote::LastActivity();
+           if (!LastActivity)
+              dsyslog("LastActivity: Never ");
+           else
+              dsyslog("LastActivity: %5i ",(int)(Now - LastActivity));
+
+           time_t ActiveTimeout = ShutdownHandler.GetUserInactiveTime();
+           if (!ActiveTimeout)
+              dsyslog("ActiveTimeout:  Never ");
+           else
+              dsyslog("ActiveTimeout: %6i ",(int)(Now - ActiveTimeout));
+           
+           time_t Retry = ShutdownHandler.GetRetry();
+           if (!Retry)
+              dsyslog("Retry:  Never ");
+           else
+              dsyslog("Retry: %6i ",(int)(Now - Retry));
+           
+           DebugTime = Now;
+           }
+
+#endif
+
         }
 
   if (ShutdownHandler.EmergencyExitRequested())
Index: shutdown.c
===================================================================
--- shutdown.c  (Revision 874)
+++ shutdown.c  (Arbeitskopie)
@@ -103,6 +103,8 @@
 void cShutdownHandler::CheckManualStart(int ManualStart)
 {
   time_t Delta = Setup.NextWakeupTime ? Setup.NextWakeupTime - time(NULL) : 0;
+    
+  dsyslog("Manual Start check: Delta = %i", (int)Delta);
 
   if (!Setup.NextWakeupTime || abs(Delta) > ManualStart) {
      // Apparently the user started VDR manually
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to