View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: UDEV help
PostPosted: Sun Nov 18, 2012 12:10 pm 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hi,

I've been struggling to get my UDEV rules to work properly to stop my tuner cards getting renumbered on reboot.

I have to say, though I am getting thoroughly confused.

My tuner setup is 2x Nova-HD-S2 cards which are DVS2 cards and a duel tuner Nova-T500.

Trying to cobble together a usable set of UDEV rules, however, I don't seem to be able work out what is what.

I have looked at the guide over at MythTV and here. I've also looked at the posts people have put on here.

So, with the Nova-HD-S2 is listed udevadm info -a -p $(udevadm info -q path -n /dev/video0) gives me:
Code:
/devices/pci0000:00/0000:00:1e.0/0000:04:00.0/video4linux/video0
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="cx88[0] video (Hauppauge WinTV-"
    ATTR{index}=="0"


However, it also has an entry as a DVB device.
Code:
KERNEL=="dvb1.dvr0"
    SUBSYSTEM=="dvb"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.2':
    KERNELS=="0000:04:00.2"
    SUBSYSTEMS=="pci"
    DRIVERS=="cx88-mpeg driver manager"
    ATTRS{vendor}=="0x14f1"
    ATTRS{device}=="0x8802"
    ATTRS{subsystem_vendor}=="0x0070"
    ATTRS{subsystem_device}=="0x6906"
    ATTRS{class}=="0x048000"
    ATTRS{irq}=="16"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""


I tried to set the adapter in the manner suggested for a non-dvb tuner and it didn't seem to make any difference.

How should I set my tuners permanently?

Any suggestions on how to get this right would be good. I also need some help with my dual tuner card.

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Sun Nov 18, 2012 7:46 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
I'm not familiar with either of the cards that your using so I'm not much help there.

I can tell you is that I've never had problem with a DVB side of the card changing id's, but I have had problems with the other tuner on the card.

I have a HD5500 card that the v4l side kept swapping from video0 to video1, and another mpeg tuner. I did write a rule for each one that linked video0 and video1 to a SYMLINK+="v4l/usbpvr" and SYMLINK+="v4l/HD5500

I would think that is the part of the problem that needs to be addressed. What output do you get when you run:

udevadm info -a -p $(udevadm info -q path -n /dev/video0)

And then:

udevadm info -a -p $(udevadm info -q path -n /dev/video1)

Thats where I'd start

Tim


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Nov 20, 2012 8:29 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hi Tim,

Thanks for the reply.

So for udevadm info -a -p $(udevadm info -q path -n /dev/video0) I get:
Code:
  looking at device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="cx88[0] video (Hauppauge WinTV-"
    ATTR{index}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0':
    KERNELS=="0000:04:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="cx8800"
    ATTRS{vendor}=="0x14f1"
    ATTRS{device}=="0x8800"
    ATTRS{subsystem_vendor}=="0x0070"
    ATTRS{subsystem_device}=="0x6906"
    ATTRS{class}=="0x040000"
    ATTRS{irq}=="16"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0':
    KERNELS=="0000:00:1e.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{vendor}=="0x8086"
    ATTRS{device}=="0x244e"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{subsystem_device}=="0x82d4"
    ATTRS{class}=="0x060401"
    ATTRS{irq}=="0"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""


And for video 1

Code:
   
looking at device '/devices/pci0000:00/0000:00:1e.0/0000:04:01.0/video4linux/video1':

    KERNEL=="video1"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="cx88[1] video (Hauppauge WinTV-"
    ATTR{index}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:01.0':
    KERNELS=="0000:04:01.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="cx8800"
    ATTRS{vendor}=="0x14f1"
    ATTRS{device}=="0x8800"
    ATTRS{subsystem_vendor}=="0x0070"
    ATTRS{subsystem_device}=="0x6906"
    ATTRS{class}=="0x040000"
    ATTRS{irq}=="17"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0':
    KERNELS=="0000:00:1e.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{vendor}=="0x8086"
    ATTRS{device}=="0x244e"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{subsystem_device}=="0x82d4"
    ATTRS{class}=="0x060401"
    ATTRS{irq}=="0"
    ATTRS{local_cpus}=="ff"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""


Hope that helps

Chirs

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Nov 20, 2012 10:17 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Chris,

Ok give this a try. in /etc/udev/rules.d create a file named 10-local.rules

Code:
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="cx88[0] video (Hauppauge WinTV-", ATTRS{vendor}=="0x14f1", SYMLINK+="v4l/Haup0"

KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="cx88[1] video (Hauppauge WinTV-", ATTRS{vendor}=="0x14f1", SYMLINK+="v4l/Haup1"


Reboot your machine and then do an

ls -l /dev/v4l

Hopefully you'll see something like this

Code:
drwxr-xr-x 2 root root 100 Nov 19 22:01 by-path
lrwxrwxrwx 1 root root   9 Nov 19 22:01 Haup0 -> ../video1
lrwxrwxrwx 1 root root   9 Nov 19 22:01 Haup1 -> ../video0


If you do it worked the rules worked. Then go into setup and use the following
Code:
 /dev/v4l/Haup0

 /dev/v4l/Haup1

as the paths to the devices.

Good luck.

Tim


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Nov 20, 2012 12:44 pm 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hi Tim,

No such luck I'm afraid.

ls -l /dev/v4l

Code:
2012-11-20 18:53:25.762872 C [1924] Python Backend Connection Couldn't connect to backend [127.0.0.1]:6543
Couldn't connect to MythTV service for status
[tophee@Lust /]$ ls -l /dev/v4l
total 0
drwxr-xr-x 2 root root 120 Nov 20 18:53 by-path



Cheers
Chris

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Nov 20, 2012 5:17 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Chris,

Try cutting down the length of ATTR{name}=="cx88[0] video (Hauppauge WinTV-" to

ATTR{name}=="cx88[0] "

I did have a problem with a long string in a rule as well. But the only other thing that I could find that is different between /dev/video0 and /dev/video1 is that
ATTRS{irq}=="16"
and
ATTRS{irq}=="17"

on the other, but I'm thinking that the irq could change at reboot time too. You could look into that.

Can you post the output of
Code:
udevadm info --query=all --name=/dev/video0
udevadm info --query=all --name=/dev/video1


As well.

If ATTR{name}=="cx88[0] " and ATTR{name}=="cx88[1] " doesn't work, remove them and just for grins use ATTRS{irq}=="16" and ATTRS{irq}=="17" instead.

Tim


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Sat Nov 24, 2012 9:24 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hi Tim,

No luck again with that.

My confusion lies in the fact that I don't understand why the Nova-HD-S2 cards are seen as a 'normal' card but register as a DVB card and then how to keep their number consistent.

I had another look at the dvb section of the MythTV UDev guide, I tried to cobble something together.

So for the Hauppauge Nova-HD-S2 cards the lines I used was
Code:
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x14f1", KERNELS=="0000:04:00.2", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter101/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x14f1", KERNELS=="0000:04:01.2", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter102/%%s $${K#*.}'", SYMLINK+="%c"


I was able to go into MythTV-Setup and use the 101 and 102 identifiers.
Now just to set up permanent links for my Nova-T500D card.

Thanks for your help Tim.

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Sat Nov 24, 2012 1:47 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Chris,

Sounds good. At least it sounds like your making progress.

Tim


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Mon Nov 26, 2012 12:09 pm 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Well, I thought it was sorted, but it seems not.

I ssh'd into my box to finish sorting my udev stuff out. However I was met with this:

Code:
Tuner Status:
--------------
    Tuner 1 (DVB) on Lust : Idle
    Tuner 2 (DVB) on Lust : Idle
    Tuner 3 (DVB) on Lust : Idle
    Tuner 4 (DVB) on Lust : Idle
Traceback (most recent call last):
  File "/usr/LH/bin/myth_status.py", line 63, in <module>
    c=be.getCurrentRecording(i)
  File "/usr/lib/python2.6/site-packages/MythTV/methodheap.py", line 197, in get                                                                          CurrentRecording
    return Program(res.split(BACKEND_SEP), db=self.db)
  File "/usr/lib/python2.6/site-packages/MythTV/mythproto.py", line 841, in __in                                                                          it__
    DictData.__init__(self, raw)
  File "/usr/lib/python2.6/site-packages/MythTV/altdict.py", line 141, in __init                                                                          __
    data = self._process(data)
  File "/usr/lib/python2.6/site-packages/MythTV/altdict.py", line 151, in _proce                                                                          ss
    raise MythError('Incorrect raw input length to DictData()')
MythTV.exceptions.MythError: Incorrect raw input length to DictData()


I am expecting to see 8 tuners (two each) for the four tunes I have.

It all seems to work, so what's happening?

Regards Chris

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Mon Apr 15, 2013 6:40 pm 
Offline
Joined: Mon May 29, 2006 4:58 pm
Posts: 58
I'm on LINHES 7.4 and getting the same errors when I ssh in. I have 2 Ceton Infinitv 4 PCIe tuners. One in my master backend and one in my slave backend. The tuner status shows good and seems to work on the master backend tuner but the slave backend tuner shows "error" under the status. They were all working and then all my upcoming recordings vanished and I couldn't schedule new recordings. Live TV worked and I could press R and record live TV. I deleted all the tuners, rebooted and added the tuners back in. That's when I came up with the ssh errors (that I've seen off and on while attempting to get these cards up) and got the errors on all 4 tuners on the slave backend. The upcoming recordings came back with the tuner re-add.
What should I check and what logs should I look at?
Thanks,
Joel

_________________
R7.4 Master Backend/Frontend 1 Ceton InfiniTV 4 AMD x4 9850/4GB/nVidia210 60GB SSD 5x2TB RAID5
Slave Backend/Frontend 1 Ceton InfiniTV 4 AMD 1050x6/4GB/NVidia 9500 40GB SSD 2x500GB SATA Maxtor
(Can't get 2nd Ceton tuner to work)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Mon Apr 15, 2013 8:41 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
The problem is that they are changing device id's when you reboot. I key is to create a udev rule that will handle the id switch and point to the correct device. You can check out this post for some more additional information.
viewtopic.php?f=21&t=22612


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Apr 16, 2013 12:08 pm 
Offline
Joined: Mon May 29, 2006 4:58 pm
Posts: 58
How can I completely get rid of the old tuner setup? I can go into the setup menu and delete all cards on my slave backend but then when I add the cards back it increments the tuner number so something is not getting cleared out. Do you know where the tuner number is stored? I'm all the way up to tuner 18 now from deleting and adding tuners.
I only have one tuner card in each box so do you think the UDEV rearranging issue can still mess with me?

_________________
R7.4 Master Backend/Frontend 1 Ceton InfiniTV 4 AMD x4 9850/4GB/nVidia210 60GB SSD 5x2TB RAID5
Slave Backend/Frontend 1 Ceton InfiniTV 4 AMD 1050x6/4GB/NVidia 9500 40GB SSD 2x500GB SATA Maxtor
(Can't get 2nd Ceton tuner to work)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Apr 16, 2013 12:42 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
you can go into the database and clear the entrys dont have the commands handy. Will post them for u later


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Apr 16, 2013 12:55 pm 
Offline
Joined: Mon May 29, 2006 4:58 pm
Posts: 58
After several deletes and adds and reboots... It works.
I deleted all tuners from the slave backend - not just the slave backend tuners but all tuners.
Rebooted slave and waited a little while.
Shutdown slave wait again.
Check master to see that all tuners are gone.
Reboot master. Wait.
Add tuners back to master & reboot again. Wait.
Start slave. Wait.
Add tuners to slave. Wait.
Reboot slave. Wait.
Shutdown slave. Wait.
Reboot master. Wait.
Start slave.
All seems fine now as far as the tuners go. Now I've lost all scheduled recordings for some reason. Yes, I added the input connections back to the tuners. What now???

_________________
R7.4 Master Backend/Frontend 1 Ceton InfiniTV 4 AMD x4 9850/4GB/nVidia210 60GB SSD 5x2TB RAID5
Slave Backend/Frontend 1 Ceton InfiniTV 4 AMD 1050x6/4GB/NVidia 9500 40GB SSD 2x500GB SATA Maxtor
(Can't get 2nd Ceton tuner to work)


Top
 Profile  
 
 Post subject: Re: UDEV help
PostPosted: Tue Apr 16, 2013 12:59 pm 
Offline
Joined: Mon May 29, 2006 4:58 pm
Posts: 58
Just saw your previous post. Thanks but I guess that part is fixed. Just need things to record now. This is where I lost my tuner config the first time. I deleted and re-added the tuners to get my recording schedules back. It worked but I lost the slave tuners. Now that I have all tuners I again have no upcoming recordings. I can watch TV and hit R to record and it works. Upcoming recordings says I have nothing scheduled.

_________________
R7.4 Master Backend/Frontend 1 Ceton InfiniTV 4 AMD x4 9850/4GB/nVidia210 60GB SSD 5x2TB RAID5
Slave Backend/Frontend 1 Ceton InfiniTV 4 AMD 1050x6/4GB/NVidia 9500 40GB SSD 2x500GB SATA Maxtor
(Can't get 2nd Ceton tuner to work)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu