LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 02-22-2007, 07:49 PM   #1
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Rep: Reputation: 15
Help writing UDEV rules for FC6


Hi,

I'm having problems getting a UDEV rule to work under FC6. I have a PVR500 and have one of the two capture symlinks working, but not sure why the second isn't working correctly.. I'll include everything I've looked at to debug this.

First the udev rules in /etc/udev/rules.d/10-local.rules
# Local Rules
DRIVER=="ivtv", SYSFS{name}=="ivtv? encoder MPEG", ID=="0000:06:08.0", SYMLINK+="pvr_500_1"
DRIVER=="ivtv", SYSFS{name}=="ivtv? encoder MPEG", ID=="0000:06:09.0", SYMLINK+="pvr_500_2"
DRIVER=="ivtv", SYSFS{name}=="ivtv? encoder PCM audio", ID=="0000:06:08.0", SYMLINK+="pvr_500_1_audio"
DRIVER=="ivtv", SYSFS{name}=="ivtv? encoder PCM audio", ID=="0000:06:09.0", SYMLINK+="pvr_500_2_audio"

output from ll /dev/pvr_500_*
lrwxrwxrwx 1 root root 6 Feb 22 20:11 /dev/pvr_500_1 -> video1
lrwxrwxrwx 1 root root 7 Feb 22 20:11 /dev/pvr_500_1_audio -> video24

output of lspci
00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)
00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600 GT] (rev a2)
05:06.0 PCI bridge: Hint Corp HB6 Universal PCI-PCI bridge (non-transparent mode) (rev 11)
05:08.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
05:08.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
06:08.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
06:09.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

output of devtest for video0-2 I also have a HD3000 card:

udevtest /class/video4linux/video0
main: looking at device '/class/video4linux/video0' from subsystem 'video4linux'
udev_rules_get_name: add symlink 'video'
udev_rules_get_name: no node name set, will use kernel name 'video0'
udev_device_event: device '/class/video4linux/video0' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/video0', major = '81', minor = '0', mode = '0660', uid = '0', gid = '0'
udev_node_add: creating symlink '/dev/video' to 'video0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/video0 /dev/video'
[root@Coruscant ~]# udevtest /class/video4linux/video1
main: looking at device '/class/video4linux/video1' from subsystem 'video4linux'
udev_rules_get_name: add symlink 'pvr_500_1'
udev_rules_get_name: no node name set, will use kernel name 'video1'
udev_device_event: device '/class/video4linux/video1' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/video1', major = '81', minor = '1', mode = '0660', uid = '0', gid = '0'
udev_node_add: creating symlink '/dev/pvr_500_1' to 'video1'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/video1 /dev/pvr_500_1'
[root@Coruscant ~]# udevtest /class/video4linux/video2
main: looking at device '/class/video4linux/video2' from subsystem 'video4linux'
udev_rules_get_name: add symlink 'pvr_500_2'
udev_rules_get_name: no node name set, will use kernel name 'video2'
udev_db_get_device: no db file to read /dev/.udev/db/class@video4linux@video2: No such file or directory
udev_node_add: creating device node '/dev/video2', major = '81', minor = '2', mode = '0660', uid = '0', gid = '0'
udev_node_add: creating symlink '/dev/pvr_500_2' to 'video2'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/video2 /dev/pvr_500_2'

The only thing I've noticed that is strange is the no db file to read message.

Other than that I'm lost. Any help is greatly appriciated
 
Old 02-23-2007, 05:29 AM   #2
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Original Poster
Rep: Reputation: 15
Still have no idea what I did wrong, however I did find more information:

I found the following command to get information about the ids while trying to figure out what is wrong. It still looks like what I have should work, but figured more information might help someone debug this.

I originally thought that this thread would be fedora specific.. I'm less inclined to believe that now. If it is not can someone move it to the proper forum?


udevinfo -a -p /class/video4linux/video0

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/class/video4linux/video0':
KERNEL=="video0"
SUBSYSTEM=="video4linux"
SYSFS{name}=="cx88_0_ video _pcHDTV HD3000 HD"
SYSFS{dev}=="81:0"

looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:08.0':
ID=="0000:05:08.0"
BUS=="pci"
DRIVER=="cx8800"
SYSFS{msi_bus}==""
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v000014F1d00008800sv00007063sd00003000bc04sc00i00"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="18"
SYSFS{class}=="0x040000"
SYSFS{subsystem_device}=="0x3000"
SYSFS{subsystem_vendor}=="0x7063"
SYSFS{device}=="0x8800"
SYSFS{vendor}=="0x14f1"

looking at parent device '/devices/pci0000:00/0000:00:09.0':
ID=="0000:00:09.0"
BUS=="pci"
DRIVER==""
SYSFS{msi_bus}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v000010DEd0000005Csv00000000sd00000000bc06sc04i01"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="0"
SYSFS{class}=="0x060401"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x005c"
SYSFS{vendor}=="0x10de"

looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""

udevinfo -a -p /class/video4linux/video1

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/class/video4linux/video1':
KERNEL=="video1"
SUBSYSTEM=="video4linux"
SYSFS{name}=="ivtv0 encoder MPEG"
SYSFS{dev}=="81:1"

looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0/0000:06:08.0':
ID=="0000:06:08.0"
BUS=="pci"
DRIVER=="ivtv"
SYSFS{msi_bus}==""
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v00004444d00000016sv00000070sd0000E807bc04sc00i00"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="16"
SYSFS{class}=="0x040000"
SYSFS{subsystem_device}=="0xe807"
SYSFS{subsystem_vendor}=="0x0070"
SYSFS{device}=="0x0016"
SYSFS{vendor}=="0x4444"

looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0':
ID=="0000:05:06.0"
BUS=="pci"
DRIVER==""
SYSFS{msi_bus}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v00003388d00000021sv00000000sd00000000bc06sc04i00"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="0"
SYSFS{class}=="0x060400"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x0021"
SYSFS{vendor}=="0x3388"

looking at parent device '/devices/pci0000:00/0000:00:09.0':
ID=="0000:00:09.0"
BUS=="pci"
DRIVER==""
SYSFS{msi_bus}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v000010DEd0000005Csv00000000sd00000000bc06sc04i01"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="0"
SYSFS{class}=="0x060401"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x005c"
SYSFS{vendor}=="0x10de"

looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""

udevinfo -a -p /class/video4linux/video2

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/class/video4linux/video2':
KERNEL=="video2"
SUBSYSTEM=="video4linux"
SYSFS{name}=="ivtv1 encoder MPEG"
SYSFS{dev}=="81:2"

looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0/0000:06:09.0':
ID=="0000:06:09.0"
BUS=="pci"
DRIVER=="ivtv"
SYSFS{msi_bus}==""
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v00004444d00000016sv00000070sd0000E817bc04sc00i00"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="17"
SYSFS{class}=="0x040000"
SYSFS{subsystem_device}=="0xe817"
SYSFS{subsystem_vendor}=="0x0070"
SYSFS{device}=="0x0016"
SYSFS{vendor}=="0x4444"

looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:05:06.0':
ID=="0000:05:06.0"
BUS=="pci"
DRIVER==""
SYSFS{msi_bus}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v00003388d00000021sv00000000sd00000000bc06sc04i00"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="0"
SYSFS{class}=="0x060400"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x0021"
SYSFS{vendor}=="0x3388"

looking at parent device '/devices/pci0000:00/0000:00:09.0':
ID=="0000:00:09.0"
BUS=="pci"
DRIVER==""
SYSFS{msi_bus}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{enable}=="1"
SYSFS{modalias}=="pci:v000010DEd0000005Csv00000000sd00000000bc06sc04i01"
SYSFS{local_cpus}=="00000000,00000001"
SYSFS{irq}=="0"
SYSFS{class}=="0x060401"
SYSFS{subsystem_device}=="0x0000"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{device}=="0x005c"
SYSFS{vendor}=="0x10de"

looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""
 
Old 02-23-2007, 06:30 PM   #3
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Original Poster
Rep: Reputation: 15
Still finding things out slowly about udev. The only line that looks to be in error from above of the udevtest /class/video4linux/video2 is this:
udev_db_get_device: no db file to read /dev/.udev/db/class@video4linux@video2: No such file or directory

when I go there I get the following listing:
ls
block@fd0 block@sdb@sdb4 class@input@mice class@sound@pcmC0D2p
block@hda block@sdb@sdb5 class@misc@device-mapper class@sound@seq
block@hdc class@cpuid@cpu0 class@msr@msr0 class@sound@timer
block@ram0 class@dvb@dvb0.demux0 class@printer@lp0 class@usb_device@usbdev1.1
block@ram1 class@dvb@dvb0.dvr0 class@sound@controlC0 class@usb_device@usbdev2.1
block@sda class@dvb@dvb0.frontend0 class@sound@controlC1 class@video4linux@radio0
block@sda@sda1 class@dvb@dvb0.net0 class@sound@midi1 class@video4linux@vbi0
block@sdb class@input@input0@event0 class@sound@midiC1D0 class@video4linux@video0
block@sdb@sdb1 class@input@input1@event1 class@sound@pcmC0D0c class@video4linux@video1
block@sdb@sdb2 class@input@input1@mouse0 class@sound@pcmC0D0p class@video4linux@video24
block@sdb@sdb3 class@input@input2@event2 class@sound@pcmC0D1c

The contents of class@video4linux@video0
N:video0
S:video
M:81:0

The contents of class@video4linux@video1
N:video1
Svr_500_1
M:81:1

To me it looks like class@video4linux@video0 is the first capture card definition, and class@video4linux@video1 is the second, but when I use the id from lspci it links up the class@video4linux@video1 just fine, but thinks there should be a class@video4linux@video2 when there is no file like that created.

Not sure what it all means, but thought I would share in hopes someone could answer.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating rules for udev wnaLinux Slackware 5 01-03-2008 09:21 AM
writing udev rules doralsoral Linux - Software 10 11-19-2006 02:45 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
LXer: Writing udev rules LXer Syndicated Linux News 0 06-11-2006 11:12 PM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM


All times are GMT -5. The time now is 06:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration