[Solved!]ZM 1.21.2, 4xbt878, FC4, getting black screen

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

[Solved!]ZM 1.21.2, 4xbt878, FC4, getting black screen

Post by Blazer »

[Edit: See my last post for "solution"]

I finally got my capture card and camera, so now have started testing my ZM install. So fair failing miserably. I am going to dump all the info on my setup and hope that someone spots my problem. I have tried searching the forums and readme but havn't figured it out yet. If anyone has any suggestions on how to troubleshoot I would greatly appreciate it.

AMD Athlon 1.2Ghz
OS: Fedora Core 4
ZM: 1.21.2
Capture card: IVC-200G (4x bt878, 4x30fps)
Camera: Sony Day/Night CCD connected to video0 ( http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... eName=WDVW )

Relavant dmesg:

Code: Select all

bttv0: Bt878 (rev 17) at 0000:02:04.0, irq: 12, latency: 32, mmio: 0xe6000000
bttv0: detected: IVC-200 [card=102], PCI subsystem ID is 0000:a155
bttv0: using: IVC-200 [card=102,autodetected]
bttv0: gpio: en=00000000, out=00000000 in=00ffff0f [init]
bttv0: using tuner=-1
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: i2c: checking for TDA9887 @ 0x86... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: PLL: 28636363 => 35468950 .. ok
bttv: Bt8xx card found (1).
ACPI: PCI Interrupt Link [LNK4] enabled at IRQ 5
PCI: setting IRQ 5 as level-triggered
ACPI: PCI Interrupt 0000:02:05.0[A] -> Link [LNK4] -> GSI 5 (level, low) -> IRQ
5
bttv1: Bt878 (rev 17) at 0000:02:05.0, irq: 5, latency: 32, mmio: 0xe6002000
bttv1: detected: IVC-200 [card=102], PCI subsystem ID is 0001:a155
bttv1: using: IVC-200 [card=102,autodetected]
bttv1: gpio: en=00000000, out=00000000 in=00ffffff [init]
bttv1: using tuner=-1
bttv1: i2c: checking for MSP34xx @ 0x80... not found
bttv1: i2c: checking for TDA9875 @ 0xb0... not found
bttv1: i2c: checking for TDA7432 @ 0x8a... not found
bttv1: i2c: checking for TDA9887 @ 0x86... not found
bttv1: registered device video1
bttv1: registered device vbi1
bttv1: PLL: 28636363 => 35468950 .. ok
bttv: Bt8xx card found (2).
ACPI: PCI Interrupt 0000:02:06.0[A] -> Link [LNK1] -> GSI 11 (level, low) -> IRQ
 11
bttv2: Bt878 (rev 17) at 0000:02:06.0, irq: 11, latency: 32, mmio: 0xe6004000
bttv2: detected: IVC-200 [card=102], PCI subsystem ID is 0002:a155
bttv2: using: IVC-200 [card=102,autodetected]
bttv2: gpio: en=00000000, out=00000000 in=00ffffff [init]
bttv2: using tuner=-1
bttv2: i2c: checking for MSP34xx @ 0x80... not found
bttv2: i2c: checking for TDA9875 @ 0xb0... not found
bttv2: i2c: checking for TDA7432 @ 0x8a... not found
bttv2: i2c: checking for TDA9887 @ 0x86... not found
bttv2: registered device video2
bttv2: registered device vbi2
bttv2: PLL: 28636363 => 35468950 .. ok
bttv: Bt8xx card found (3).
ACPI: PCI Interrupt 0000:02:07.0[A] -> Link [LNK2] -> GSI 10 (level, low) -> IRQ
 10
bttv3: Bt878 (rev 17) at 0000:02:07.0, irq: 10, latency: 32, mmio: 0xe6006000
bttv3: detected: IVC-200 [card=102], PCI subsystem ID is 0003:a155
bttv3: using: IVC-200 [card=102,autodetected]
bttv3: gpio: en=00000000, out=00000000 in=00ffffff [init]
bttv3: using tuner=-1
bttv3: i2c: checking for MSP34xx @ 0x80... not found
bttv3: i2c: checking for TDA9875 @ 0xb0... not found
bttv3: i2c: checking for TDA7432 @ 0x8a... not found
bttv3: i2c: checking for TDA9887 @ 0x86... not found
bttv3: registered device video3
bttv3: registered device vbi3
bttv3: PLL: 28636363 => 35468950 .. ok
bt878: AUDIO driver version 0.0.0 loaded
bt878: Bt878 AUDIO function found (0).
I have shared memory tweaked, and the video devices are readable:

Code: Select all

[root@zoneminder ~]# tail -3 /etc/sysctl.conf
# Increase available shared memory
kernel.shmall = 134217728
kernel.shmmax = 134217728

[root@zoneminder ~]# ls -l /dev/vid*
lrwxrwxrwx  1 root root     6 Jul  7 23:25 /dev/video -> video0
crwxrwxrwx  1 root root 81, 0 Jul  7 23:25 /dev/video0
crwxrwxrwx  1 root root 81, 1 Jul  7 23:25 /dev/video1
crwxrwxrwx  1 root root 81, 2 Jul  7 23:25 /dev/video2
crwxrwxrwx  1 root root 81, 3 Jul  7 23:25 /dev/video3

Code: Select all

# zmu -d /dev/video0 -q -v
Video Capabilities
  Name: BT878 video (IVC-200)
  Type: 171
    Can capture
    Can tune
    Overlay onto frame buffer
    Can clip
    Scalable
  Video Channels: 1
  Audio Channels: 0
  Maximum Width: 768
  Maximum Height: 480
  Minimum Width: 48
  Minimum Height: 32
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 320
  Height: 240
Picture Attributes
  Palette: 4 - 24bit RGB
  Colour Depth: 24
  Brightness: 32768
  Hue: 32768
  Colour :32768
  Contrast: 32768
  Whiteness: 0
Channel 0 Attributes
  Name: Composite0
  Channel: 0
  Flags: 2
    Channel has audio
  Type: 2 - Camera
  Format: 1 - NTSC
When I start up ZM, I get the following in /var/log/messages:

Code: Select all

Jul  8 00:14:08 zoneminder zmc_d0[4866]: INF [Debug Level = 0, Debug Log = <none>]
Jul  8 00:14:08 zoneminder kernel: bttv0: reset, reinitialize
Jul  8 00:14:08 zoneminder kernel: bttv0: PLL can sleep, using XTAL (28636363).
Jul  8 00:14:08 zoneminder zmc_d0[4866]: INF [Starting Capture]
Jul  8 00:14:08 zoneminder kernel: bttv0: SCERR @ 01ac3000,bits: VSYNC HSYNC OFLOW FBUS SCERR*
Jul  8 00:14:08 zoneminder last message repeated 3 times
Jul  8 00:14:08 zoneminder kernel: bttv0: timeout: drop=0 irq=21648/21648, risc=32c27020, bits: VSYNC HSYNC OFLOW FBUS
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 1(1): Input/output error]
Jul  8 00:14:08 zoneminder kernel: bttv0: reset, reinitialize
Jul  8 00:14:08 zoneminder kernel: bttv0: PLL can sleep, using XTAL (28636363).
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 2(1): Invalid argument]
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 3(1): Invalid argument]
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 4(1): Invalid argument]
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 5(1): Invalid argument]
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 6(1): Invalid argument]
Jul  8 00:14:08 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 7(1): Invalid argument]
Jul  8 00:14:08 zoneminder kernel: bttv0: SCERR @ 01ac3000,bits: VSYNC HSYNC OFLOW FBUS SCERR*
Jul  8 00:14:08 zoneminder kernel: bttv0: SCERR @ 01ac3014,bits: VSYNC HSYNC OFLOW FBUS SCERR*
Jul  8 00:14:09 zoneminder kernel: bttv0: SCERR @ 01ac3014,bits: VSYNC HSYNC OFLOW FBUS SCERR*
Jul  8 00:14:09 zoneminder kernel: bttv0: SCERR @ 01ac3000,bits: VSYNC HSYNC OFLOW FBUS SCERR*
Jul  8 00:14:09 zoneminder kernel: bttv0: timeout: drop=0 irq=21655/21655, risc=2f67b1e0, bits: VSYNC HSYNC OFLOW FBUS
Jul  8 00:14:09 zoneminder zmc_d0[4866]: ERR [Sync failure for frame 0 buffer 0(1): Input/output error]
The actual ZM logs seem to look okay:

Code: Select all

[root@zoneminder zm]# ls -l
total 24
-rw-r--r--  1 apache apache 290 Jul  8 00:14 zmaudit.log
-rw-r--r--  1 apache apache 548 Jul  8 00:14 zmdc.log
-rw-r--r--  1 apache apache  66 Jul  8 00:14 zmfilter.log
-rw-r--r--  1 apache apache 419 Jul  8 00:14 zmpkg.log
-rw-r--r--  1 apache apache  43 Jul  8 00:14 zmupdate.log
-rw-r--r--  1 apache apache  71 Jul  8 00:14 zmwatch.log
[root@zoneminder zm]# cat *
07/08/05 00:14:09.311027 zmaudit_d900_y[4870].DBG [Found database monitor '1']
07/08/05 00:14:09.312212 zmaudit_d900_y[4870].DBG [Got 0 events]
07/08/05 00:14:09.312841 zmaudit_d900_y[4870].DBG [Found filesystem monitor '1']
07/08/05 00:14:09.313136 zmaudit_d900_y[4870].DBG [Got 0 events]
Server starting at 05/07/08 00:14:04
'zmc -d 0' started at 05/07/08 00:14:08
'zmc -d 0' starting at 05/07/08 00:14:08, pid = 4866
'zmfilter.pl' started at 05/07/08 00:14:08
'zmfilter.pl' starting at 05/07/08 00:14:08, pid = 4868
'zmaudit.pl -d 900 -y' started at 05/07/08 00:14:09
'zmaudit.pl -d 900 -y' starting at 05/07/08 00:14:09, pid = 4870
'zmwatch.pl' started at 05/07/08 00:14:09
'zmwatch.pl' starting at 05/07/08 00:14:09, pid = 4873
'zmupdate.pl -c' started at 05/07/08 00:14:09
'zmupdate.pl -c' starting at 05/07/08 00:14:09, pid = 4875
07/08/05 00:14:08.865864 zmfilter[4868].INF [Scanning for events]
Command: start
Executing: /usr/local/bin/zmdc.pl check
Removing shared memory
Executing: /usr/local/bin/zmfix
Executing: /usr/local/bin/zmdc.pl status
Executing: /usr/local/bin/zmdc.pl start zmc -d 0
Executing: /usr/local/bin/zmdc.pl start zmfilter.pl
Executing: /usr/local/bin/zmdc.pl start zmaudit.pl -d 900 -y
Executing: /usr/local/bin/zmdc.pl start zmwatch.pl
Executing: /usr/local/bin/zmdc.pl start zmupdate.pl -c
Update agent starting at 05/07/08 00:14:10
Watchdog starting at 05/07/08 00:14:09
Watchdog pausing for 30 seconds
And last but not least, a screenshot of what I am experiencing:
http://www.n00bstories.com/image.fetch. ... 1404231618
Last edited by Blazer on Sat Aug 13, 2005 5:08 am, edited 1 time in total.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

Heres my lsmod if it helps:

Code: Select all

[root@zoneminder ~]# lsmod
Module                  Size  Used by
md5                     4033  1
ipv6                  267841  10
parport_pc             28933  1
lp                     13001  0
parport                40585  2 parport_pc,lp
autofs4                29253  2
rfcomm                 42333  0
l2cap                  30661  5 rfcomm
bluetooth              56133  4 rfcomm,l2cap
sunrpc                167813  1
ohci_hcd               26849  0
ehci_hcd               41037  0
bt878                  10457  0
bttv                  161521  1 bt878
video_buf              23749  1 bttv
i2c_algo_bit            9288  1 bttv
v4l2_common             5825  1 bttv
btcx_risc               4937  1 bttv
tveeprom               13017  1 bttv
videodev                9537  1 bttv
i2c_nforce2             6849  0
i2c_core               21569  4 bttv,i2c_algo_bit,tveeprom,i2c_nforce2
8139too                30017  0
mii                     5441  1 8139too
dm_snapshot            17413  0
dm_zero                 2113  0
dm_mirror              26157  0
ext3                  132681  2
jbd                    86233  1 ext3
dm_mod                 58101  6 dm_snapshot,dm_zero,dm_mirror
sata_nv                 9541  0
libata                 47301  1 sata_nv
sd_mod                 20545  0
scsi_mod              147977  2 libata,sd_mod
I also tried booting with acpi=no
User avatar
krzys31337
Posts: 65
Joined: Wed Jul 06, 2005 7:43 pm
Location: Poland,Warsaw N 52°09'10" E 20°55'09"

Post by krzys31337 »

For me it (two bt878a with 4 cameras on each) capturing/monitoring strarted working.

Maybe there is problem with "Resolution 380 TV Lines", are you using PAL/NTSC and do you have proper widthxheight set up ?

Tried things like tvtime/xawtv? Have they worked?

Also:

Video Channels: 1
Audio Channels: 0

Don's seem good. Try "rmmod bttv" and then "modprobe bttv card=7,7,7,7"
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

krzys31337 wrote:For me it (two bt878a with 4 cameras on each) capturing/monitoring strarted working.

Maybe there is problem with "Resolution 380 TV Lines", are you using PAL/NTSC and do you have proper widthxheight set up ?
I have ZM configured for NTSC, and using 320x240
krzys31337 wrote: Tried things like tvtime/xawtv? Have they worked?
Not yet...the server is currently in a closet with no monitor attached.
krzys31337 wrote:Also:

Video Channels: 1
Audio Channels: 0

Don's seem good. Try "rmmod bttv" and then "modprobe bttv card=7,7,7,7"
Tried that:

Code: Select all

[root@zoneminder ~]# rmmod bttv
ERROR: Module bttv is in use by bt878
[root@zoneminder ~]# rmmod bt878
[root@zoneminder ~]# modprobe bttv card=7,7,7,7
I still get the same errors/behavior, and despite specifying the card=, zmu still says the card is a type 171 IVC-200 (which is actually what it is).
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

I tried to install xawtv but it's not in the FC4 repository...looks like its been replaced by "camE". a "yum search xawtv" came up with:

camE.i386 1.9-3 installed
Matched from:
Rewrite of the xawtv webcam app, which adds imlib2 support
camE is a rewrite of the xawtv webcam app, which adds imlib2 support and thus many new possibilities.

So I installed it and tried running it:

[root@zoneminder ~]# camE -f
camE: camE 1.9 - (c) 1999, 2000 Gerd Knorr, Tom Gilbert
camE: grabber config: size 320x240, input 0, norm 0, jpeg quality 75
camE: negotiated palette RGB24
camE: BT878 video (IVC-200) detected
camE: * taking shot
ioctl VIDIOCSYNC: Input/output error
no image captured
User avatar
krzys31337
Posts: 65
Joined: Wed Jul 06, 2005 7:43 pm
Location: Poland,Warsaw N 52°09'10" E 20°55'09"

Post by krzys31337 »

Blazer wrote: [root@zoneminder ~]# camE -f
camE: camE 1.9 - (c) 1999, 2000 Gerd Knorr, Tom Gilbert
camE: grabber config: size 320x240, input 0, norm 0, jpeg quality 75
camE: negotiated palette RGB24
camE: BT878 video (IVC-200) detected
camE: * taking shot
ioctl VIDIOCSYNC: Input/output error
no image captured
IMVHO the bttv.o is in the bad way/not initialized or configured. There's many "catch single frame and save it to file on the hdd" programs so you can use it even when server is in closet, there is some stuff that works like CGI with v4l interface.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

krzys31337 wrote:
Blazer wrote: [root@zoneminder ~]# camE -f
camE: camE 1.9 - (c) 1999, 2000 Gerd Knorr, Tom Gilbert
camE: grabber config: size 320x240, input 0, norm 0, jpeg quality 75
camE: negotiated palette RGB24
camE: BT878 video (IVC-200) detected
camE: * taking shot
ioctl VIDIOCSYNC: Input/output error
no image captured
IMVHO the bttv.o is in the bad way/not initialized or configured. There's many "catch single frame and save it to file on the hdd" programs so you can use it even when server is in closet, there is some stuff that works like CGI with v4l interface.
My bad...the above error was from unloading and reloading the bttv module...after are reboot that works fine:

Code: Select all

[root@zoneminder ~]# camE -f
camE: camE 1.9 - (c) 1999, 2000 Gerd Knorr, Tom Gilbert
camE: grabber config: size 320x240, input 0, norm 0, jpeg quality 75
camE: negotiated palette RGB24
camE: BT878 video (IVC-200) detected
camE: * taking shot
camE: ** shot taken
camE: *** uploading via ftp
However I still get the same sync errors, black screen etc when I run ZM. I also installed xawtv (on FC4 you have to do ./configure CC=gcc32), so now I can run v4l-info:

Code: Select all

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name                    : "BT878 video (IVC-200)"
        type                    : 0xab [CAPTURE,TUNER,OVERLAY,CLIPPING,SCALES]
        channels                : 1
        audios                  : 0
        maxwidth                : 924
        maxheight               : 576
        minwidth                : 48
        minheight               : 32
Sigh...I just don't see anything wrong.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

Okay here is the latest update.

I took the server out of the closet and put it on my desk attached to my second monitor so that I could run X applications natively. I then installed "tvtime" and fired it up, and the feed I'm getting from the camera look garbled. Basically the FPS looks really slow, and the image is randomly filled with random lines of the color PINK. Sometimes just a few lines, sometimes half the screen, sometimes most of the screen. I'm starting to wonder if it is an issue with the capture card. I have connected the camera to my television and verified that it works fine.

Here are the pics I captured from TV time. The pics were taken with the camera in nightmode, so thats why the image is greyscale. Note that in the screenshots everything that I was seeing onscreen as pink came out green.

http://www.n00bstories.com/image.fetch. ... 1273084583
http://www.n00bstories.com/image.fetch. ... 1169935476
http://www.n00bstories.com/image.fetch. ... 1182049795

I have tried toggling from NTSC to PAL and all the other formats available (the card and camera are NTCS).

Anyone have any ideas?
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

I just did some more testing with xawtv (had to compile it as there is no FC4 rpm), and got the same results...I did notice that the intermittent display, appears to be just a couple of frames looping back and forth, not a live feed. This made me think it could have something to do with buffers so I tried using buffers=32 with the bttv module but alas it had no effect.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

I am pretty close to wits end here. I have now purchased a replacement capture card, and it does the exact same thing! This is the sort of feed I get when I launch xawtv:

http://www.n00bstories.com/image.fetch. ... 1173329415

Note that the first few lines of the feed are normal...what the hell?!

I have tried putting the card in different slots.
I have connected the video output of the camera to my TV and I get a perfect video signal.

I'm close to pulling my hair out here...anyone have any ideas?

P.S. I realize this is not a problem with ZoneMinder...I'm sure that once I can get a normal feed in xawtv/tvtime, ZM won't have a problem.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

I got some more time to work on it today, and have now definitely narrowed down the problem to being either the OS or my mainboard.

I say this because I have now tried 3 brand new capture cards, and they all act the same way. I ruled out it being a problem with my camera by connecting my digital camcorder directly to the capture card, and it looked the same as my remote camera.

The strangest thing is, according to dmesg etc, the card is detect fine and there are no errors. I tried forcing card type 77, and nothing changed.

So now my challenge is to figure out if its something with the OS, or my mainboard. If its the OS, then I guess I can just install another distribution or try the LiveCD. I don't see why it wont work with FC4 though.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

Finally I got it working!

After feeling really strongly that it was an IRQ problem, and using acpi=no kernel option to no avail, I finally replaced the motherboard with a new $39 motherboard I got from Frys Electronics. The new motherboard actually has an option to disable ACPI (my other one didn't). I installed the new motherboard, disabled ACPI, and lo and behold, my IVC-200 now works great!!!

Finally I can now move on to actually tweaking ZoneMinder instead of ripping my hair out over black screens and blue lines :-)
Locked