Mailing List archive

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

[linux-dvb] Re: Problems with vdr 0.7 and driver 0.81.



Carsten Koch wrote:
> 
> Klaus Schmidinger wrote:
....
> > I also use 2 DVB cards (kernel 2.2.13).
> > I do get this error once every few days.
> > It must originate from the EPG scanner's attempt to switch channels.
> > The driver issues a 'commandrequest error' and from then on it
> > doesn't work any more. Reloading the driver cures it - until next time.
> > I don't know what I could change in VDR to avoid this...
> 
> Here is an idea:
>   Until the driver is stable enough to survive its normal use
>   by vdr for a long time, we could write a startup script for
>   vdr, that
>       1.  loads the driver......  make insmod
>       2.  waits for one minute..  sleep 60
>       3.  brings up vdr.........  vdr -v /video ...
>       4.  reloads the driver....  make reload
>       5.  goes back to step 2 above
> 
>   At the same time, we could change vdr, so it ends itself
>   normally when it detects any error or when all of these
>   conditions are met:
>       *   The current wall clock minute is 00
>       *   The user has not pressed any remote control button
>           during the previous hour
>       *   There has not been any svdrp traffic
>           during the previous hour
>       *   vdr is not replaying or recording
> 
> I know this is an ugly workaround, but I believe it would help
> a lot. It would not only work around the driver problems, it
> would also automatically restart vdr after a crash.


OK, I made a tiny VDR modification and a corresponding shell script 
as described above. The combination works great for me. So far, it
has allowed me to use vdr without any need for manual restarts.
Also, for the first time in weeks, all my recordings worked.

I spent very little time on the patch, so I'm sure it leaves a
lot of room for improvement, but it makes me happy as it is.

Here is the patch (vdr 0.71pre4):

--- VDR/vdr.c   Sun Feb  4 20:41:24 2001
+++ /wald/home/cko/linux/VDR/vdr.c      Sat Feb 10 15:47:17 2001
@@ -218,6 +218,7 @@
   cReplayControl *ReplayControl = NULL;
   int LastChannel = -1;
   int PreviousChannel = cDvbApi::CurrentChannel();
+  time_t busy_time = time(NULL);
 
   while (!Interrupted) {
         // Channel display:
@@ -231,6 +232,7 @@
         if (!Menu) {
            cTimer *Timer = cTimer::GetMatch();
            if (Timer) {
+              busy_time = time(NULL);
               if (!cRecordControls::Start(Timer)) {
                  //TODO need to do something to prevent the timer from hitting over and over again...
                  }
@@ -326,8 +328,14 @@
            }
         if (!*Interact && !cRecordControls::Active())
            RemoveDeletedRecordings();
+        else
+           busy_time = time(NULL);
+        if (time(NULL) > busy_time + 3600) break;
         }
-  isyslog(LOG_INFO, "caught signal %d", Interrupted);
+  if (Interrupted)
+     isyslog(LOG_INFO, "caught signal %d", Interrupted);
+  else
+     isyslog(LOG_INFO, "idle - exiting.");
   Setup.CurrentChannel = cDvbApi::CurrentChannel();
   Setup.Save();
   cVideoCutter::Stop();


Here is the shell script:

#! /bin/sh
cd /usr/local/DVB/driver
make insmod
while(true)
do
   date
   cd /usr/local/VDR
   su cko -c "/usr/local/VDR/vdr -v /video -c ."
   killproc -TERM /usr/local/VDR/vdr
   cd /usr/local/DVB/driver
   sleep 10
   make reload
done

Three remarks about the script: I have put DVB and VDR
under /usr/local, I am running vdr under my user name
so I can access recordings without becoming root, I
have put in a sleep 10, so if vdr aborts immediately for
some reason, the above thing does not loop too fast.


I am using the latest driver from the CVS repository.
As you can see from the log below, the driver starts spitting after
25 minutes of use in the first case. In the second case, it survived
fine for the entire hour that it ran. In the third case, it started
spitting after 36 minutes of use. In the fourth case, it survived
fine for the entire 149 minutes that it ran. 

Klaus said above that he is seeing this every few days. 
I wonder what is different between his system and mine, so I am
seeing it much more frequently?

Klaus, are you using the latest driver from the CVS repository?

As one can see below, the recording at 9:05 worked. 
It would have failed without the modification and the script.

Carsten.





Feb 11 05:45:22 wald5 vdr[3825]: VDR version 0.71 started
Feb 11 05:45:22 wald5 vdr[3825]: loading ./setup.conf
Feb 11 05:45:22 wald5 vdr[3825]: loading ./channels.conf
Feb 11 05:45:22 wald5 vdr[3825]: loading ./timers.conf
Feb 11 05:45:22 wald5 vdr[3825]: loading ./commands.conf
Feb 11 05:45:22 wald5 vdr[3825]: probing /dev/video0
Feb 11 05:45:22 wald5 vdr[3827]: EIT processing thread started (pid=3827) - master
Feb 11 05:45:22 wald5 vdr[3825]: probing /dev/video1
Feb 11 05:45:22 wald5 vdr[3828]: EIT processing thread started (pid=3828)
Feb 11 05:45:22 wald5 vdr[3825]: found 2 video devices
Feb 11 05:45:22 wald5 vdr[3825]: setting primary DVB to 2
Feb 11 05:45:22 wald5 vdr[3825]: switching to channel 36
Feb 11 05:45:23 wald5 vdr[3829]: LIRC remote control thread started (pid=3829)
Feb 11 05:45:23 wald5 vdr[3825]: SVDRP listening on port 2001
Feb 11 05:58:56 wald5 -- MARK --
Feb 11 06:11:39 wald5 kernel: outcommand error 1
Feb 11 06:11:40 wald5 kernel: outcommand error 1
Feb 11 06:11:40 wald5 kernel: commandrequest error
Feb 11 06:11:41 wald5 kernel: dvb: ARM RESET
Feb 11 06:12:10 wald5 vdr[3825]: ERROR: channel 18 not sync'ed (front.sync=0)!
Feb 11 06:12:10 wald5 vdr[3825]: retrying
Feb 11 06:12:12 wald5 vdr[3825]: ERROR: channel 18 not sync'ed (front.sync=0)!
Feb 11 06:12:12 wald5 vdr[3825]: retrying

(similar messages repeated hundreds of times)

Feb 11 06:33:57 wald5 vdr[3825]: ERROR: channel 1 not sync'ed (front.sync=20)!
Feb 11 06:33:57 wald5 vdr[3825]: retrying
Feb 11 06:34:00 wald5 vdr[3825]: ERROR: channel 2 not sync'ed (front.sync=0)!
Feb 11 06:34:00 wald5 vdr[3825]: retrying
Feb 11 06:34:00 wald5 kernel: commandrequest error
Feb 11 06:34:00 wald5 kernel: dvb: filter shutdown error :0
Feb 11 06:34:02 wald5 kernel: outcommand error 1
Feb 11 06:34:02 wald5 kernel: commandrequest error
Feb 11 06:34:02 wald5 kernel: dvb: ARM RESET
Feb 11 06:34:02 wald5 kernel: dvb: filter shutdown error :0
Feb 11 06:34:02 wald5 kernel: dvb: filter shutdown error :65535
Feb 11 06:34:02 wald5 last message repeated 3 times
Feb 11 06:34:28 wald5 vdr[3825]: ERROR: channel 3 not sync'ed (front.sync=0)!
Feb 11 06:34:28 wald5 vdr[3825]: retrying
Feb 11 06:34:31 wald5 vdr[3825]: ERROR: channel 3 not sync'ed (front.sync=0)!
Feb 11 06:34:31 wald5 vdr[3825]: retrying

(similar messages repeated hundreds of times)

Feb 11 08:44:15 wald5 vdr[4656]: ERROR: channel 25 not sync'ed (front.sync=0)!
Feb 11 08:44:15 wald5 vdr[4656]: retrying
Feb 11 08:44:39 wald5 vdr[4656]: ERROR: channel 32 not sync'ed (front.sync=0)!
Feb 11 08:44:39 wald5 vdr[4656]: retrying
Feb 11 08:44:39 wald5 kernel: commandrequest error
Feb 11 08:44:39 wald5 kernel: dvb: filter shutdown error :0
Feb 11 08:44:41 wald5 kernel: outcommand error 1
Feb 11 08:44:41 wald5 kernel: commandrequest error
Feb 11 08:44:41 wald5 kernel: dvb: ARM RESET
Feb 11 08:44:41 wald5 kernel: dvb: filter shutdown error :0
Feb 11 08:44:41 wald5 kernel: dvb: filter shutdown error :65535
Feb 11 08:44:41 wald5 last message repeated 3 times
Feb 11 08:44:44 wald5 vdr[4656]: ERROR: channel 32 not sync'ed (front.sync=0)!
Feb 11 08:44:44 wald5 vdr[4656]: retrying
Feb 11 08:44:47 wald5 vdr[4656]: ERROR: channel 32 not sync'ed (front.sync=0)!
Feb 11 08:44:47 wald5 vdr[4656]: retrying
Feb 11 08:44:49 wald5 vdr[4656]: ERROR: channel 1 not sync'ed (front.sync=0)!
Feb 11 08:44:49 wald5 vdr[4656]: retrying
Feb 11 08:44:52 wald5 vdr[4656]: ERROR: channel 1 not sync'ed (front.sync=20)!
Feb 11 08:44:52 wald5 vdr[4656]: retrying
Feb 11 08:44:55 wald5 vdr[4656]: ERROR: channel 1 not sync'ed (front.sync=0)!
Feb 11 08:44:55 wald5 vdr[4656]: retrying
Feb 11 08:45:18 wald5 vdr[4656]: ERROR: channel 2 not sync'ed (front.sync=0)!
Feb 11 08:45:18 wald5 vdr[4656]: retrying
Feb 11 08:45:21 wald5 vdr[4656]: ERROR: channel 2 not sync'ed (front.sync=0)!
Feb 11 08:45:21 wald5 vdr[4656]: retrying
Feb 11 08:45:23 wald5 vdr[4656]: ERROR: channel 2 not sync'ed (front.sync=0)!
Feb 11 08:45:23 wald5 vdr[4656]: retrying
Feb 11 08:45:26 wald5 vdr[4656]: ERROR: channel 3 not sync'ed (front.sync=0)!
Feb 11 08:45:26 wald5 vdr[4656]: retrying
Feb 11 08:45:29 wald5 vdr[4656]: ERROR: channel 3 not sync'ed (front.sync=0)!
Feb 11 08:45:29 wald5 vdr[4656]: retrying
Feb 11 08:45:31 wald5 vdr[4656]: ERROR: channel 3 not sync'ed (front.sync=0)!
Feb 11 08:45:31 wald5 vdr[4656]: retrying
Feb 11 08:45:55 wald5 vdr[4656]: ERROR: channel 5 not sync'ed (front.sync=0)!
Feb 11 08:45:55 wald5 vdr[4656]: retrying
Feb 11 08:45:58 wald5 vdr[4656]: ERROR: channel 5 not sync'ed (front.sync=0)!
Feb 11 08:45:58 wald5 vdr[4656]: retrying
Feb 11 08:46:00 wald5 vdr[4656]: ERROR: channel 5 not sync'ed (front.sync=0)!
Feb 11 08:46:00 wald5 vdr[4656]: retrying
Feb 11 08:46:03 wald5 vdr[4656]: ERROR: channel 7 not sync'ed (front.sync=20)!
Feb 11 08:46:03 wald5 vdr[4656]: retrying
Feb 11 08:46:25 wald5 vdr[4656]: saved setup to ./setup.conf
Feb 11 08:46:26 wald5 vdr[4656]: exiting
Feb 11 08:46:36 wald5 kernel: dvb: 2 dvb(s) released properly.
Feb 11 08:46:36 wald5 kernel: VES1893: detach_client
Feb 11 08:46:36 wald5 kernel: VES1893: detach_client
Feb 11 08:46:36 wald5 kernel: VES1893: attaching VES1893 at 0x10 to adapter saa7146(1)
Feb 11 08:46:37 wald5 kernel: VES1893: attaching VES1893 at 0x10 to adapter saa7146(2)
Feb 11 08:46:39 wald5 kernel: dvb: ARM firmware successfully loaded.
Feb 11 08:46:39 wald5 kernel: dvb: firmware = f0240009
Feb 11 08:46:39 wald5 kernel: dvb: MAC = 00 d0 5c 1e 8b ab 
Feb 11 08:46:41 wald5 kernel: dvb: ARM firmware successfully loaded.
Feb 11 08:46:41 wald5 kernel: dvb: firmware = f0240009
Feb 11 08:46:41 wald5 kernel: dvb: MAC = 00 d0 5c 1f 10 7a 
Feb 11 08:46:41 wald5 kernel: dvb: 2 dvb(s) found!
Feb 11 08:46:41 wald5 kernel: tuner: chip found @ 0x61
Feb 11 08:46:42 wald5 kernel: tuner: chip found @ 0x61
Feb 11 08:46:43 wald5 su: (to cko) cko on /dev/tty2
Feb 11 08:46:43 wald5 vdr[4822]: VDR version 0.71 started
Feb 11 08:46:43 wald5 vdr[4822]: loading ./setup.conf
Feb 11 08:46:43 wald5 vdr[4822]: loading ./channels.conf
Feb 11 08:46:43 wald5 vdr[4822]: loading ./timers.conf
Feb 11 08:46:43 wald5 vdr[4822]: loading ./commands.conf
Feb 11 08:46:43 wald5 vdr[4822]: probing /dev/video0
Feb 11 08:46:43 wald5 vdr[4824]: EIT processing thread started (pid=4824) - master
Feb 11 08:46:43 wald5 vdr[4822]: probing /dev/video1
Feb 11 08:46:44 wald5 vdr[4825]: EIT processing thread started (pid=4825)
Feb 11 08:46:44 wald5 vdr[4822]: found 2 video devices
Feb 11 08:46:44 wald5 vdr[4822]: setting primary DVB to 2
Feb 11 08:46:44 wald5 vdr[4822]: switching to channel 36
Feb 11 08:46:44 wald5 vdr[4826]: LIRC remote control thread started (pid=4826)
Feb 11 08:46:44 wald5 vdr[4822]: SVDRP listening on port 2001
Feb 11 08:59:00 wald5 -- MARK --
Feb 11 09:05:00 wald5 vdr[4822]: timer 1 start
Feb 11 09:05:00 wald5 vdr[4822]: switching to channel 27
Feb 11 09:05:00 wald5 vdr[4822]: record /video/DieWochenshow/2001-02-11.09:05.02.07.rec
Feb 11 09:05:00 wald5 vdr[4822]: creating directory /video/DieWochenshow
Feb 11 09:05:00 wald5 vdr[4822]: creating directory /video/DieWochenshow/2001-02-11.09:05.02.07.rec
Feb 11 09:05:00 wald5 vdr[4822]: recording to '/video/DieWochenshow/2001-02-11.09:05.02.07.rec/001.vdr'
Feb 11 09:05:00 wald5 vdr[4850]: recording thread started (pid=4850)
Feb 11 09:19:00 wald5 -- MARK --
Feb 11 09:30:00 wald5 /USR/SBIN/CRON[4893]: (root) CMD (/usr/local/bin/rdate -s wald >>/var/tmp/time_log) 
Feb 11 09:41:21 wald5 vdr[4850]: recording to '/video/DieWochenshow/2001-02-11.09:05.02.07.rec/002.vdr'
Feb 11 09:41:56 wald5 mountd[229]: NFS mount of / attempted from 158.225.25.15 
Feb 11 09:41:56 wald5 mountd[229]: / has been mounted by 158.225.25.15 
Feb 11 09:59:00 wald5 -- MARK --
Feb 11 10:15:01 wald5 vdr[4850]: end recording thread
Feb 11 10:15:01 wald5 vdr[4822]: buffer stats: 780272 free, 0 overflows, limit exceeded 0 times
Feb 11 10:15:01 wald5 vdr[4822]: timer 1 stop
Feb 11 10:15:01 wald5 vdr[4822]: deleting timer 1
Feb 11 10:30:00 wald5 /USR/SBIN/CRON[5016]: (root) CMD (/usr/local/bin/rdate -s wald >>/var/tmp/time_log) 
Feb 11 10:59:00 wald5 -- MARK --
Feb 11 11:15:02 wald5 vdr[4822]: saved setup to ./setup.conf
Feb 11 11:15:02 wald5 vdr[4822]: exiting


--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index