[mythtv-users] Udev Help

Mike Holden mythtv at mikeholden.org
Wed Feb 3 00:52:20 UTC 2010


greg wrote:
> Alex Harford wrote:
>> On Tue, Feb 2, 2010 at 3:00 PM, greg <greg12866 at nycap.rr.com> wrote:
>>
>>
>>> 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"
>>>
>>
>> Are you sure that the vendor of the HD PVR is 0x8086?  That's Intel's
>> vendor ID.  I think you've gone too far down the tree.
>>
>> Can you post the result of
>> udevadm info -a -p `udevadm info --query=path --name=/dev/video1`
>>
>> for both devices?
>>
>> Just FYI, here is what I do:
>> SUBSYSTEM=="video4linux", ATTRS{vendor}=="0x4444",
>> ATTRS{device}=="0x0803", ATTR{index}=="0", SYMLINK+="pvr350"
>> SUBSYSTEM=="video4linux", ATTRS{vendor}=="0x4444",
>> ATTRS{device}=="0x0016", ATTRS{subsystem_vendor}=="0x0070",
>> ATTRS{subsystem_device}=="0xe817", ATTR{index}=="0",
>> SYMLINK+="pvr500-1"
>> SUBSYSTEM=="video4linux", ATTRS{vendor}=="0x4444",
>> ATTRS{device}=="0x0016", ATTRS{subsystem_vendor}=="0x0070",
>> ATTRS{subsystem_device}=="0xe807", ATTR{index}=="0",
>> SYMLINK+="pvr500-2"

Couple of notes here, which may or may not help. I recently upgraded from Fedora 10 to
11, and my already-working udev rules stopped working. The devices in question for me
are IR receivers (I have an imon internal, and mce external.

The problem turned out to be that I had an old ule file left over from F10 that was
getting in the way. Maybe the order of evaluation of rules files changed from one Linux
version (or udev version) to another. In my case, the rogue file was the last in the
list, since it wasn't prefixed by a number. I deleted the rogue file and all was well.

udevtest was a very useful command to use to debug this, and it may help you. It
certainly helped me a lot, as I could see that my rule was matching, but then being
overridden by the 2nd file which also matched. It should also show you if none of your
rules are matching.

This site was very helpful, and told me everything I needed to know:
http://reactivated.net/writing_udev_rules.html

With my rules, I don't add an additional symlink for the device, I rename it so that the
ony devices created are of my naming, as follows:

[root at puzzle rules.d]# cat 99-lirc-local.rules
BUS=="usb", SYSFS{product}=="eHome Infrared Transceiver",
SYSFS{manufacturer}=="Philips", KERNEL=="lirc?", NAME="lirc_irblaster"
BUS=="usb", SYSFS{idVendor}=="15c2", SYSFS{idProduct}=="ffdc", KERNEL=="lirc?",
NAME="lirc_imon"

[root at puzzle rules.d]# ls -l /dev/*lirc*
lrwxrwxrwx 1 root root      9 2010-01-30 00:30 /dev/lirc -> lirc_imon
srw-rw-rw- 1 root root      0 2010-01-30 00:30 /dev/lircd
crw-rw---- 1 root lirc 248, 0 2010-01-30 00:30 /dev/lirc_imon
crw-rw---- 1 root lirc 248, 1 2010-01-30 00:30 /dev/lirc_irblaster

Note that the rules file has a single line per device, despite whatever wrapping and
mangling this email may suffer from!

You can see that /dev/lirc_imon and /dev/lirc_irblaster are created as base devices, as
per my name rules. Your rules are adding an extra symlink to the device, which may be
why Myth is still using the video<N> device file instead.

Also, as noted by another poster, you are incorporating elements from the parent device,
which will cause your rule to fail.
-- 
Mike Holden

http://www.by-ang.com - the place to shop
for all manner of hand crafted items,
including Jewellery, Greetings Cards and Gifts



More information about the mythtv-users mailing list