[mythtv-users] Udev Help

Alan Young ayoung at teleport.com
Wed Feb 3 00:32:36 UTC 2010


greg wrote:
> John P Poet wrote:
>> On Tue, Feb 2, 2010 at 4:00 PM, greg <greg12866 at nycap.rr.com> wrote:
>>  
>>>  I've been fighting an issue where my HD_PVR and Pvr-150 has been 
>>> swapping
>>> nodes.. I have tried every solution I can find, and none of them seem to
>>> work..
>>> I have developed 2 rules and they seemed to work,but after a reboot they
>>> still occasionally still swap..
>>> My question is would someone take a look at these rules and see if 
>>> there is
>>> something obvious I am missing..
>>>
>>> KERNEL=="video*", ATTR{name}=="ivtv0 encoder MPG", 
>>> ATTRS{vendor}=="0x4444",
>>> SYMLINK+="video_PVR150"
>>>
>>> KERNEL=="video*", ATTR{name}=="Hauppauge HD PVR", 
>>> ATTRS{vendor}=="0x8086",
>>> SYMLINK+="video_hdpvr"
>>>
>>>     
>>
>> Even with those rules, are you still trying to use /dev/video0 and
>> /dev/video1 in Myth?  If so, that is your problem.  Using the rules
>> you have defined there, use /dev/video_PVR150 and /dev/video_hdpvr in
>> Myth.
>>
>> John
>>   
> Thanks for that John..I tried what you said wrote (I also read that 
> solution when researching this problem),but each time I type in  
> /dev/video_PVR150 it reverts back to /dev/video1...
> 
> Back to the drawing board..

One of the major annoyances with udev is it's easy to try create rules, but it 
loves to match on what it wants to without telling you what it's actually 
using.  Even if udevinfo says there's an attribute for it... sigh.

Anyway make sure the device is getting created.   Open a console window and do 
a ls -l /dev/v* command.  Also, udev create rules are only created when the 
device is registered.  So you can test the HDPVR rule by just plugging and 
unplugging usb cable from the box.  But to test the PVR150 card, you'll need 
to reboot.  (Unless you're lucky enough to have a server that supports PCI 
hotplugging...)

And just to add to the others, here's what I ended up doing with my HDPVR and 
PVR250.  The ATTRS{serial} is the HDPVR's serial number which you can get from 
lsusb -v.  The PVR250 is a hack, but I gave up since I don't open the box much 
to rearrange cards. :-)

# These only works for single HDPVR as it uses the box's serial number
ACTION=="add",KERNEL=="video[0-9]",ATTRS{product}=="Hauppauge HD 
PVR",ATTRS{serial}=="00000000",symlink+="hdpvr"

# limited to specific PCI slot
ACTION=="add",KERNEL=="video[0-9]",ENV{ID_PATH}=="pci-0000:04:07.0",symlink+="pvr250"

Alan


More information about the mythtv-users mailing list