Ubuntu Intrepid --capture card address changes on reboot

Support and queries relating to all previous versions of ZoneMinder
Locked
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Ubuntu Intrepid --capture card address changes on reboot

Post by ketsu »

Thank you for taking the time to read my question.

I am trying to add zoneminder (1.23.3) to my current mythtv (0.21) box.
I have a hauppauge PVR350 and hauppauge PVR500 used by mythtv. I have also added this BT878 chipset card.
http://store.bluecherry.net/Provideo_PV ... pv-981.htm

All software seems to be running great.

The problem is after adding the last card, the /dev/video* address changes upon reboot.

My only guess is I can change the order the modules load in the kernel... but I don't know if that is right, or how to do it.

Any direction would be greatly appriciated.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Devices loaded go in order of the buss.
So if your tuner cards are in slots 2 and 3 and you add the capture board in slot one it will change the devices to start with the capture board.

Simple fix is just to move the devices so that the tuner cards are initialized first.
majost
Posts: 14
Joined: Sun Oct 12, 2008 9:36 pm

Re: Ubuntu Intrepid --capture card address changes on reboot

Post by majost »

ketsu wrote:Thank you for taking the time to read my question.

The problem is after adding the last card, the /dev/video* address changes upon reboot.
I have seen similar issues with other devices in various releases of Ubuntu. You may also want to check your udev scripts, and if need be -- hard code the device entries into a udev config.
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Post by ketsu »

Ill try plugging the cards into different slots and see if that makes a difference. thank you for the advice.

The BT878 card is pci=express, does that mean more problems?

I really dont care what order they boot up in or what their /dev/video location is. I just want it to be the same each time I start the computer.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Does it vary every time you start it up?
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Post by ketsu »

yes is does, and i havent played with it enough to know the exact pattern, but the 350 and the new card are randomly switched i believe.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Try running:

Code: Select all

lspci
It should come up with static buss numbers every time. If it does, then moving your cards around might not help.

If thats the case, I'd dump dmesg into a file so I could compare the two in case anything interesting shows there. Probably not likely but at least helps your sanity ;)
In which case you might have to muck around in udev. :(
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Post by ketsu »

Sounds like I have a lot of fun ahead of me.

Thanks again for the help.

Ill play around with it and see if I can get any smarter.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

I'll do a bit more research as well. I have run into this a long time ago, but it's going to need a refresher to recall.


This should get you going in the right direction mean time:
http://www.mythtv.org/wiki/Device_Filenames_and_udev
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Post by ketsu »

That udev looks pretty ugly.

luckily, I decided to take a look in my motherboard bios. I didn't see any settings that looked right, but decided to upgrade to the newest bios.

and 5 reboots later, everyone is coming up in the same spot every time.

Updating my motherboard's BIOS fixed my problem.

Thank you very much.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Awesome, glad you managed to track it down.
That why one of the suggestions was to log dmesg to compare. I wanted to see if your IRQ assignments were staying the same and hopefully gain some insight.
ratosquato
Posts: 6
Joined: Mon Feb 09, 2009 10:09 pm

Post by ratosquato »

My Zoneminder also shares a mythtv box and has a PVR150 card and 4port BT878 card along with a couple USB cameras, for a total of 7 video devices.

As long as the USB cameras were always plugged in when rebooting, it was fairly consistent, but the 4 ports on the capture card would come up in slightly different orders sometimes.

I ended up making a file in /etc/udev/rules.d and called it 25-name-video-devices.rules.

The first 2 entries are USB cameras, videopvr is a PVR150 card, and vidcapx entries are the provideo 153.

Now they always come up in the same order.


SUBSYSTEM=="video4linux", BUS=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="08c2", NAME="videologitech"
SUBSYSTEM=="video4linux", ATTR{name}=="OV51x USB Camera", ATTR{index}=="0", NAME="videye"
SUBSYSTEM=="video4linux", ATTR{name}=="ivtv0 encoder MPG" ATTR{index}=="0" NAME="vidpvr"
SUBSYSTEM=="video4linux", ATTR{name}=="BT878 video (ProVideo PV150)" KERNELS=="0000:04:08.0" NAME="vidcap0"
SUBSYSTEM=="video4linux", ATTR{name}=="BT878 video (ProVideo PV150)" KERNELS=="0000:04:09.0" NAME="vidcap1"
SUBSYSTEM=="video4linux", ATTR{name}=="BT878 video (ProVideo PV150)" KERNELS=="0000:04:0a.0" NAME="vidcap2"
SUBSYSTEM=="video4linux", ATTR{name}=="BT878 video (ProVideo PV150)" KERNELS=="0000:04:0b.0" NAME="vidcap3"
blackest_knight
Posts: 1
Joined: Sat Mar 10, 2007 2:39 am

Post by blackest_knight »

I've a similar problem with a similar solution

85-tvcard.rules

KERNEL=="video[0-9]*", BUS=="pci", ATTRS{device}=="0x0350", ATTRS{vendor}=="0x109e",SYMLINK="car", GROUP="video"

KERNEL=="video[0-9]*", BUS=="pci", ATTRS{device}=="0x7134", ATTRS{vendor}=="0x1131",SYMLINK="mercury", GROUP="video"

KERNEL=="video[0-9]*", BUS=="pci", ATTRS{device}=="0x7133", ATTRS{vendor}=="0x1131",SYMLINK="dvb-t210", GROUP="video"

KERNEL=="video[0-9]*", BUS=="pci", ATTRS{device}=="0x8800", ATTRS{vendor}=="0x14f1",SYMLINK="dvb-s100", GROUP="video"


The first two rules don't apply anymore they were for a mercury and haupauge cards which are no longer used. i wrote the file in 2007

The last two cards are kworld cards I think both are hybrid cards and one is dvb-T and the other dvb-S with DVB-T not existing in ireland yet I decided to use the composite in on that card for CCTV.

now the two cards come up as video0 and video1 at random and both are ok in zoneminder under those names but the name dvb-t210 causes repeated entrys in the log as saying it quit unexpectedly error 255
testing with xawtv and tvtime finds that video0/1 or the assigned names in udev will work fine.

obviously I could use both cards with zoneminder and just have one off line but i'd rather use the satcard for more interesting viewing and changing card numbers every reboot isn't an option either.

Anyone got any ideas ?
Locked