[mythtv-users] Re-arranging video devices on every boot?

Sam Logen starz909 at yahoo.com
Thu Jan 24 22:52:34 UTC 2008


--- Kevin Kuphal <kkuphal at gmail.com> wrote:

> On Jan 24, 2008 3:40 AM, Bruce Richardson
> <itsbruce at workshy.org> wrote:
> 
> > On Wed, Jan 23, 2008 at 10:48:13PM -0600, Ty Unes
> wrote:
> > > Very frustrating!
> > >
> > > After (almost) every reboot (not that I have to
> reboot much) my video
> > > devices are re-arranged so that the listings
> don't work anymore and
> > > mythtv is screwed up. I have to go and delete
> all my video devices,
> > > reconfigure them, and re-work the channel
> listings by hand again. What a
> > > pain! Could someone advise me as to why this is
> happening and/or how I
> > > can stop it from happening?
> >
> > Make some udev rules that uniquely each card and
> create consistent names
> > for them.  Then make mythtv use your device names
> rather than the
> > defaults.
> 
> 
> That all sounds fine and good but I have yet to see
> a concrete example of
> this here or in the Wiki that shows how to do this
> with repeatable success.
> Until then, I continue to use the ivtv option as it
> works.  If you have one,
> *please* put it in the Wiki as this question comes
> up many times
> 
> Kevin
> > _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 


Well, make no mistake about it, writing udev rules can
be confusing for beginners; it takes a lot of
hand-holding.  Gentoo probably has the best howtos for
situations such as these.  Check their wiki on udev
here:
http://gentoo-wiki.com/HOWTO_Customizing_UDEV#The_basics_of_writing_rules

Here's a sample udev rule:
  KERNEL=="video[0-9]*",  ATTR{name}=="ivtv0 encoder
MPG", SYMLINK+="video-mpeg"

That's in my '/etc/udev/rules.d/51-udev.rules' file.

Now I can connect to the hardware encoder of my
specific pvr-150 at /dev/video-mpeg.  You can call the
symlink whatever you want, and even put it in it's own
directory in the '/dev' directory, such as with a
  SYMLINK+="capture/video-mpeg"

Now the device node symlink 'video-mpeg' is in
'/dev/capture'

The important part that tells udev what hardware to
attribute to the link is given by the string between
the first and second comma.  You have to find a unique
identifier for your hardware, such as a name or serial
#.  The program 'udevinfo' can help you find one.

You can find unique identifiers for a hardware node
with this command:
  udevinfo -a -p $(udevinfo -q path -n /dev/sda)

(replace '/dev/sda' with the device node you want to
look up, such as '/dev/video1').  Make sure the line
isn't identical to other cards you have.

That should get you started.

Sam


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the mythtv-users mailing list