Techwell TW6802 - input dies over time

Forum for questions and support relating to the 1.24.x releases only.
Locked
ronybc
Posts: 2
Joined: Mon Aug 09, 2010 10:37 am
Location: Kerala, INDIA

Techwell TW6802 - input dies over time

Post by ronybc »

Hello,
please help me on the following problem:

ZoneMinder v1.24.2
Using the latest 'tw68-v2' driver. (July2010)
Ubuntu 10.04, kernel 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux
AMD Athlon(tm) II X2 240 Processor, Asus M2N68-AM SE2

Using a 4 channel DVR card having four Techwell TW6802B chips, one for each channel. All the channels are up when it is started. But after going well for a few seconds, all channels, not together but separately, goes blank and returns repeatedly. After being like this for not more than 10 minutes it all goes permanently down. Stopping Zoneminder and reloading the 'tw68.ko' driver brings back the video again.

Also found that there is no such problems while watching the channels using xawtv.

The same setup worked fine with a different card (BT878) and a USB webcam (via 'motion', sourced as 'remote' IP cam).

I've tried changing the following options, that i got read about from this forum:

* ZoneMinder->options->CAPTURES_PER_FRAME
* ZoneMinder->options->V4L_MULTI_BUFFER
* kernel.shmall = 268435456, kernel.shmmax = 268435456
* booting with kernel parameter 'irqpoll'
* and tried a different machine.

None of them have any effect over the problem. Please tell me if there is anything else that might solve this.

Code: Select all

$ lspci

01:06.0 PCI bridge: Tundra Semiconductor Corp. Device 8140 (rev 01)
02:04.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
02:04.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
02:05.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
02:05.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
02:06.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
02:06.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
02:07.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
02:07.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)

Code: Select all

$ dmesg |grep tw68

[   14.241177] tw68: v4l2 driver version 0.0.4 loaded
[   14.251273] tw68 0000:02:04.0: PCI INT A -> Link[LNKA] -> GSI 7 (level, low) -> IRQ 7
[   14.251280] tw6804[0]: found at 0000:02:04.0, rev: 16, irq: 7, latency: 64, mmio: 0xdffffc00
[   14.251286] tw6804[0]: subsystem: 1797:6804, board: GENERIC [card=0,autodetected]
[   14.251301] tw6804[0]: Unable to determine board type, using generic values
[   14.360089] IRQ 7/tw6804[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[   14.360167] tw6804[0]: registered device video0 [v4l2]
[   14.360184] tw6804[0]: registered device vbi0
[   14.361403] tw68 0000:02:05.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
[   14.361410] tw6804[1]: found at 0000:02:05.0, rev: 16, irq: 11, latency: 64, mmio: 0xdffff400
[   14.361416] tw6804[1]: subsystem: 1797:6804, board: GENERIC [card=0,autodetected]
[   14.361433] tw6804[1]: Unable to determine board type, using generic values
[   14.470061] IRQ 11/tw6804[1]: IRQF_DISABLED is not guaranteed on shared IRQs
[   14.470143] tw6804[1]: registered device video1 [v4l2]
[   14.470163] tw6804[1]: registered device vbi1
[   14.470603] tw68 0000:02:06.0: PCI INT A -> Link[LNKC] -> GSI 10 (level, low) -> IRQ 10
[   14.470609] tw6804[2]: found at 0000:02:06.0, rev: 16, irq: 10, latency: 64, mmio: 0xdfffec00
[   14.470615] tw6804[2]: subsystem: 1797:6804, board: GENERIC [card=0,autodetected]
[   14.470631] tw6804[2]: Unable to determine board type, using generic values
[   14.580058] IRQ 10/tw6804[2]: IRQF_DISABLED is not guaranteed on shared IRQs
[   14.580142] tw6804[2]: registered device video2 [v4l2]
[   14.580163] tw6804[2]: registered device vbi2
[   14.581604] tw68 0000:02:07.0: PCI INT A -> Link[LNKD] -> GSI 5 (level, low) -> IRQ 5
[   14.581611] tw6804[3]: found at 0000:02:07.0, rev: 16, irq: 5, latency: 64, mmio: 0xdfffe400
[   14.581617] tw6804[3]: subsystem: 1797:6804, board: GENERIC [card=0,autodetected]
[   14.581636] tw6804[3]: Unable to determine board type, using generic values
[   14.690063] IRQ 5/tw6804[3]: IRQF_DISABLED is not guaranteed on shared IRQs
[   14.690145] tw6804[3]: registered device video3 [v4l2]
[   14.690164] tw6804[3]: registered device vbi3

------------------------------

[11951.970071] tw6804[3]/0: [ffff8800105bc600/4] timeout - dma=0x13bca000
[11951.970076] tw6804[3]/0: [ffff8800105bc800/5] timeout - dma=0x1ffb0000
[12401.300027] tw6804[2]/0: [ffff88001392f800/6] timeout - dma=0x09028000
[12401.300032] tw6804[2]/0: [ffff88001392f000/7] timeout - dma=0x3994b000
[12401.300035] tw6804[2]/0: [ffff88002fee4600/0] timeout - dma=0x23347000
[12401.300038] tw6804[2]/0: [ffff88001eb03600/1] timeout - dma=0x17fd2000
[12401.300041] tw6804[2]/0: [ffff88001eb03400/2] timeout - dma=0x17c1b000
[12401.300044] tw6804[2]/0: [ffff88001ea9f600/3] timeout - dma=0x09382000
[12401.300047] tw6804[2]/0: [ffff8800138d7c00/4] timeout - dma=0x2f4bd000
[12401.300049] tw6804[2]/0: [ffff88001392fa00/5] timeout - dma=0x283c0000
[12455.650035] tw6804[1]/0: [ffff88002f733200/6] timeout - dma=0x392be000
[12455.650041] tw6804[1]/0: [ffff880039c7a400/7] timeout - dma=0x39252000
[12455.650043] tw6804[1]/0: [ffff88003992e400/0] timeout - dma=0x13a1d000
[12455.650045] tw6804[1]/0: [ffff88003992e200/1] timeout - dma=0x39947000
[12455.650046] tw6804[1]/0: [ffff88003992ec00/2] timeout - dma=0x17f8c000
[12455.650048] tw6804[1]/0: [ffff88003992e800/3] timeout - dma=0x13bdb000
[12455.650050] tw6804[1]/0: [ffff88003992e000/4] timeout - dma=0x17fea000
[12455.650051] tw6804[1]/0: [ffff88003992ee00/5] timeout - dma=0x2fc93000
[12573.690032] tw6804[3]/0: [ffff880013b9ee00/1] timeout - dma=0x1060b000
Please help...
vst
Posts: 6
Joined: Wed Sep 01, 2010 8:42 am

Post by vst »

I have exactly the same thing happening, I've mailed the developers twice, in July and in August, and I got no reply both times.

Do you, by any chance, use a PCI riser card? I do use one, as my case is 2U.
The hardware is Intel Core2Duo E7500 @ 2.93 GHz, Intel motherboard, 2x500 GB in mdraid-1 array.
The card is tw6805 with 8 inputs.

I can actually watch the video for a couple of days, and when the timeouts happen, they crash the capture program and the video is gone for some seconds, then it resumes.
After days or a week, or two, my inputs (which are orange now, I am only motoring, not recording yet) turn red randomly, and the only solution is stopping ZoneMinder and reloading the tw68 kernel module.

The OS is Slackware Linux 13.0 with custom 2.6.32.21 kernel from kernel.org, the latest from the 2.6.32 series as of this time.
I am sticking with 2.6.32 for long term support, but maybe we should try an updated kernel, like 2.6.35? Any thoughts on this?

I have a self-built ZoneMinder from slackbuilds.org.

lspci:

Code: Select all

03:00.0 PCI bridge: Pericom Semiconductor PCI to PCI Bridge (rev 02)
04:04.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:04.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:05.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:05.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:06.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:06.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:07.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:07.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:08.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:08.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:09.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:09.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:0a.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:0a.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
04:0b.0 Multimedia video controller: Techwell Inc. Device 6804 (rev 10)
04:0b.1 Multimedia controller: Techwell Inc. Device 6805 (rev 10)
dmesg:

Code: Select all

tw6804[3]/0: [ed69da80/0] timeout - dma=0x313d0000
tw6804[3]/0: [ed69d600/1] timeout - dma=0x2be6d000
tw6804[3]/0: [ed69d900/7] timeout - dma=0x30f29000
tw6804[3]/0: [ed69dcc0/0] timeout - dma=0x30f13000
tw6804[3]/0: [ed69d3c0/1] timeout - dma=0x32328000
tw6804[3]/0: [ed69da80/2] timeout - dma=0x31883000
tw6804[3]/0: [ed69d600/3] timeout - dma=0x27c5d000
tw6804[3]/0: [ed69db40/4] timeout - dma=0x31df9000
tw6804[3]/0: [ed69dd80/5] timeout - dma=0x318cd000
tw6804[3]/0: [ed69dc00/6] timeout - dma=0x31370000
tw6804[0]/0: [f12c6480/7] timeout - dma=0x27d8f000
tw6804[0]/0: [f12c4000/0] timeout - dma=0x310b1000
tw6804[0]/0: [f17340c0/1] timeout - dma=0x2d6ad000
tw6804[0]/0: [f1050a80/2] timeout - dma=0x311b0000
tw6804[0]/0: [f1d3aa80/3] timeout - dma=0x310a4000
tw6804[0]/0: [f0ef8300/4] timeout - dma=0x31b0b000
tw6804[0]/0: [f0f3cb40/5] timeout - dma=0x27c1b000
tw6804[0]/0: [f12c6540/6] timeout - dma=0x31d66000
...
etc. The timeouts are happening constantly, and on different inputs.

Regards,
-- vst.
webroot
Posts: 2
Joined: Sun Jul 11, 2010 10:27 pm

Post by webroot »

Same problem here, with Debian, after a few days the system hangs... with the same error (the last error on the log file)... is the error only from the module or can it be caused by something else?

I'm using Debian with the 2.6.32-5 kernel, but it happened with previous kernel versions exactly the same way.

The system had another capturing board before and it was rock solid... so I'm assuming it is from this board and kernel module.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

How hot are the chips getting on the capture card? Had a similar issue with a PV-143 with four inputs; any time the system got real busy down it would go. Heat sinked the chip per a post by Curtiss and all my problems disappeared. Now I install heat sinks before installing any capture card. I don't have any experience with the card you're having issues with though...
ronybc
Posts: 2
Joined: Mon Aug 09, 2010 10:37 am
Location: Kerala, INDIA

did it via 'motion'

Post by ronybc »

Hello vst, webroot and bb99.

I've tried different kernels and machines. There is all the same problem. And the chips are just warm, not looks overheated.

Now using a different setup; there is some overhead but need to make it work somehow, so. Let 'motion' ( http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome ) to handle the channels so that ZoneMinder can see them as IP cameras. 'Motion' takes input from 'tw68' driver without the interruption and makes it available for web access (like http://127.0.0.1:8082 ). To reduce CPU usage it is configured to turn on only the web server and the motion detection and recording functions are all disabled. But it still considerably loads cpu.

If there is any other better alternatives, please share.
:cry:
Locked