start VDR with a delay of 4-5sec
#1
Is it possible to start VDR with a delay of 4-5 sec?

From time to time I have the problem that the VDR doesn't found a dvb-device because is not mountet
until VDR starts... that also happend if I rebbot the HTPC... So I thought it could help if VDR starts with a delay...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#2
I start vdr with upstart triggered by a dvb-ready event fired by udev when it detects the device.

So the answer is yes of course, if you don't want to use the mostly old fashioned startup scripts provided by the various distros.
Reply
#3
thanks, for answer...

so i had a look into the system and I only have the vdr.conf...
If I understand right, I've to make an upstart script for VDR instand of the vdr.conf and there
I've to build in the dvb-ready event fired by udev... right

If it is something like this I've to for a HowTo...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#4
My udev rule:
Code:
#DVB
SUBSYSTEM=="dvb" , KERNEL=="dvb0.frontend0", ACTION=="add", RUN+="/sbin/initctl --quiet emit --no-wait dvb-ready"

upstart:

Code:
description "vdr"
start on (local-filesystems
            and net-device-up IFACE=lo
          and dvb-ready)

stop on runlevel [!2345]
nice -1

pre-start script
  while [ ! -e /dev/dvb/adapter0/frontend0 ]
  do
    sleep 1
  done
end script

script
  su -c /usr/local/bin/runvdr xbmc > /var/vdr/vdr.log 2>&1
end script
Reply
#5
Thanks for sharing...

I'll try...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#6
You could also add that check for the dvb adapter in your vdr startup script in /etc/init.d/vdr

My startvdr looks like this (I've got 2 dvb adapters so waiting for the second to be ready)

Code:
startvdr()
{
    if [ "$ENABLED" != "0" ] ; then
        # only start vdr if there is no other instance running
        if start-stop-daemon --start --startas $DAEMON --test \
            --name $(basename $DAEMON) --pidfile $PIDFILE >/dev/null
        then
        while ! [ -e /dev/dvb/adapter1/frontend0 ]; do
  sleep 1s;
done

Complete file: http://paste.ubuntu.com/6918149/
Reply
#7
The dynamite-plugin allows to start independ to the dvb devices. They will be added by the plugin to the vdr when they come. The vdr can be started even without any dvb device.

Gerald
Reply
#8
Today I had a litle bit time think about the udev-rule and upstart script.

So I think I've to do as follow:

create a udev.rule /etc/udev/rules.d/set_VDR_ready.rule
Code:
#DVB
SUBSYSTEM=="dvb" , KERNEL=="dvb0.frontend0", ACTION=="add", RUN+="/sbin/initctl --quiet emit --no-wait dvb-ready"

and create a upstart script /etc/init/vdr.conf
Code:
description "vdr-upstart"
start on (local-filesystems
            and net-device-up IFACE=lo
          and dvb-ready)

stop on runlevel [!2345]
nice -1

pre-start script
  while [ ! -e /dev/dvb/adapter0/frontend0 ]
  do
    sleep 1
  done
end script

script
  su -c /usr/sbin/runvdr > /var/vdr/vdr.log 2>&1
end script

I changed su -c /usr/sbin/runvdr because I found the runvdr only in this path...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#9
The older Series 7 Board from Asrock had the Bug, that they don't detect the PCIe Card 100%, some Bios Versions detected it only sometimes. Maybe this Patch won't help then, when the BIOS doesn't recognize
the Card properly?!

But i would like to have this Delay also, cause i think my Setting in OE (Start Confluence on TV Screen) doesn't work because the vdr/vnsi isn't ready when xbmc wants to go into TV Screen.
| myHTPC |
Reply
#10
So I've test it yesterday and it works perfect for me...


thanks again to FernetMenta...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply

Logout Mark Read Team Forum Stats Members Help
start VDR with a delay of 4-5sec0