RE: [mythtv-users] Automatic startup with tv-out - solved

2005-01-08 Thread mythtv-users
Mark wrote: 
 
 On Thu, 06 Jan 2005 21:41:02 +0100, Sigurd Nes 
 [EMAIL PROTECTED] wrote:
  sigurdne wrote:
   The X-seesion won't start because /dev/fb1 is not present at the 
   time it tries to start. I do all the modprobes from a 
 start-script 
   (usr/local/bin/start-ivtv) initiated from '/etc/rc.d/rc.local'
   I guess what I need to do is to make sure that the 
 start-script is initiated
   before the X-session is started. How can I accomplish this ?
  
   Sigurd
  
  
  Sollution:
  1) Configure gdm to autologin with user mythtv
  2) Start gdm with /usr/bin/gdm at the end of the start-script
 
 
 
 i'm having a similar problem to this one i think.   
 setup:
 PVR 350 w/ TV out
 
 Behavior:
 ON Startup.
 Computer boots up normaly
 rc.local runs but cannot complete stuff becuase /dev/fb1 is 
 not there X crashes. gdm does not start ...basically 
 autostart all is dead
 
 I can then recover it by
 manualy run rc.local again
 startx
 login (auto login doesn't work now)
 start mythfrontend (KDE autostart didnt' work either)

A problem I came across is that sometimes the device driver modules
needed a slight pause inbetween 
loading to allow the /dev char devices to be created, there are two ways
round this.

1) stick a couple of sleep statements in your rc.local, ie

modprobe ivtv
sleep 5
modprobe ivtv-fb
sleep 5

2) stick a little loop in there to check for the devices and loop until
they're there, eg

(this is the script I use)

#/bin/bash
# Name: load-ivtv
# Author  : David Sharp @ 04/01/2005
# Purpose : Load ivtv driver checking for char devices before continuing
to load
#   next module.
# Mod.Hist:
# 04/01/05: New script

# Functions

function wait_for_device(){
Device=${1} # device is full path name, eg /dev/fb1
Count=1
Count_Timeout=100 # number of seconds to wait before timing out
  # needed as otherwise this will loop forever
  # if for whatever reason the device never appears
echo -n Waiting for device ${Device} to appear.
while [ ! -c ${Device} ]
do
   let Count=Count+1
   sleep 1
   echo -n .
   if [ ${Count} = ${Count_Timeout} ]
   then
  echo
  echo Timeout waiting for device ${Device}
  sleep 1
  return 1
  break
   fi
done
}

# Main script

modprobe ivtv
wait_for_device /dev/video0
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
   /usr/lib/ivtv/ptune.pl -f pal-europe-west --channel 53 # tune in
channel otherwise errors in log   
   dd if=/dev/video0 of=/dev/video16 bs=64k# output to /video16
otherwise ivtvdev/X tv out doesn't work
   sleep 5
   kill %1
   modprobe ivtv-fb
   wait_for_device /dev/fb1
fi

HTH

Druid







___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Re: [mythtv-users] Automatic startup with tv-out - solved

2005-01-06 Thread Sigurd Nes
sigurdne wrote:
The X-seesion won't start because /dev/fb1 is not present at the time it tries 
to start.
I do all the modprobes from a start-script (usr/local/bin/start-ivtv) 
initiated from '/etc/rc.d/rc.local'
I guess what I need to do is to make sure that the start-script is initiated 
before the X-session is started. How can I accomplish this ?

Sigurd

Sollution:
1) Configure gdm to autologin with user mythtv
2) Start gdm with /usr/bin/gdm at the end of the start-script
Sigurd
___
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users